linux/net/ipv4
Thomas Graf cf7afbfeb8 rtnl: make link af-specific updates atomic
As David pointed out correctly, updates to af-specific attributes
are currently not atomic. If multiple changes are requested and
one of them fails, previous updates may have been applied already
leaving the link behind in a undefined state.

This patch splits the function parse_link_af() into two functions
validate_link_af() and set_link_at(). validate_link_af() is placed
to validate_linkmsg() check for errors as early as possible before
any changes to the link have been made. set_link_af() is called to
commit the changes later.

This method is not fail proof, while it is currently sufficient
to make set_link_af() inerrable and thus 100% atomic, the
validation function method will not be able to detect all error
scenarios in the future, there will likely always be errors
depending on states which are f.e. not protected by rtnl_mutex
and thus may change between validation and setting.

Also, instead of silently ignoring unknown address families and
config blocks for address families which did not register a set
function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
returned to avoid comitting 4 out of 5 update requests without
notifying the user.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-27 22:56:08 -08:00
..
netfilter Net: ipv4: netfilter: Makefile: Remove deprecated kbuild goal definitions 2010-11-22 08:16:11 -08:00
af_inet.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
ah4.c
arp.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
cipso_ipv4.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
datagram.c
devinet.c rtnl: make link af-specific updates atomic 2010-11-27 22:56:08 -08:00
esp4.c
fib_frontend.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
fib_hash.c fib: Fix fib zone and its hash leak on namespace stop 2010-10-28 10:27:03 -07:00
fib_lookup.h fib: fib_result_assign() should not change fib refcounts 2010-11-04 12:05:32 -07:00
fib_rules.c fib: RCU conversion of fib_lookup() 2010-10-05 20:39:38 -07:00
fib_semantics.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
fib_trie.c fib: Fix fib zone and its hash leak on namespace stop 2010-10-28 10:27:03 -07:00
gre.c tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
icmp.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-11-19 13:13:47 -08:00
igmp.c igmp: refine skb allocations 2010-11-18 11:02:23 -08:00
inet_connection_sock.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
inet_diag.c inet_diag: Make sure we actually run the same bytecode we audited. 2010-11-04 12:26:34 -07:00
inet_fragment.c
inet_hashtables.c tproxy: fix hash locking issue when using port redirection in __inet_inherit_port() 2010-10-21 13:06:43 +02:00
inet_lro.c
inet_timewait_sock.c
inetpeer.c inetpeer: __rcu annotations 2010-10-27 11:37:33 -07:00
ip_forward.c
ip_fragment.c
ip_gre.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
ip_input.c
ip_options.c
ip_output.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
ip_sockglue.c ipv4: add __rcu annotations to ip_ra_chain 2010-10-25 14:18:28 -07:00
ipcomp.c
ipconfig.c
ipip.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
ipmr.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
Kconfig Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
Makefile
netfilter.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
proc.c net: avoid limits overflow 2010-11-10 12:12:00 -08:00
protocol.c net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
raw.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
route.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
syncookies.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
sysctl_net_ipv4.c net: avoid limits overflow 2010-11-10 12:12:00 -08:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_input.c net: avoid limits overflow 2010-11-10 12:12:00 -08:00
tcp_ipv4.c tcp: Don't change unlocked socket state in tcp_v4_err(). 2010-11-12 13:35:00 -08:00
tcp_lp.c
tcp_minisocks.c
tcp_output.c xps: Improvements in TX queue selection 2010-11-24 11:44:19 -08:00
tcp_probe.c net: ipv4: tcp_probe: cleanup snprintf() use 2010-11-17 12:27:46 -08:00
tcp_scalable.c
tcp_timer.c tcp: use correct counters in CA_CWR state too 2010-10-17 13:46:33 -07:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_westwood.c
tcp_yeah.c
tcp.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-11-14 11:57:05 -08:00
tunnel4.c tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00
udp_impl.h
udp.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c net: use the macros defined for the members of flowi 2010-11-17 12:27:45 -08:00
xfrm4_state.c
xfrm4_tunnel.c