diff options
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 23ed1aa375e..e8177a35e42 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.180 2010/06/04 11:35:43 blambert Exp $ */ +/* $OpenBSD: ip_input.c,v 1.181 2010/06/07 13:26:35 henning Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -691,10 +691,13 @@ in_iawithaddr(struct in_addr ina, struct mbuf *m, u_int rdomain) (IFF_LOOPBACK|IFF_LINK1) && ia->ia_net == (ina.s_addr & ia->ia_netmask))) return ia; + /* check ancient classful too, e. g. for rarp-based netboot */ 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) { + if (ina.s_addr == ia->ia_broadaddr.sin_addr.s_addr || + IN_CLASSFULBROADCAST(ina.s_addr, + ia->ia_addr.sin_addr.s_addr)) { /* Make sure M_BCAST is set */ if (m) m->m_flags |= M_BCAST; |