aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2007-12-07 03:44:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:47 -0500
commite2fddf5e96df4ac26f2e9ce63053d51cdf3cfe1e (patch)
tree283cf8f8c64fedd4d1565fc4210c2f29c154d00d /net
parent433d49c3bb14b8a2351fe97df8359e4ad0de4c7c (diff)
[IPV6]: Make af_inet6 to check ip6_route_init return value.
The af_inet6 initialization function does not check the return code of the route initilization, so if something goes wrong, the protocol initialization will continue anyway. This patch takes into account the modification made in the different route's initialization subroutines to check the return value and to make the protocol initialization to fail. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/af_inet6.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 64135e2a3098..5ab8ba7a5863 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -849,7 +849,9 @@ static int __init inet6_init(void)
849 if (if6_proc_init()) 849 if (if6_proc_init())
850 goto proc_if6_fail; 850 goto proc_if6_fail;
851#endif 851#endif
852 ip6_route_init(); 852 err = ip6_route_init();
853 if (err)
854 goto ip6_route_fail;
853 ip6_flowlabel_init(); 855 ip6_flowlabel_init();
854 err = addrconf_init(); 856 err = addrconf_init();
855 if (err) 857 if (err)
@@ -874,6 +876,7 @@ out:
874addrconf_fail: 876addrconf_fail:
875 ip6_flowlabel_cleanup(); 877 ip6_flowlabel_cleanup();
876 ip6_route_cleanup(); 878 ip6_route_cleanup();
879ip6_route_fail:
877#ifdef CONFIG_PROC_FS 880#ifdef CONFIG_PROC_FS
878 if6_proc_exit(); 881 if6_proc_exit();
879proc_if6_fail: 882proc_if6_fail:
@@ -904,6 +907,7 @@ icmp_fail:
904 cleanup_ipv6_mibs(); 907 cleanup_ipv6_mibs();
905out_unregister_sock: 908out_unregister_sock:
906 sock_unregister(PF_INET6); 909 sock_unregister(PF_INET6);
910 rtnl_unregister_all(PF_INET6);
907out_unregister_raw_proto: 911out_unregister_raw_proto:
908 proto_unregister(&rawv6_prot); 912 proto_unregister(&rawv6_prot);
909out_unregister_udplite_proto: 913out_unregister_udplite_proto: