diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 1999-12-08 06:05:33 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 1999-12-08 06:05:33 +0000 |
commit | 5240cc7ce56e1804e13a77d103c0dbafaf7760c3 (patch) | |
tree | 8738b58ccd975fa42d69c2a8a8d4b596f312b63e | |
parent | 9b1a11dbdfc43c7fc4a61f4f920087d0f2699c4a (diff) |
fix field name (ip6_hdr->ip6_src). use IN6_ARE_ADDR_EQUAL for comparison.
-rw-r--r-- | sys/netinet/ip_ip4.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c index 0438ec05400..66803a86adc 100644 --- a/sys/netinet/ip_ip4.c +++ b/sys/netinet/ip_ip4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ip4.c,v 1.34 1999/12/06 07:14:36 angelos Exp $ */ +/* $OpenBSD: ip_ip4.c,v 1.35 1999/12/08 06:05:32 itojun Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -72,7 +72,6 @@ #ifdef INET6 #include <netinet6/in6.h> #include <netinet6/ip6.h> -#include <netinet6/in6_pcb.h> #include <netinet6/ip6_var.h> #include <netinet6/icmp6.h> #endif /* INET6 */ @@ -271,8 +270,7 @@ ip4_input(m, va_alist) sin6 = (struct sockaddr_in6 *) ifa->ifa_addr; - if (!bcmp(&sin6->sin6_addr, &ipv6->sin6_addr, - sizeof(struct in6_addr))) + if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ipv6->ip6_src)) { DPRINTF(("ip_input(): possible local address spoofing detected on packet from %s to %s (%s->%s)\n", inet_ntoa4(ipo->ip_src), inet_ntoa4(ipo->ip_dst), inet6_ntoa4(ipv6->ip6_src), inet6_ntoa4(ipv6->ip6_dst))); ip4stat.ip4s_spoof++; @@ -338,7 +336,7 @@ ip4_input(m, va_alist) #ifdef INET6 if (ifq == &ip6intrq) - schednetisr(NETISR_IP6); + schednetisr(NETISR_IPV6); #endif /* INET6 */ splx(s); |