History

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>

Jiri Pirko committed 12 years ago

Commit bc91b0f1 parent 279f64b3 files · +45 −18Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/if_link.h+6−0
@@ -204,11 +204,17 @@ enum { · 203 unmodified lines
204204 IFLA_INET6_CACHEINFO, /* time values and max reasm size */
205205 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
206206 IFLA_INET6_TOKEN, /* device token */
207+ IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */
207208 __IFLA_INET6_MAX
208209 };
209210
210211 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
211212
213+enum in6_addr_gen_mode {
214+ IN6_ADDR_GEN_MODE_EUI64,
215+ IN6_ADDR_GEN_MODE_NONE,
216+};
217+
212218 enum {
213219 BRIDGE_MODE_UNSPEC,
214220 BRIDGE_MODE_HAIRPIN,