diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-09 01:12:29 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-09 01:12:29 +0000 |
commit | a22e870b5de1b4b967eb669dddf40c33563612c7 (patch) | |
tree | 14b8732fec424d9e0acdb7ed362257e8566a1090 /sys/netinet6/raw_ip6.c | |
parent | c7a7b44e5c7e8524effef638616c46cd24b72f3a (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/raw_ip6.c')
-rw-r--r-- | sys/netinet6/raw_ip6.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index c74c1c8e49a..fa3feb51918 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.30 2006/05/27 23:40:27 claudio Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.31 2006/12/09 01:12:28 itojun Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -202,7 +202,7 @@ rip6_input(mp, offp, proto) struct mbuf *n; if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { if (last->in6p_flags & IN6P_CONTROLOPTS) - ip6_savecontrol(last, &opts, ip6, n); + ip6_savecontrol(last, n, &opts); /* strip intermediate headers */ m_adj(n, *offp); if (sbappendaddr(&last->in6p_socket->so_rcv, @@ -221,7 +221,7 @@ rip6_input(mp, offp, proto) } if (last) { if (last->in6p_flags & IN6P_CONTROLOPTS) - ip6_savecontrol(last, &opts, ip6, m); + ip6_savecontrol(last, m, &opts); /* strip intermediate headers */ m_adj(m, *offp); if (sbappendaddr(&last->in6p_socket->so_rcv, @@ -388,7 +388,9 @@ rip6_output(struct mbuf *m, ...) priv = 1; dst = &dstsock->sin6_addr; if (control) { - if ((error = ip6_setpktoptions(control, &opt, priv)) != 0) + if ((error = ip6_setpktopts(control, &opt, + in6p->in6p_outputopts, + priv, so->so_proto->pr_protocol)) != 0) goto bad; optp = &opt; } else @@ -508,10 +510,10 @@ rip6_output(struct mbuf *m, ...) m_freem(m); freectl: - if (optp == &opt && optp->ip6po_rthdr && optp->ip6po_route.ro_rt) - RTFREE(optp->ip6po_route.ro_rt); - if (control) + if (control) { + ip6_clearpktopts(&opt, -1); m_freem(control); + } return (error); } |