From a5b60e80eeed87763c811ecfb0d7aa5695d0a2bf Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sun, 12 Dec 2010 00:06:48 +0100 Subject: [PATCH 1/2] ipv6: export DNS search list option to userspace Like DNS resolver addresses, the suffixes to be used in DNS lookups need to be configured by userspace. Make sure userspace has access to the option containing that information. Signed-off-by: Pierre Ossman --- include/net/ndisc.h | 3 ++- net/ipv6/ndisc.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 895997b..9c8698a 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -33,7 +33,8 @@ enum { ND_OPT_MTU = 5, /* RFC2461 */ __ND_OPT_ARRAY_MAX, ND_OPT_ROUTE_INFO = 24, /* RFC4191 */ - ND_OPT_RDNSS = 25, /* RFC5006 */ + ND_OPT_RDNSS = 25, /* RFC5006 / RFC6106 */ + ND_OPT_DNSSL = 31, /* RFC6106 */ __ND_OPT_MAX }; diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 58841c4..c5b01e3 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -233,7 +233,13 @@ static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, static inline int ndisc_is_useropt(struct nd_opt_hdr *opt) { - return (opt->nd_opt_type == ND_OPT_RDNSS); + switch (opt->nd_opt_type) { + case ND_OPT_RDNSS: + case ND_OPT_DNSSL: + return 1; + default: + return 0; + } } static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, -- 1.7.2.3