Closed hxx-fetch closed 5 years ago
On 2.18 I had radvd starting segfaulting, when I added a wireguard interface to the system.
Debugging showed that send.c line 293 is the culprid. Following patch fixed the segfaults:
--- radvd-2.18/send.c 2018-12-08 23:35:39.000000000 -0000 +++ radvd-2.18.patched/send.c 2019-09-21 20:13:28.986666845 -0000 @@ -289,6 +289,11 @@ if (strncmp(ifa->ifa_name, ifname, IFNAMSIZ)) continue; + + if (ifa->ifa_addr == NULL) { + flog(LOG_ERR, "ifa_addr == NULL for dev %s !? Ignoring in add_auto_prefixes", ifname); + continue; + }
According to the man page of getifaddrs is seems actually valid for ifa_addr to be NULL.
Can you turn this into a pull request?
On 2.18 I had radvd starting segfaulting, when I added a wireguard interface to the system.
Debugging showed that send.c line 293 is the culprid. Following patch fixed the segfaults:
According to the man page of getifaddrs is seems actually valid for ifa_addr to be NULL.