Skip to contentSkip to conversation

net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier

PATCH Applied Maciej Żenczykowski 2 participants 4 messages Jul 19, 2019 – Jul 23, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier

From: Maciej Żenczykowski <[email protected]>

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
Cc Lorenzo Colitti <[email protected]>
Cc Remin Nguyen Van <[email protected]>
Cc Alexey I. Froloff <[email protected]>
---
 include/net/ndisc.h | 1 +
 net/ipv6/ndisc.c    | 1 +
 2 files changed, 2 insertions(+)
include/net/ndisc.h +1 -0
index 366150053043..b2f715ca0567 100644
@@ -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
 };
 
net/ipv6/ndisc.c +1 -0
index 083cc1c94cd3..53caf59c591e 100644
@@ -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);
 }
 
Signature · 1 line
2.22.0.657.g960e92d24f-goog
maintainer Applied
#1 lore raw

From: Maciej Żenczykowski <[email protected]>
Date: Thu, 18 Jul 2019 23:30:03 -0700

Quoted 10 lines

From: Maciej Żenczykowski <[email protected]>

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.

Quoted 8 lines

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

Applied to net-next.

#2 lore raw
Quoted 1 line

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

maintainer
#3 lore raw

From: Maciej Żenczykowski <[email protected]>
Date: Tue, 23 Jul 2019 17:52:17 +0800

Quoted 3 lines
Quoted 1 line

Applied to net-next

Any chance we could get this into LTS releases?

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