Skip to content

Commit

Permalink
net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier
Browse files Browse the repository at this point in the history
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: e35f30c
Signed-off-by: Maciej Żenczykowski <[email protected]>
Cc: Lorenzo Colitti <[email protected]>
Cc: Remin Nguyen Van <[email protected]>
Cc: Alexey I. Froloff <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
zenczykowski authored and davem330 committed Jul 22, 2019
1 parent 7b5cf70 commit 66b5f1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/net/ndisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 66b5f1c

Please sign in to comment.