summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-10-24 20:37:05 +0000
committerume <ume@FreeBSD.org>2003-10-24 20:37:05 +0000
commit19c7c976c8dcbe97685d3f489b0d100292f86be0 (patch)
treefae46ff8203e65e60e8d73da014640ca86ca5b33 /sys/netinet6
parent38391a78340c898e1eb86451d35f8c754330f7a0 (diff)
downloadFreeBSD-src-19c7c976c8dcbe97685d3f489b0d100292f86be0.zip
FreeBSD-src-19c7c976c8dcbe97685d3f489b0d100292f86be0.tar.gz
remove the ip6r0_addr and ip6r0_slmap members from ip6_rthdr0{}
according to rfc2292bis. Obtained from: KAME
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_output.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index b4859ec..0e20f6c 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -478,17 +478,19 @@ skip_ipsec2:;
(struct ip6_rthdr *)(mtod(exthdrs.ip6e_rthdr,
struct ip6_rthdr *));
struct ip6_rthdr0 *rh0;
+ struct in6_addr *addrs;
finaldst = ip6->ip6_dst;
switch (rh->ip6r_type) {
case IPV6_RTHDR_TYPE_0:
rh0 = (struct ip6_rthdr0 *)rh;
- ip6->ip6_dst = rh0->ip6r0_addr[0];
- bcopy((caddr_t)&rh0->ip6r0_addr[1],
- (caddr_t)&rh0->ip6r0_addr[0],
+ addrs = (struct in6_addr *)(rh + 1);
+
+ ip6->ip6_dst = *addrs;
+ bcopy((caddr_t)(addrs + 1), (caddr_t)addrs,
sizeof(struct in6_addr)*(rh0->ip6r0_segleft - 1)
);
- rh0->ip6r0_addr[rh0->ip6r0_segleft - 1] = finaldst;
+ *(addrs + rh0->ip6r0_segleft - 1) = finaldst;
break;
default: /* is it possible? */
error = EINVAL;
OpenPOWER on IntegriCloud