Skip to content

Commit

Permalink
netfilter: nfnetlink: return ENOMEM if we fail to create netlink socket
Browse files Browse the repository at this point in the history
With this patch, nfnetlink returns -ENOMEM instead of -EPERM if we
fail to create the nfnetlink netlink socket during the module
loading. This is exactly what rtnetlink does in this case.

Ideally, it would be better if we propagate the error that has
happened in netlink_kernel_create(), however, this function still
does not implement this yet.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Pablo Neira Ayuso authored and Patrick McHardy committed Apr 17, 2009
1 parent 150ace0 commit a014273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nfnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static int __init nfnetlink_init(void)
nfnetlink_rcv, NULL, THIS_MODULE);
if (!nfnl) {
printk(KERN_ERR "cannot initialize nfnetlink!\n");
return -1;
return -ENOMEM;
}

return 0;
Expand Down

0 comments on commit a014273

Please sign in to comment.