diff options
-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; } } |