[NETLINK]: Ignore control messages directly in netlink_run_queue()
Changes netlink_rcv_skb() to skip netlink controll messages and don't pass them on to the message handler. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d35b685640
commit
45e7ae7f71
@@ -304,9 +304,6 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
struct genlmsghdr *hdr = nlmsg_data(nlh);
|
||||
int hdrlen, err = -EINVAL;
|
||||
|
||||
if (nlh->nlmsg_type < NLMSG_MIN_TYPE)
|
||||
goto ignore;
|
||||
|
||||
family = genl_family_find_byid(nlh->nlmsg_type);
|
||||
if (family == NULL) {
|
||||
err = -ENOENT;
|
||||
@@ -364,9 +361,6 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
*errp = err = ops->doit(skb, &info);
|
||||
return err;
|
||||
|
||||
ignore:
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
*errp = err;
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user