]> granicus.if.org Git - ipset/commitdiff
ipset: Handle properly an IPSET_CMD_NONE
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Thu, 28 Jun 2012 12:57:48 +0000 (15:57 +0300)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 29 Jun 2012 19:20:25 +0000 (21:20 +0200)
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_core.c

index 27f35acf636c0ece2a6f4e6c16f4f3a36ff9dcfb..f5e1ac8cfe066512f82ef19a1fc47850674117cf 100644 (file)
@@ -647,6 +647,14 @@ find_free_id(const char *name, ip_set_id_t *index, struct ip_set **set)
        return 0;
 }
 
+static int
+ip_set_none(struct sock *ctnl, struct sk_buff *skb,
+           const struct nlmsghdr *nlh,
+           const struct nlattr * const attr[])
+{
+       return -EOPNOTSUPP;
+}
+
 static int
 ip_set_create(struct sock *ctnl, struct sk_buff *skb,
              const struct nlmsghdr *nlh,
@@ -1557,6 +1565,10 @@ nlmsg_failure:
 }
 
 static const struct nfnl_callback ip_set_netlink_subsys_cb[IPSET_MSG_MAX] = {
+       [IPSET_CMD_NONE]        = {
+               .call           = ip_set_none,
+               .attr_count     = IPSET_ATTR_CMD_MAX,
+       },
        [IPSET_CMD_CREATE]      = {
                .call           = ip_set_create,
                .attr_count     = IPSET_ATTR_CMD_MAX,