netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier
@ 2019-07-19  6:30 Maciej Żenczykowski
  2019-07-22 19:11 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej Żenczykowski @ 2019-07-19  6:30 UTC (permalink / raw)
  To: Maciej Żenczykowski, David S . Miller
  Cc: netdev, Lorenzo Colitti, Remin Nguyen Van, Alexey I . Froloff

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 and DNSSL that
also contain opaque data that needs to be passed down to userspace.

As specified in RFC7710, Captive Portal option contains a URL.
8-bit identifier of the option type as assigned by the IANA is 37.
This option should also be treated as userland.

Hence, treat ND option 37 as userland (Captive Portal support)

See:
  https://tools.ietf.org/html/rfc7710
  https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml

Fixes: e35f30c131a56
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Remin Nguyen Van <reminv@google.com>
Cc: Alexey I. Froloff <raorn@raorn.name>
---
 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 366150053043..b2f715ca0567 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -40,6 +40,7 @@ enum {
 	ND_OPT_RDNSS = 25,		/* RFC5006 */
 	ND_OPT_DNSSL = 31,		/* RFC6106 */
 	ND_OPT_6CO = 34,		/* RFC6775 */
+	ND_OPT_CAPTIVE_PORTAL = 37,	/* RFC7710 */
 	__ND_OPT_MAX
 };
 
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 083cc1c94cd3..53caf59c591e 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -196,6 +196,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 ||
 		ndisc_ops_is_useropt(dev, opt->nd_opt_type);
 }
 
-- 
2.22.0.657.g960e92d24f-goog


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

* Re: [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier
  2019-07-19  6:30 [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier Maciej Żenczykowski
@ 2019-07-22 19:11 ` David Miller
  2019-07-23  9:52   ` Maciej Żenczykowski
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2019-07-22 19:11 UTC (permalink / raw)
  To: zenczykowski; +Cc: maze, netdev, lorenzo, reminv, raorn

From: Maciej Żenczykowski <zenczykowski@gmail.com>
Date: Thu, 18 Jul 2019 23:30:03 -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 and DNSSL that
> also contain opaque data that needs to be passed down to userspace.
> 
> As specified in RFC7710, Captive Portal option contains a URL.
> 8-bit identifier of the option type as assigned by the IANA is 37.
> This option should also be treated as userland.
> 
> Hence, treat ND option 37 as userland (Captive Portal support)
> 
> See:
>   https://tools.ietf.org/html/rfc7710
>   https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml
> 
> Fixes: e35f30c131a56
> Signed-off-by: Maciej Żenczykowski <maze@google.com>

Applied to net-next.

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

* Re: [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier
  2019-07-22 19:11 ` David Miller
@ 2019-07-23  9:52   ` Maciej Żenczykowski
  2019-07-23 18:46     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej Żenczykowski @ 2019-07-23  9:52 UTC (permalink / raw)
  To: David Miller; +Cc: Linux NetDev, Lorenzo Colitti, Remi NGUYEN VAN, raorn

> Applied to net-next

Any chance we could get this into LTS releases?

I can trivially backport this into Android common kernels - which
would get this into the kernel in time for devices that launch with
Android R, but by getting it into LTS we'd get this support even on
devices that upgrade to Android R (ie. it speeds things up by about 2
years).

Thanks,
Maciej

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

* Re: [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier
  2019-07-23  9:52   ` Maciej Żenczykowski
@ 2019-07-23 18:46     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-07-23 18:46 UTC (permalink / raw)
  To: zenczykowski; +Cc: netdev, lorenzo, reminv, raorn

From: Maciej Żenczykowski <zenczykowski@gmail.com>
Date: Tue, 23 Jul 2019 17:52:17 +0800

>> Applied to net-next
> 
> Any chance we could get this into LTS releases?

It's a new feature, not a bug fix.  So no.

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

end of thread, other threads:[~2019-07-23 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19  6:30 [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier Maciej Żenczykowski
2019-07-22 19:11 ` David Miller
2019-07-23  9:52   ` Maciej Żenczykowski
2019-07-23 18:46     ` 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).