netfilter: ipset: Improve skbinfo get/init helpers
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 5 May 2015 15:13:28 +0000 (17:13 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 10 Nov 2016 12:28:42 +0000 (13:28 +0100)
commitbec810d973003b30bc477146904af6bd93fd2df8
tree8827ea88f940fc56af9d37e1dec31fcf521c1660
parent7ffea37957b900422ce8b82e9651f7a0a6fac733
netfilter: ipset: Improve skbinfo get/init helpers

Use struct ip_set_skbinfo in struct ip_set_ext instead of open
coded fields and assign structure members in get/init helpers
instead of copying members one by one. Explicitly note that
struct ip_set_skbinfo must be padded to prevent non-aligned
access in the extension blob.

Ported from a patch proposed by Sergey Popovich <popovich_sergei@mail.ua>.

Suggested-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
include/linux/netfilter/ipset/ip_set.h
net/netfilter/ipset/ip_set_core.c
net/netfilter/xt_set.c