SwordArMor-gentoo-overlay/net-misc/openbgpd/files/openbgpd-9999-config.c.patch
Alarig Le Lay ce7a3218ad
net-misc/openbgpd: Improvements
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
2020-05-04 19:04:43 +02:00

13 lines
500 B
Diff

--- a/openbsd/src/usr.sbin/bgpd/config.c 2020-03-20 17:55:04.089577745 +0100
+++ b/openbsd/src/usr.sbin/bgpd/config.c 2020-03-20 17:56:01.480205070 +0100
@@ -343,7 +343,8 @@
fatal("getifaddrs");
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != AF_INET)
+ if (ifa->ifa_addr == NULL ||
+ ifa->ifa_addr->sa_family != AF_INET)
continue;
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
if ((cur & localnet) == localnet) /* skip 127/8 */