[IPV6]: make the protocol initialization to return an error code
This patchset makes the different protocols to return an error code, so the af_inet6 module can check the initialization was correct or not. The raw6 was taken into account to be consistent with the rest of the protocols, but the registration is at the same place. Because the raw6 has its own init function, the proto and the ops structure can be moved inside the raw6.c file. 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
87c3efbfdd
commit
7f4e4868f3
@@ -1128,9 +1128,10 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
|
||||
EXPORT_SYMBOL(compat_ipv6_getsockopt);
|
||||
#endif
|
||||
|
||||
void __init ipv6_packet_init(void)
|
||||
int __init ipv6_packet_init(void)
|
||||
{
|
||||
dev_add_pack(&ipv6_packet_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ipv6_packet_cleanup(void)
|
||||
|
Reference in New Issue
Block a user