summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-01-21 18:12:46 +0000
committerume <ume@FreeBSD.org>2005-01-21 18:12:46 +0000
commite33b312668269991a6f9b8547ec5de7272a11cf3 (patch)
tree3334f40b240c1ff15fe53c4c7273602f02dc379a /sys/netinet6
parentda7116f3aca878545c2d52ffca882ba388d0d89e (diff)
downloadFreeBSD-src-e33b312668269991a6f9b8547ec5de7272a11cf3.zip
FreeBSD-src-e33b312668269991a6f9b8547ec5de7272a11cf3.tar.gz
we don't need to make fake sockaddr_in6 to compare subject address.
MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 6cc9a4d..a1828b9 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1170,7 +1170,6 @@ ni6_input(m, off)
int addrs; /* for NI_QTYPE_NODEADDR */
struct ifnet *ifp = NULL; /* for NI_QTYPE_NODEADDR */
struct sockaddr_in6 sin6_sbj; /* subject address */
- struct sockaddr_in6 sin6_d;
struct ip6_hdr *ip6;
int oldfqdn = 0; /* if 1, return pascal string (03 draft) */
char *subj = NULL;
@@ -1187,17 +1186,6 @@ ni6_input(m, off)
}
#endif
- bzero(&sin6_d, sizeof(sin6_d));
- sin6_d.sin6_family = AF_INET6; /* not used, actually */
- sin6_d.sin6_len = sizeof(sin6_d); /* ditto */
- sin6_d.sin6_addr = ip6->ip6_dst;
- if (in6_addr2zoneid(m->m_pkthdr.rcvif, &ip6->ip6_dst,
- &sin6_d.sin6_scope_id)) {
- goto bad;
- }
- if (in6_embedscope(&sin6_d.sin6_addr, &sin6_d, NULL, NULL))
- goto bad; /* XXX should not happen */
-
/*
* Validate IPv6 destination address.
*
@@ -1286,7 +1274,8 @@ ni6_input(m, off)
goto bad; /* XXX should not happen */
subj = (char *)&sin6_sbj;
- if (SA6_ARE_ADDR_EQUAL(&sin6_sbj, &sin6_d))
+ if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst,
+ &sin6_sbj.sin6_addr))
break;
/*
OpenPOWER on IntegriCloud