summaryrefslogtreecommitdiff
path: root/sys/netinet6/route6.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-09 01:12:29 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-09 01:12:29 +0000
commita22e870b5de1b4b967eb669dddf40c33563612c7 (patch)
tree14b8732fec424d9e0acdb7ed362257e8566a1090 /sys/netinet6/route6.c
parentc7a7b44e5c7e8524effef638616c46cd24b72f3a (diff)
switch IPv6 advanced API from RFC2292 to RFC3542 (2292 is superseded by 3542).
the kernel still handles RFC2292 set/getsockopts, so that compiled binary has no trouble running. userland sees RFC3542 symbols only on header file so new code has to use RFC3542 API. bump libc shlib minor for function additions. tested on i386/amd64 by jmc, i386 by brad. checked by deraadt.
Diffstat (limited to 'sys/netinet6/route6.c')
-rw-r--r--sys/netinet6/route6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c
index 163b5e860d6..46828d2cb69 100644
--- a/sys/netinet6/route6.c
+++ b/sys/netinet6/route6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route6.c,v 1.12 2006/12/08 21:49:03 itojun Exp $ */
+/* $OpenBSD: route6.c,v 1.13 2006/12/09 01:12:28 itojun Exp $ */
/* $KAME: route6.c,v 1.22 2000/12/03 00:54:00 itojun Exp $ */
/*
@@ -44,8 +44,7 @@
#include <netinet/icmp6.h>
-static int ip6_rthdr0(struct mbuf *, struct ip6_hdr *,
- struct ip6_rthdr0 *);
+static int ip6_rthdr0(struct mbuf *, struct ip6_hdr *, struct ip6_rthdr0 *);
int
route6_input(mp, offp, proto)
@@ -66,6 +65,8 @@ route6_input(mp, offp, proto)
switch (rh->ip6r_type) {
case IPV6_RTHDR_TYPE_0:
+ if (rh->ip6r_segleft == 0)
+ break; /* Final dst. Just ignore the header. */
rhlen = (rh->ip6r_len + 1) << 3;
/*
* note on option length: