alistair23-linux/net/ipv6
Hannes Frederic Sowa 622c81d57b ipv6: generation of stable privacy addresses for link-local and autoconf
This patch implements the stable privacy address generation for
link-local and autoconf addresses as specified in RFC7217.

  RID = F(Prefix, Net_Iface, Network_ID, DAD_Counter, secret_key)

is the RID (random identifier). As the hash function F we chose one
round of sha1. Prefix will be either the link-local prefix or the
router advertised one. As Net_Iface we use the MAC address of the
device. DAD_Counter and secret_key are implemented as specified.

We don't use Network_ID, as it couples the code too closely to other
subsystems. It is specified as optional in the RFC.

As Net_Iface we only use the MAC address: we simply have no stable
identifier in the kernel we could possibly use: because this code might
run very early, we cannot depend on names, as they might be changed by
user space early on during the boot process.

A new address generation mode is introduced,
IN6_ADDR_GEN_MODE_STABLE_PRIVACY. With iproute2 one can switch back to
none or eui64 address configuration mode although the stable_secret is
already set.

We refuse writes to ipv6/conf/all/stable_secret but only allow
ipv6/conf/default/stable_secret and the interface specific file to be
written to. The default stable_secret is used as the parameter for the
namespace, the interface specific can overwrite the secret, e.g. when
switching a network configuration from one system to another while
inheriting the secret.

Cc: Erik Kline <ek@google.com>
Cc: Fernando Gont <fgont@si6networks.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: YOSHIFUJI Hideaki/吉藤英明 <hideaki.yoshifuji@miraclelinux.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-23 22:12:08 -04:00
..
netfilter netfilter: ip6t_REJECT: check for IP6T_F_PROTO 2015-03-22 20:02:46 +01:00
addrconf.c ipv6: generation of stable privacy addresses for link-local and autoconf 2015-03-23 22:12:08 -04:00
addrconf_core.c ipv6: remove rt6i_genid 2014-09-30 14:00:48 -04:00
addrlabel.c net: Introduce possible_net_t 2015-03-12 14:39:40 -04:00
af_inet6.c net: use common macro for assering skb->cb[] available size in protocol families 2015-03-02 00:19:30 -05:00
ah6.c ipv6: coding style improvements (remove assignment in if statements) 2014-11-23 21:00:56 -05:00
anycast.c ipv6: invert join/leave anycast rtnl/socket locking order 2015-03-20 13:32:38 -04:00
datagram.c ip: fix error queue empty skb handling 2015-03-08 23:01:54 -04:00
esp6.c ipv6: coding style improvements (remove assignment in if statements) 2014-11-23 21:00:56 -05:00
exthdrs.c net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00
exthdrs_core.c ipv6: ipv6_find_hdr restore prev functionality 2014-02-27 18:27:26 -05:00
exthdrs_offload.c ipv6: Fix exthdrs offload registration. 2014-03-06 16:35:55 -05:00
fib6_rules.c ipv6: fix backtracking for throw routes 2015-03-20 12:57:23 -04:00
icmp.c ipv6:icmp:remove unnecessary brackets 2015-01-14 16:35:49 -05:00
inet6_connection_sock.c net: convert syn_wait_lock to a spinlock 2015-03-23 16:52:26 -04:00
inet6_hashtables.c inet: get rid of last __inet_hash_connect() argument 2015-03-18 22:00:35 -04:00
ip6_checksum.c udp: Generic functions to set checksum 2014-06-04 22:46:38 -07:00
ip6_fib.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
ip6_flowlabel.c net: Kill hold_net release_net 2015-03-12 14:39:40 -04:00
ip6_gre.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-02-05 14:33:28 -08:00
ip6_icmp.c ipv6: White-space cleansing : Line Layouts 2014-08-24 22:37:52 -07:00
ip6_input.c ipv6: coding style improvements (remove assignment in if statements) 2014-11-23 21:00:56 -05:00
ip6_offload.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-29 20:47:48 -08:00
ip6_offload.h ipv6: Pull IPv6 GSO registration out of the module 2012-11-15 17:39:24 -05:00
ip6_output.c xps: must clear sender_cpu before forwarding 2015-03-11 23:51:18 -04:00
ip6_tunnel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
ip6_udp_tunnel.c udp: Do not require sock in udp_tunnel_xmit_skb 2015-01-24 23:15:40 -08:00
ip6_vti.c tunnels: advertise link netns via netlink 2015-01-19 14:32:03 -05:00
ip6mr.c net: Introduce possible_net_t 2015-03-12 14:39:40 -04:00
ipcomp6.c ipv6: White-space cleansing : Structure layouts 2014-08-24 22:37:52 -07:00
ipv6_sockglue.c ipv6: invert join/leave anycast rtnl/socket locking order 2015-03-20 13:32:38 -04:00
Kconfig ip6_vti: Fix build when NET_IP_TUNNEL is not set. 2014-02-20 14:29:49 +01:00
Makefile udp_tunnel: Only build ip6_udp_tunnel.c when IPV6 is selected 2014-09-19 22:05:28 -04:00
mcast.c ipv4, ipv6: kill ip_mc_{join, leave}_group and ipv6_sock_mc_{join, drop} 2015-03-18 22:05:09 -04:00
mip6.c net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00
ndisc.c neigh: Factor out ___neigh_lookup_noref 2015-03-04 00:23:23 -05:00
netfilter.c net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00
output_core.c ipv6: Make __ipv6_select_ident static 2015-02-09 14:21:03 -08:00
ping.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-09 23:38:02 -04:00
proc.c udp: Increment UDP_MIB_IGNOREDMULTI for arriving unmatched multicasts 2014-11-07 15:45:50 -05:00
protocol.c net: Export inet_offloads and inet6_offloads 2014-09-19 17:15:31 -04:00
raw.c net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
reassembly.c ipv6: coding style improvements (remove assignment in if statements) 2014-11-23 21:00:56 -05:00
route.c ipv6: expose RFC4191 route preference via rtnetlink 2015-03-11 23:28:09 -04:00
sit.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-02-05 14:33:28 -08:00
syncookies.c inet: get rid of central tcp/dccp listener timer 2015-03-20 12:40:25 -04:00
sysctl_net_ipv6.c ipv6: add sysctl_mld_qrv to configure query robustness variable 2014-09-04 22:26:14 -07:00
tcp_ipv6.c ipv6: tcp: handle ICMP messages on TCP_NEW_SYN_RECV request sockets 2015-03-23 16:52:26 -04:00
tcpv6_offload.c tcp: cleanup static functions 2015-02-28 16:56:51 -05:00
tunnel6.c ipv6: White-space cleansing : gaps between function and symbol export 2014-08-24 22:37:52 -07:00
udp.c netns: constify net_hash_mix() and various callers 2015-03-18 22:00:34 -04:00
udp_impl.h net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
udp_offload.c ipv6: call ipv6_proxy_select_ident instead of ipv6_select_ident in udp6_ufo_fragment 2015-03-20 12:56:11 -04:00
udplite.c net: Eliminate no_check from protosw 2014-05-23 16:28:53 -04:00
xfrm6_input.c ipv6: White-space cleansing : gaps between function and symbol export 2014-08-24 22:37:52 -07:00
xfrm6_mode_beet.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm6_mode_ro.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c xfrm6: Remove xfrm_tunnel_notifier 2014-03-14 07:28:08 +01:00
xfrm6_output.c xfrm: Fix local error reporting crash with interfamily tunnels 2015-02-09 11:14:17 +01:00
xfrm6_policy.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
xfrm6_protocol.c xfrm6: Properly handle unsupported protocols 2014-05-06 07:08:38 +02:00
xfrm6_state.c ipv6: White-space cleansing : Line Layouts 2014-08-24 22:37:52 -07:00
xfrm6_tunnel.c ipv6: White-space cleansing : gaps between function and symbol export 2014-08-24 22:37:52 -07:00