summaryrefslogtreecommitdiffstats
path: root/lib/session.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2017-09-19 21:43:29 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2017-09-23 13:03:55 +0200
commit6728c0b2c9c372cc821c3f03736c0ad89a44ef50 (patch)
treeeb9f6f45918a9487cf2527390423c8c76904da9f /lib/session.c
parenta35e725a279c3de81a1cac785040216ef89ce792 (diff)
Handle padding attribute properly in userspace.
Diffstat (limited to 'lib/session.c')
-rw-r--r--lib/session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/session.c b/lib/session.c
index 1bdaaa7..403ed23 100644
--- a/lib/session.c
+++ b/lib/session.c
@@ -514,6 +514,10 @@ static const struct ipset_attr_policy adt_attrs[] = {
.type = MNL_TYPE_U16,
.opt = IPSET_OPT_SKBQUEUE,
},
+ [IPSET_ATTR_PAD] = {
+ .type = MNL_TYPE_UNSPEC,
+ .len = 0,
+ },
};
static const struct ipset_attr_policy ipaddr_attrs[] = {
@@ -593,6 +597,8 @@ attr2data(struct ipset_session *session, struct nlattr *nla[],
attr = &attrs[type];
d = mnl_attr_get_payload(nla[type]);
+ if (attr->type == MNL_TYPE_UNSPEC)
+ return 0;
if (attr->type == MNL_TYPE_NESTED && attr->opt) {
/* IP addresses */
struct nlattr *ipattr[IPSET_ATTR_IPADDR_MAX+1] = {};