From: Cosmin Ratiu <cratiu@ixiacom.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, netdev@vger.kernel.org, opurdila@ixiacom.com
Subject: Re: [PATCH] make TLLAO option for NA packets configurable
Date: Thu, 1 Oct 2009 21:08:40 +0300 [thread overview]
Message-ID: <200910012108.41071.cratiu@ixiacom.com> (raw)
In-Reply-To: <20091001.094356.95174955.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
On Thursday 01 October 2009 19:43:56 David Miller wrote:
> Using CLT_UNNUMBERED is a must these days.
>
> Also, please fix the prefixing of the paths in your patch.
> See Documentation/SubmittingPatches in the kernel tree.
Here is the new variant. Please let me know what you think.
And I apologize for using [PATCH] instead of [RFC] in the subject, I don't
know much about netdev protocol (yet).
Cosmin.
[-- Attachment #2: 0001-ipv6-new-sysctl-for-sending-TLLAO-with-NAs.patch --]
[-- Type: text/x-patch, Size: 2274 bytes --]
From 1911a98df800cedf4c3a63b897163e2935c5f602 Mon Sep 17 00:00:00 2001
From: Cosmin Ratiu <cratiu@ixiacom.com>
Date: Thu, 1 Oct 2009 20:27:39 +0300
Subject: [PATCH] ipv6: new sysctl for sending TLLAO with NAs
Neighbor advertisements responding to unicast Neighbor Solicitations did
not include the TLLAO option. This patch makes this configurable via
/proc/sys/net/ipv6/ndisc_force_tllao, which by default is off.
The need for this arose because certain routers expect the TLLAO in some
situations even as a response to unicast NS packets.
Moreover, RFC 2461 recommends on page 24 sending this to avoid a race.
Signed-off-by: Cosmin Ratiu <cratiu@ixiacom.com>
---
include/net/netns/ipv6.h | 1 +
net/ipv6/ndisc.c | 1 +
net/ipv6/sysctl_net_ipv6.c | 8 ++++++++
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index dfeb2d7..dd0a95b 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -16,6 +16,7 @@ struct netns_sysctl_ipv6 {
struct ctl_table_header *frags_hdr;
#endif
int bindv6only;
+ int ndisc_force_tllao;
int flush_delay;
int ip6_rt_max_size;
int ip6_rt_gc_min_interval;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index f74e4e2..f08cf65 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -598,6 +598,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
icmp6h.icmp6_solicited = solicited;
icmp6h.icmp6_override = override;
+ inc_opt |= dev_net(dev)->ipv6.sysctl.ndisc_force_tllao;
__ndisc_send(dev, neigh, daddr, src_addr,
&icmp6h, solicited_addr,
inc_opt ? ND_OPT_TARGET_LL_ADDR : 0);
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 0dc6a4e..fb423ce 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -37,6 +37,14 @@ static ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_dointvec
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "ndisc_force_tllao",
+ .data = &init_net.ipv6.sysctl.ndisc_force_tllao,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec
+ },
{ .ctl_name = 0 }
};
--
1.6.3.3
next prev parent reply other threads:[~2009-10-01 18:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 16:16 [PATCH] make TLLAO option for NA packets configurable Cosmin Ratiu
2009-10-01 16:21 ` Stephen Hemminger
2009-10-01 16:43 ` Cosmin Ratiu
2009-10-01 16:43 ` David Miller
2009-10-01 18:08 ` Cosmin Ratiu [this message]
2009-10-01 18:14 ` Stephen Hemminger
2009-10-01 18:39 ` Octavian Purdila
2009-10-01 18:56 ` Stephen Hemminger
2009-10-01 19:37 ` David Miller
2009-10-01 22:19 ` Octavian Purdila
2009-10-02 17:53 ` Stephen Hemminger
2009-10-02 21:39 ` Octavian Purdila
2009-10-07 8:29 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910012108.41071.cratiu@ixiacom.com \
--to=cratiu@ixiacom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).