diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1999-04-23 15:18:04 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1999-04-23 15:18:04 +0000 |
commit | fd2c262775848c2b123af34cad56e149c9628e37 (patch) | |
tree | b7e437c5cff29a57f1bf5059bb3236d54a29ec83 /sys | |
parent | fbefedc54bd388cac71773eeb8c713b5336ce40c (diff) |
dont accept packets with the destination address of a down interface;
proff@netbsd.org.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index e71c671f75b..3c68442cbd6 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.39 1999/04/12 03:17:09 deraadt Exp $ */ +/* $OpenBSD: ip_input.c,v 1.40 1999/04/23 15:18:03 provos Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -259,6 +259,7 @@ ipv4_input(struct mbuf *m, ...) { register struct ip *ip; register struct ipq *fp; + struct in_ifaddr *ia; struct ipqent *ipqe; int hlen, mff; va_list ap; @@ -371,7 +372,8 @@ ipv4_input(struct mbuf *m, ...) /* * Check our list of addresses, to see if the packet is for us. */ - if (in_iawithaddr(ip->ip_dst, m)) + if ((ia = in_iawithaddr(ip->ip_dst, m)) != NULL && + (ia->ia_ifp->if_flags & IFF_UP)) goto ours; if (IN_MULTICAST(ip->ip_dst.s_addr)) { |