aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/ip-sysctl.txt18
-rw-r--r--include/linux/ipv6.h1
-rw-r--r--net/ipv6/addrconf.c8
-rw-r--r--net/ipv6/ndisc.c1
4 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index fbe427a6580c..a0e134dd2523 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1086,6 +1086,24 @@ accept_dad - INTEGER
1086 2: Enable DAD, and disable IPv6 operation if MAC-based duplicate 1086 2: Enable DAD, and disable IPv6 operation if MAC-based duplicate
1087 link-local address has been found. 1087 link-local address has been found.
1088 1088
1089force_tllao - BOOLEAN
1090 Enable sending the target link-layer address option even when
1091 responding to a unicast neighbor solicitation.
1092 Default: FALSE
1093
1094 Quoting from RFC 2461, section 4.4, Target link-layer address:
1095
1096 "The option MUST be included for multicast solicitations in order to
1097 avoid infinite Neighbor Solicitation "recursion" when the peer node
1098 does not have a cache entry to return a Neighbor Advertisements
1099 message. When responding to unicast solicitations, the option can be
1100 omitted since the sender of the solicitation has the correct link-
1101 layer address; otherwise it would not have be able to send the unicast
1102 solicitation in the first place. However, including the link-layer
1103 address in this case adds little overhead and eliminates a potential
1104 race condition where the sender deletes the cached link-layer address
1105 prior to receiving a response to a previous solicitation."
1106
1089icmp/*: 1107icmp/*:
1090ratelimit - INTEGER 1108ratelimit - INTEGER
1091 Limit the maximal rates for sending ICMPv6 packets. 1109 Limit the maximal rates for sending ICMPv6 packets.
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index c662efa68289..ae74ede1abe7 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -167,6 +167,7 @@ struct ipv6_devconf {
167#endif 167#endif
168 __s32 disable_ipv6; 168 __s32 disable_ipv6;
169 __s32 accept_dad; 169 __s32 accept_dad;
170 __s32 force_tllao;
170 void *sysctl; 171 void *sysctl;
171}; 172};
172 173
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1fd0a3d775d2..bdcee6981c60 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4353,6 +4353,14 @@ static struct addrconf_sysctl_table
4353 .proc_handler = proc_dointvec, 4353 .proc_handler = proc_dointvec,
4354 }, 4354 },
4355 { 4355 {
4356 .ctl_name = CTL_UNNUMBERED,
4357 .procname = "force_tllao",
4358 .data = &ipv6_devconf.force_tllao,
4359 .maxlen = sizeof(int),
4360 .mode = 0644,
4361 .proc_handler = proc_dointvec
4362 },
4363 {
4356 .ctl_name = 0, /* sentinel */ 4364 .ctl_name = 0, /* sentinel */
4357 } 4365 }
4358 }, 4366 },
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index f74e4e2cdd06..3507cfe1e7a2 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,
598 icmp6h.icmp6_solicited = solicited; 598 icmp6h.icmp6_solicited = solicited;
599 icmp6h.icmp6_override = override; 599 icmp6h.icmp6_override = override;
600 600
601 inc_opt |= ifp->idev->cnf.force_tllao;
601 __ndisc_send(dev, neigh, daddr, src_addr, 602 __ndisc_send(dev, neigh, daddr, src_addr,
602 &icmp6h, solicited_addr, 603 &icmp6h, solicited_addr,
603 inc_opt ? ND_OPT_TARGET_LL_ADDR : 0); 604 inc_opt ? ND_OPT_TARGET_LL_ADDR : 0);