Fix return value at nfattr_bad_size
Subsystems (2)
Pablo Neira
maintainerPATCH 1/8 Fix return value at nfattr_bad_size
Return -EINVAL if the size isn't OK instead of -EPERM.
Signed-off-by Pablo Neira Ayuso <[email protected]>
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
Return -EINVAL if the size isn't OK instead of -EPERM.
Signed-off-by Pablo Neira Ayuso <[email protected]>
net/ipv4/netfilter/ip_conntrack_netlink.c +1 -1
@@ -593,7 +593,7 @@ static int ctnetlink_parse_nat_proto(strnfattr_parse_nested (tb,CTA_PROTONAT_MAX , attr);if (nfattr_bad_size (tb,CTA_PROTONAT_MAX , cta_min_protonat)) -return -1 ; +return -EINVAL ; npt =ip_nat_proto_find_get (ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.protonum);if (!npt)
Harald Welte
AppliedQuoted 1 line · Pablo Neira
Return
-EINVALif the size isn't OK instead of-EPERM.
thanks, applied.
Signature · 5 lines
- Harald Welte <[email protected]> http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie