netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier
@ 2020-03-24  1:10 Maciej Żenczykowski
  2020-03-24  2:10 ` Lorenzo Colitti
  2020-03-27  3:06 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Maciej Żenczykowski @ 2020-03-24  1:10 UTC (permalink / raw)
  To: Maciej Żenczykowski, David S . Miller
  Cc: Linux Network Development Mailing List, Erik Kline, Jen Linkova,
	Lorenzo Colitti, Michael Haro

From: Maciej Żenczykowski <maze@google.com>

This is trivial since we already have support for the entirely
identical (from the kernel's point of view) RDNSS, DNSSL, etc. that
also contain opaque data that needs to be passed down to userspace
for further processing.

As specified in draft-ietf-6man-ra-pref64-09 (while it is still a draft,
it is purely waiting on the RFC Editor for cleanups and publishing):
  PREF64 option contains lifetime and a (up to) 96-bit IPv6 prefix.

The 8-bit identifier of the option type as assigned by the IANA is 38.

Since we lack DNS64/NAT64/CLAT support in kernel at the moment,
thus this option should also be passed on to userland.

See:
  https://tools.ietf.org/html/draft-ietf-6man-ra-pref64-09
  https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml#icmpv6-parameters-5

Cc: Erik Kline <ek@google.com>
Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Michael Haro <mharo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
---
 include/net/ndisc.h | 1 +
 net/ipv6/ndisc.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 1c61aeb3a1c0..7d107113f988 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -41,6 +41,7 @@ enum {
 	ND_OPT_DNSSL = 31,		/* RFC6106 */
 	ND_OPT_6CO = 34,		/* RFC6775 */
 	ND_OPT_CAPTIVE_PORTAL = 37,	/* RFC7710 */
+	ND_OPT_PREF64 = 38,		/* RFC-ietf-6man-ra-pref64-09 */
 	__ND_OPT_MAX
 };
 
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 4a3feccd5b10..6ffa153e5166 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -197,6 +197,7 @@ static inline int ndisc_is_useropt(const struct net_device *dev,
 	return opt->nd_opt_type == ND_OPT_RDNSS ||
 		opt->nd_opt_type == ND_OPT_DNSSL ||
 		opt->nd_opt_type == ND_OPT_CAPTIVE_PORTAL ||
+		opt->nd_opt_type == ND_OPT_PREF64 ||
 		ndisc_ops_is_useropt(dev, opt->nd_opt_type);
 }
 
-- 
2.25.1.696.g5e7596f4ac-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier
  2020-03-24  1:10 [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier Maciej Żenczykowski
@ 2020-03-24  2:10 ` Lorenzo Colitti
  2020-03-27  3:06 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Colitti @ 2020-03-24  2:10 UTC (permalink / raw)
  To: Maciej Żenczykowski
  Cc: Maciej Żenczykowski, David S . Miller,
	Linux Network Development Mailing List, Erik Kline, Jen Linkova,
	Michael Haro

On Tue, Mar 24, 2020 at 10:10 AM Maciej Żenczykowski
<zenczykowski@gmail.com> wrote:
> As specified in draft-ietf-6man-ra-pref64-09 (while it is still a draft,
> it is purely waiting on the RFC Editor for cleanups and publishing):
>   PREF64 option contains lifetime and a (up to) 96-bit IPv6 prefix.

Right. The number is assigned by IANA and the draft is in the RFC
editor queue, so this number will not change.

> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 4a3feccd5b10..6ffa153e5166 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -197,6 +197,7 @@ static inline int ndisc_is_useropt(const struct net_device *dev,
>         return opt->nd_opt_type == ND_OPT_RDNSS ||
>                 opt->nd_opt_type == ND_OPT_DNSSL ||
>                 opt->nd_opt_type == ND_OPT_CAPTIVE_PORTAL ||
> +               opt->nd_opt_type == ND_OPT_PREF64 ||
>                 ndisc_ops_is_useropt(dev, opt->nd_opt_type);
>  }

Acked-By: Lorenzo Colitti <lorenzo@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier
  2020-03-24  1:10 [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier Maciej Żenczykowski
  2020-03-24  2:10 ` Lorenzo Colitti
@ 2020-03-27  3:06 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-03-27  3:06 UTC (permalink / raw)
  To: zenczykowski; +Cc: maze, netdev, ek, furry, lorenzo, mharo

From: Maciej Żenczykowski <zenczykowski@gmail.com>
Date: Mon, 23 Mar 2020 18:10:19 -0700

> From: Maciej Żenczykowski <maze@google.com>
> 
> This is trivial since we already have support for the entirely
> identical (from the kernel's point of view) RDNSS, DNSSL, etc. that
> also contain opaque data that needs to be passed down to userspace
> for further processing.
> 
> As specified in draft-ietf-6man-ra-pref64-09 (while it is still a draft,
> it is purely waiting on the RFC Editor for cleanups and publishing):
>   PREF64 option contains lifetime and a (up to) 96-bit IPv6 prefix.
> 
> The 8-bit identifier of the option type as assigned by the IANA is 38.
> 
> Since we lack DNS64/NAT64/CLAT support in kernel at the moment,
> thus this option should also be passed on to userland.
> 
> See:
>   https://tools.ietf.org/html/draft-ietf-6man-ra-pref64-09
>   https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml#icmpv6-parameters-5
> 
> Cc: Erik Kline <ek@google.com>
> Cc: Jen Linkova <furry@google.com>
> Cc: Lorenzo Colitti <lorenzo@google.com>
> Cc: Michael Haro <mharo@google.com>
> Signed-off-by: Maciej Żenczykowski <maze@google.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-27  3:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24  1:10 [PATCH] net-ipv6-ndisc: add support for 'PREF64' dns64 prefix identifier Maciej Żenczykowski
2020-03-24  2:10 ` Lorenzo Colitti
2020-03-27  3:06 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).