Skip to content

Commit

Permalink
[IPV6]: Make af_inet6 to check ip6_route_init return value.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Lezcano authored and davem330 committed Jan 28, 2008
1 parent 433d49c commit e2fddf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,9 @@ static int __init inet6_init(void)
if (if6_proc_init())
goto proc_if6_fail;
#endif
ip6_route_init();
err = ip6_route_init();
if (err)
goto ip6_route_fail;
ip6_flowlabel_init();
err = addrconf_init();
if (err)
Expand All @@ -874,6 +876,7 @@ static int __init inet6_init(void)
addrconf_fail:
ip6_flowlabel_cleanup();
ip6_route_cleanup();
ip6_route_fail:
#ifdef CONFIG_PROC_FS
if6_proc_exit();
proc_if6_fail:
Expand Down Expand Up @@ -904,6 +907,7 @@ static int __init inet6_init(void)
cleanup_ipv6_mibs();
out_unregister_sock:
sock_unregister(PF_INET6);
rtnl_unregister_all(PF_INET6);
out_unregister_raw_proto:
proto_unregister(&rawv6_prot);
out_unregister_udplite_proto:
Expand Down

0 comments on commit e2fddf5

Please sign in to comment.