Skip to content

Commit c24a77e

Browse files
zenczykowskidavem330
authored andcommitted
ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier
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 <[email protected]> Cc: Jen Linkova <[email protected]> Cc: Lorenzo Colitti <[email protected]> Cc: Michael Haro <[email protected]> Signed-off-by: Maciej Żenczykowski <[email protected]> Acked-By: Lorenzo Colitti <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a47ab26 commit c24a77e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/net/ndisc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ enum {
4141
ND_OPT_DNSSL = 31, /* RFC6106 */
4242
ND_OPT_6CO = 34, /* RFC6775 */
4343
ND_OPT_CAPTIVE_PORTAL = 37, /* RFC7710 */
44+
ND_OPT_PREF64 = 38, /* RFC-ietf-6man-ra-pref64-09 */
4445
__ND_OPT_MAX
4546
};
4647

net/ipv6/ndisc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static inline int ndisc_is_useropt(const struct net_device *dev,
197197
return opt->nd_opt_type == ND_OPT_RDNSS ||
198198
opt->nd_opt_type == ND_OPT_DNSSL ||
199199
opt->nd_opt_type == ND_OPT_CAPTIVE_PORTAL ||
200+
opt->nd_opt_type == ND_OPT_PREF64 ||
200201
ndisc_ops_is_useropt(dev, opt->nd_opt_type);
201202
}
202203

0 commit comments

Comments
 (0)