[Swan-dev] b52fc2d785 is not good fix

Antony Antony antony at phenome.org
Mon Feb 24 17:32:00 UTC 2020


b52fc2d fix the build error it cause runtime segfault.

I wonder did  you test b52fc2d .  my quick test show a segmentation fault at 
pluto shutdown. 

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000000 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install libreswan-3.28_1714_g51600cfe3a_master-1.fc30.x86_64
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00005641c31082cb in exit_pluto (status=PLUTO_EXIT_OK)
    at /home/build/libreswan/programs/pluto/plutomain.c:1921
#2  0x00005641c3170ca3 in whack_handle_cb (fd=4, event=2, arg=0x0)
    at /home/build/libreswan/programs/pluto/rcv_whack.c:635
#3  0x00007ff5fd56fbb7 in event_persist_closure (ev=<optimized out>, base=0x5641c4374b28)
    at event.c:1580

Line 1921         kernel_ops->shutdown();

This what satarted ths commit race:
antony
cagney: with USE_XFRM_INTERFACE=false https://travis-ci.org/antonyantony/libreswan/builds/654227133  kernel_xfrm.o:(.data.rel.ro+0x30): undefined reference to `free_xfrmi_ipsec1'  

LetoTo
missing ifdef. I fixed it
wait it shows up as tuomo fixed it?
weird. git made up the name, or did you just push the exact same patch and commit message?


--- my 0.00 comment.
Just a hint if it helps:
        .shutdown = free_xfrmi_ipsec1,
#else
       .shutdown = NULL

= NULL will caause seg fault.
You need stub like Andrew added for BSD kernel_bsdkame.c c57088adef

Then comes the question where, which file, to add such a stub for xfrm.  
USE_XFRM_INTERFACE=false kernel_xfrm_interface.c is not compiled.
you could possibly add kernel_xfrm_interface.h need test it works or in 
kernel_xfrm.c 

-antony


More information about the Swan-dev mailing list