From: Ben Pfaff Date: Tue, 30 Dec 2008 18:25:50 +0000 (-0800) Subject: brcompat: Remove policy from Netlink code. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75b7778cc2cfde399abbcf417d15e60618a7bd3;p=openvswitch 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. --- 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 };