summaryrefslogtreecommitdiff
path: root/sysdep/bsd/krt-sock.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-04-29 18:37:51 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-04-29 18:37:51 +0200
commitb644a490f03d27e0bd8ce5106f6205d122b16191 (patch)
treeb26abd360a40e48caef4863199f72ca301ef9bd7 /sysdep/bsd/krt-sock.c
parent1d21306785392e997099362fbc863b050fe359da (diff)
BSD: Fix address scan on OpenBSD
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r--sysdep/bsd/krt-sock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index d353d629..df639816 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -688,6 +688,10 @@ krt_read_addr(struct ks_msg *msg, int scan)
default: return;
}
+ /* We do not test family for RTA_NETMASK, because BSD sends us
+ some strange values, but interpreting them as IPv4/IPv6 works */
+ mask.sa.sa_family = addr.sa.sa_family;
+
iaddr = ipa_from_sa(&addr);
imask = ipa_from_sa(&mask);
ibrd = ipa_from_sa(&brd);