summaryrefslogtreecommitdiffstats
path: root/net/netlink/genetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/genetlink.c')
-rw-r--r--net/netlink/genetlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 25eeb6d2a75a..a75ea33fb5ea 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -577,7 +577,7 @@ static int genl_family_rcv_msg(const struct genl_family *family,
577 577
578 if (attrbuf) { 578 if (attrbuf) {
579 err = nlmsg_parse(nlh, hdrlen, attrbuf, family->maxattr, 579 err = nlmsg_parse(nlh, hdrlen, attrbuf, family->maxattr,
580 ops->policy, extack); 580 family->policy, extack);
581 if (err < 0) 581 if (err < 0)
582 goto out; 582 goto out;
583 } 583 }
@@ -677,7 +677,7 @@ static int ctrl_fill_info(const struct genl_family *family, u32 portid, u32 seq,
677 op_flags |= GENL_CMD_CAP_DUMP; 677 op_flags |= GENL_CMD_CAP_DUMP;
678 if (ops->doit) 678 if (ops->doit)
679 op_flags |= GENL_CMD_CAP_DO; 679 op_flags |= GENL_CMD_CAP_DO;
680 if (ops->policy) 680 if (family->policy)
681 op_flags |= GENL_CMD_CAP_HASPOL; 681 op_flags |= GENL_CMD_CAP_HASPOL;
682 682
683 nest = nla_nest_start(skb, i + 1); 683 nest = nla_nest_start(skb, i + 1);
@@ -939,7 +939,6 @@ static const struct genl_ops genl_ctrl_ops[] = {
939 .cmd = CTRL_CMD_GETFAMILY, 939 .cmd = CTRL_CMD_GETFAMILY,
940 .doit = ctrl_getfamily, 940 .doit = ctrl_getfamily,
941 .dumpit = ctrl_dumpfamily, 941 .dumpit = ctrl_dumpfamily,
942 .policy = ctrl_policy,
943 }, 942 },
944}; 943};
945 944
@@ -957,6 +956,7 @@ static struct genl_family genl_ctrl __ro_after_init = {
957 .name = "nlctrl", 956 .name = "nlctrl",
958 .version = 0x2, 957 .version = 0x2,
959 .maxattr = CTRL_ATTR_MAX, 958 .maxattr = CTRL_ATTR_MAX,
959 .policy = ctrl_policy,
960 .netnsok = true, 960 .netnsok = true,
961}; 961};
962 962