diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2007-12-11 05:23:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:10 -0500 |
commit | 248b238dc960a42aa235057ba0a51a98ae2b0f0d (patch) | |
tree | 0c655bde3e6a9ad24491fe3ec4edaba1bf9053f2 /net/ipv6/af_inet6.c | |
parent | 0a3e78ac2c555441f5bc00588070058533bc8d6b (diff) |
[IPV6]: make extended headers to return an error at initialization
This patch factorize the code for the differents init functions for rthdr,
nodata, destopt in a single function exthdrs_init.
This function returns an error so the af_inet6 module can check correctly
the initialization.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 614f3d905dd1..442c298c1d7c 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -859,10 +859,11 @@ static int __init inet6_init(void) | |||
859 | goto addrconf_fail; | 859 | goto addrconf_fail; |
860 | 860 | ||
861 | /* Init v6 extension headers. */ | 861 | /* Init v6 extension headers. */ |
862 | ipv6_rthdr_init(); | 862 | err = ipv6_exthdrs_init(); |
863 | if (err) | ||
864 | goto ipv6_exthdrs_fail; | ||
865 | |||
863 | ipv6_frag_init(); | 866 | ipv6_frag_init(); |
864 | ipv6_nodata_init(); | ||
865 | ipv6_destopt_init(); | ||
866 | 867 | ||
867 | /* Init v6 transport protocols. */ | 868 | /* Init v6 transport protocols. */ |
868 | udpv6_init(); | 869 | udpv6_init(); |
@@ -874,6 +875,8 @@ static int __init inet6_init(void) | |||
874 | out: | 875 | out: |
875 | return err; | 876 | return err; |
876 | 877 | ||
878 | ipv6_exthdrs_fail: | ||
879 | addrconf_cleanup(); | ||
877 | addrconf_fail: | 880 | addrconf_fail: |
878 | ip6_flowlabel_cleanup(); | 881 | ip6_flowlabel_cleanup(); |
879 | ip6_flowlabel_fail: | 882 | ip6_flowlabel_fail: |
@@ -932,6 +935,7 @@ static void __exit inet6_exit(void) | |||
932 | /* Cleanup code parts. */ | 935 | /* Cleanup code parts. */ |
933 | ipv6_packet_cleanup(); | 936 | ipv6_packet_cleanup(); |
934 | 937 | ||
938 | ipv6_exthdrs_exit(); | ||
935 | addrconf_cleanup(); | 939 | addrconf_cleanup(); |
936 | ip6_flowlabel_cleanup(); | 940 | ip6_flowlabel_cleanup(); |
937 | ip6_route_cleanup(); | 941 | ip6_route_cleanup(); |