]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ipvs: use IPVS_CMD_ATTR_MAX for family.maxattr
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 4 Nov 2016 00:14:03 +0000 (17:14 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 Nov 2016 22:53:30 +0000 (23:53 +0100)
family.maxattr is the max index for policy[], the size of
ops[] is determined with ARRAY_SIZE().

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_ctl.c

index c3c809b2e7122daabac5b45ffed67979e0fecb28..a6e44ef2ec9a97dfd23ced452f2ec260e57f884c 100644 (file)
@@ -2845,7 +2845,7 @@ static struct genl_family ip_vs_genl_family = {
        .hdrsize        = 0,
        .name           = IPVS_GENL_NAME,
        .version        = IPVS_GENL_VERSION,
-       .maxattr        = IPVS_CMD_MAX,
+       .maxattr        = IPVS_CMD_ATTR_MAX,
        .netnsok        = true,         /* Make ipvsadm to work on netns */
 };