From 77eddd79b8fb23c43bc7dc5af86e15c48deced6f Mon Sep 17 00:00:00 2001 From: itojun Date: Thu, 23 Dec 1999 17:19:44 +0000 Subject: [PATCH] * implement 2292bis IPV6_REACHCONF (trivial). --- CHANGELOG | 5 ++++- TODO.2292bis | 4 ++-- kame/sys/netinet6/ip6_output.c | 12 ++++++++++++ kame/sys/netinet6/ip6_var.h | 2 ++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3a939a1e1f..7006916f0f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,11 @@ CHANGELOG for KAME kit -$Id: CHANGELOG,v 1.369 1999/12/23 06:17:07 jinmei Exp $ +$Id: CHANGELOG,v 1.370 1999/12/23 17:19:44 itojun Exp $ <199912> +Fri Dec 24 02:21:30 JST 1999 itojun@iijlab.net + * implement 2292bis IPV6_REACHCONF (trivial). + 1999-12-23 JINMEI, Tatuya * kame/sys/netinet6/nd6.c (nd6_free): call pfctlinput with PRC_HOSTDEAD in order to remove all cached routes to the diff --git a/TODO.2292bis b/TODO.2292bis index 9a3542d227..a12af9eec3 100644 --- a/TODO.2292bis +++ b/TODO.2292bis @@ -1,6 +1,6 @@ TODO list for the new advanced API (aka rfc2292bis) KAME project -$Id: TODO.2292bis,v 1.4 1999/12/22 16:49:04 jinmei Exp $ +$Id: TODO.2292bis,v 1.5 1999/12/23 17:19:46 itojun Exp $ new socket options or ancillary data types: - IPV6_RTHDRDSTOPTS done/19991221 jinmei * @@ -12,7 +12,7 @@ new socket options or ancillary data types: - IPV6_RECVRTHDRDSTOPTS done/19991217 jinmei - IPV6_USE_MIN_MTU - IPV6_RECVPATHMTU -- IPV6_REACHCONF +- IPV6_REACHCONF done/19991223 itojun (*) the current implementation returns each dst opt header in a single ancillary object, but the specfication requires that all headers is stored in a single object. diff --git a/kame/sys/netinet6/ip6_output.c b/kame/sys/netinet6/ip6_output.c index 5bd07017f2..f579054c93 100644 --- a/kame/sys/netinet6/ip6_output.c +++ b/kame/sys/netinet6/ip6_output.c @@ -762,6 +762,12 @@ skip_ipsec2:; if (ifpp) *ifpp = ifp; + /* + * Upper-layer reachability confirmation + */ + if (opt && (opt->ip6po_flags & IP6PO_REACHCONF)) + nd6_nud_hint(ro->ro_rt, NULL); + /* * Determine path MTU. */ @@ -2463,6 +2469,12 @@ ip6_setpktoptions(control, opt, priv) } break; + case IPV6_REACHCONF: + if (cm->cmsg_len != CMSG_LEN(0)) + return(EINVAL); + opt->ip6po_flags |= IP6PO_REACHCONF; + break; + default: return(ENOPROTOOPT); } diff --git a/kame/sys/netinet6/ip6_var.h b/kame/sys/netinet6/ip6_var.h index 5e1b1f29dc..5334a61598 100644 --- a/kame/sys/netinet6/ip6_var.h +++ b/kame/sys/netinet6/ip6_var.h @@ -134,6 +134,8 @@ struct ip6_pktopts { struct ip6_dest *ip6po_dest1; /* Destination options header(1st part) */ struct ip6po_rhinfo ip6po_rhinfo; /* Routing header related info. */ struct ip6_dest *ip6po_dest2; /* Destination options header(2nd part) */ + int ip6po_flags; +#define IP6PO_REACHCONF 0x01 /* upper-layer reach. confirmation */ }; struct ip6stat {