netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] Export DNSSL RA option to userspace
@ 2010-12-12 13:43 Pierre Ossman
  2010-12-12 13:47 ` [RFC][PATCH] Export all RA options that we don't handle " Pierre Ossman
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Pierre Ossman @ 2010-12-12 13:43 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy


[-- Attachment #1.1: Type: text/plain, Size: 766 bytes --]

RFC 6106 specifies a new RA option for DNS resolver configuration that
therefore needs to end up in userspace.

This first patch just exports the new option, but I started thinking
that this seems overly complex that the kernel needs to be updated
every time there is something new of interest to userspace in the RA.
So I also have a second patch that exports everything that the kernel
doesn't want.

Patches only compile tested so far as I'm still hacking away at
userspace. Comments very much welcome though.

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by FRA, a
  Swedish intelligence agency. Make sure your server uses
  encryption for SMTP traffic and consider using PGP for
  end-to-end encryption.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-ipv6-export-DNS-search-list-option-to-userspace.patch --]
[-- Type: text/x-patch, Size: 1544 bytes --]

From a5b60e80eeed87763c811ecfb0d7aa5695d0a2bf Mon Sep 17 00:00:00 2001
From: Pierre Ossman <pierre@ossman.eu>
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 <pierre@ossman.eu>
---
 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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

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

end of thread, other threads:[~2011-11-20 16:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 13:43 [RFC][PATCH] Export DNSSL RA option to userspace Pierre Ossman
2010-12-12 13:47 ` [RFC][PATCH] Export all RA options that we don't handle " Pierre Ossman
2011-01-20  8:15   ` Pierre Ossman
2011-11-20 14:00     ` Pierre Ossman
2011-11-20 16:29       ` David Miller
2011-03-03  1:30   ` Pierre Ynard
2010-12-12 14:07 ` [RFC][PATCH] Export DNSSL RA option " Pierre Ossman
2011-03-03  1:36   ` Pierre Ynard
2010-12-14 13:10 ` David Woodhouse
2010-12-14 13:43   ` Pierre Ossman
2010-12-16  1:18     ` Dan Williams
2011-03-03  1:27 ` Pierre Ynard

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).