Segfault on interface addition when not using the device protocol
Greetings, I came across this issue while trying to debug (unsuccessfully so far) a probably unrelated segfault on one of our routers. When using the kernel protocol in a configuration without a device protocol, then adding a new interface with an address causes bird to segfault. The relevant backtrace for bird 1.3.8 (or 1.3.7 it's the same) is the following: #0 kif_choose_primary (i=0x5555557c8080) at krt.c:147 #1 0x0000555555564059 in ifa_recalc_primary (i=0x5555557c8080) at ../../nest/iface.c:469 #2 0x0000555555564d89 in ifa_update (a=0x7fffffffdfd0) at ../../nest/iface.c:546 #3 0x0000555555596534 in nl_parse_addr (h=<optimized out>) at netlink.c:545 #4 0x0000555555596a38 in nl_async_msg (h=0x5555557c4f70) at netlink.c:980 #5 nl_async_hook (sk=<optimized out>, size=<optimized out>) at netlink.c:1027 #6 0x0000555555590bed in sk_read (s=0x5555557c4e80) at io.c:1442 #7 0x0000555555591a09 in io_loop () at io.c:1647 #8 0x000055555555bf89 in main (argc=<optimized out>, argv=<optimized out>) at main.c:675 Steps to reproduce: 1. Use the following config: router id 192.0.2.1; protocol kernel { import none; export none; persist; scan time 20; } 2. Start bird bird -d -c bird.conf 3. Add a dummy interface ip link add crash type dummy 4. Add an IP address to the interface ip addr add crash 192.0.2.2/24 <bird segfaults> The issue is not present when the device protocol is defined in the configuration. I realize that the device protocol is virtually mandatory, but I still regard a segfault as a bug :). Regards, Apollon
participants (1)
-
Apollon Oikonomopoulos