[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>
This commit is contained in:
committed by
David S. Miller
parent
0a3e78ac2c
commit
248b238dc9
@ -859,10 +859,11 @@ static int __init inet6_init(void)
|
||||
goto addrconf_fail;
|
||||
|
||||
/* Init v6 extension headers. */
|
||||
ipv6_rthdr_init();
|
||||
err = ipv6_exthdrs_init();
|
||||
if (err)
|
||||
goto ipv6_exthdrs_fail;
|
||||
|
||||
ipv6_frag_init();
|
||||
ipv6_nodata_init();
|
||||
ipv6_destopt_init();
|
||||
|
||||
/* Init v6 transport protocols. */
|
||||
udpv6_init();
|
||||
@ -874,6 +875,8 @@ static int __init inet6_init(void)
|
||||
out:
|
||||
return err;
|
||||
|
||||
ipv6_exthdrs_fail:
|
||||
addrconf_cleanup();
|
||||
addrconf_fail:
|
||||
ip6_flowlabel_cleanup();
|
||||
ip6_flowlabel_fail:
|
||||
@ -932,6 +935,7 @@ static void __exit inet6_exit(void)
|
||||
/* Cleanup code parts. */
|
||||
ipv6_packet_cleanup();
|
||||
|
||||
ipv6_exthdrs_exit();
|
||||
addrconf_cleanup();
|
||||
ip6_flowlabel_cleanup();
|
||||
ip6_route_cleanup();
|
||||
|
Reference in New Issue
Block a user