diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-23 10:04:32 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-23 10:04:32 +0000 |
commit | 69d17216ac466ab227445f4da103920aa9f9059d (patch) | |
tree | 2a1e64ef07b3cb3e21a040935d278b46803454fd /sys/netinet/ip_input.c | |
parent | 3f5eb4fc3c205b7855b861a426b6897ac62d1493 (diff) |
Keep checks for local delivery close to in_ouraddr().
ok claudio@
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index f9c5686313b..86dfce0d7d5 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.285 2016/11/14 04:27:03 dlg Exp $ */ +/* $OpenBSD: ip_input.c,v 1.286 2016/11/23 10:04:31 mpi Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -357,6 +357,12 @@ ipv4_input(struct mbuf *m) goto out; } + if (ip->ip_dst.s_addr == INADDR_BROADCAST || + ip->ip_dst.s_addr == INADDR_ANY) { + ip_ours(m); + goto out; + } + if (in_ouraddr(m, ifp, &rt)) { ip_ours(m); goto out; @@ -425,12 +431,6 @@ ipv4_input(struct mbuf *m) goto out; } - if (ip->ip_dst.s_addr == INADDR_BROADCAST || - ip->ip_dst.s_addr == INADDR_ANY) { - ip_ours(m); - goto out; - } - #if NCARP > 0 if (ifp->if_type == IFT_CARP && ip->ip_p == IPPROTO_ICMP && carp_lsdrop(m, AF_INET, &ip->ip_src.s_addr, &ip->ip_dst.s_addr)) |