From b75b7778cc2cfde399abbcf417d15e60618a7bd3 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 30 Dec 2008 10:25:50 -0800 Subject: [PATCH] brcompat: Remove policy from Netlink code. Policies are only useful for data that is received by a Netlink socket. They do not apply to data that is sent out. Since this code does not parse the messages that it receives at all, it does not need any policy. --- datapath/brcompat.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/datapath/brcompat.c b/datapath/brcompat.c index adb761e1..a5652f81 100644 --- a/datapath/brcompat.c +++ b/datapath/brcompat.c @@ -79,12 +79,6 @@ static struct genl_family brc_genl_family = { .maxattr = BRC_GENL_A_MAX, }; -/* Attribute policy: what each attribute may contain. */ -static struct nla_policy brc_genl_policy[BRC_GENL_A_MAX + 1] = { - [BRC_GENL_A_DP_NAME] = { .type = NLA_STRING }, - [BRC_GENL_A_PORT_NAME] = { .type = NLA_STRING } -}; - static int brc_genl_query(struct sk_buff *skb, struct genl_info *info) { int err = -EINVAL; @@ -115,7 +109,7 @@ nla_put_failure: static struct genl_ops brc_genl_ops_query_dp = { .cmd = BRC_GENL_C_QUERY_MC, .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privelege. */ - .policy = brc_genl_policy, + .policy = NULL, .doit = brc_genl_query, .dumpit = NULL }; -- 2.30.2