Commit 8e350ce1 authored by Florent Fourcot's avatar Florent Fourcot Committed by Pablo Neira Ayuso

netfilter: ipset: fix ip_set_byindex function

New function added by "Introduction of new commands and protocol
version 7" is not working, since we return skb2 to user
Signed-off-by: default avatarVictorien Molle <victorien.molle@wifirst.fr>
Signed-off-by: default avatarFlorent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 6ed5943f
...@@ -1949,7 +1949,7 @@ static int ip_set_byindex(struct net *net, struct sock *ctnl, ...@@ -1949,7 +1949,7 @@ static int ip_set_byindex(struct net *net, struct sock *ctnl,
if (!nlh2) if (!nlh2)
goto nlmsg_failure; goto nlmsg_failure;
if (nla_put_u8(skb2, IPSET_ATTR_PROTOCOL, protocol(attr)) || if (nla_put_u8(skb2, IPSET_ATTR_PROTOCOL, protocol(attr)) ||
nla_put_string(skb, IPSET_ATTR_SETNAME, set->name)) nla_put_string(skb2, IPSET_ATTR_SETNAME, set->name))
goto nla_put_failure; goto nla_put_failure;
nlmsg_end(skb2, nlh2); nlmsg_end(skb2, nlh2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment