diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-09-22 01:40:57 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-09-22 01:40:57 +0000 |
commit | 70a9bd25fbd494d66fd2f42a20d2c839994f0f86 (patch) | |
tree | 1139fd57feccdffd72ad3293bb6d8a83db19890b /sys/netinet | |
parent | 0c15d00ce6e77a34dcda96a1c31c0d1e13a0c329 (diff) |
fix my bug dating back to february the 14th of 1998,
when those wildcard interfaces came up, which
were usefull at the times. on the other hand here it is,
one cannot bind to the broadcast address, and angelos says ok.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 41495f6693a..ce8eb34146a 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.58 2000/09/19 03:20:58 angelos Exp $ */ +/* $OpenBSD: ip_input.c,v 1.59 2000/09/22 01:40:56 mickey Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -745,7 +745,7 @@ in_iawithaddr(ina, m) (IFF_LOOPBACK|IFF_LINK1) && ia->ia_subnet == (ina.s_addr & ia->ia_subnetmask))) return ia; - if (m && ((ip_directedbcast == 0) || (ip_directedbcast && + if (((ip_directedbcast == 0) || (m && ip_directedbcast && ia->ia_ifp == m->m_pkthdr.rcvif)) && (ia->ia_ifp->if_flags & IFF_BROADCAST)) { if (ina.s_addr == ia->ia_broadaddr.sin_addr.s_addr || @@ -757,7 +757,8 @@ in_iawithaddr(ina, m) ina.s_addr == ia->ia_subnet || ina.s_addr == ia->ia_net) { /* Make sure M_BCAST is set */ - m->m_flags |= M_BCAST; + if (m) + m->m_flags |= M_BCAST; return ia; } } |