aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-07-11 15:10:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-11 18:05:45 -0400
commitbc91b0f07ada5535427373a4e2050877bcc12218 (patch)
tree9987f86cc3c8a141d595fc8d29c04a67debd0723 /include/uapi
parent279f64b7a771d84cbdea51ac2f794becfb06bcd4 (diff)
ipv6: addrconf: implement address generation modes
This patch introduces a possibility for userspace to set various (so far two) modes of generating addresses. This is useful for example for NetworkManager because it can set the mode to NONE and take care of link local addresses itself. That allow it to have the interface up, monitoring carrier but still don't have any addresses on it. One more use-case by Dan Williams: <quote> WWAN devices often have their LL address provided by the firmware of the device, which sometimes refuses to respond to incorrect LL addresses when doing DHCPv6 or IPv6 ND. The kernel cannot generate the correct LL address for two reasons: 1) WWAN pseudo-ethernet interfaces often construct a fake MAC address, or read a meaningless MAC address from the firmware. Thus the EUI64 and the IPv6LL address the kernel assigns will be wrong. The real LL address is often retrieved from the firmware with AT or proprietary commands. 2) WWAN PPP interfaces receive their LL address from IPV6CP, not from kernel assignments. Only after IPV6CP has completed do we know the LL address of the PPP interface and its peer. But the kernel has already assigned an incorrect LL address to the interface. So being able to suppress the kernel LL address generation and assign the one retrieved from the firmware is less complicated and more robust. </quote> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/if_link.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index b38534895db5..ff957604a721 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -204,11 +204,17 @@ enum {
204 IFLA_INET6_CACHEINFO, /* time values and max reasm size */ 204 IFLA_INET6_CACHEINFO, /* time values and max reasm size */
205 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ 205 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
206 IFLA_INET6_TOKEN, /* device token */ 206 IFLA_INET6_TOKEN, /* device token */
207 IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */
207 __IFLA_INET6_MAX 208 __IFLA_INET6_MAX
208}; 209};
209 210
210#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) 211#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
211 212
213enum in6_addr_gen_mode {
214 IN6_ADDR_GEN_MODE_EUI64,
215 IN6_ADDR_GEN_MODE_NONE,
216};
217
212enum { 218enum {
213 BRIDGE_MODE_UNSPEC, 219 BRIDGE_MODE_UNSPEC,
214 BRIDGE_MODE_HAIRPIN, 220 BRIDGE_MODE_HAIRPIN,