Subject: Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

From: Patrick McHardy <[email-masked]>
Date: Wed, 21 Mar 2007 05:44:24 +0100

Thomas Graf wrote:
> Changes netlink_rcv_skb() to skip netlink controll messages and don't
> pass them on to the message handler.
> 
> Signed-off-by: Thomas Graf <[email-masked]>
> 
> Index: net-2.6.22/net/netlink/af_netlink.c
> ===================================================================
> --- net-2.6.22.orig/net/netlink/af_netlink.c	2007-03-21 01:17:13.000000000 +0100
> +++ net-2.6.22/net/netlink/af_netlink.c	2007-03-21 01:17:46.000000000 +0100
> @@ -1479,6 +1479,10 @@ static int netlink_rcv_skb(struct sk_buf
>  		if (!(nlh->nlmsg_flags & NLM_F_REQUEST))
>  			goto skip;
>  
> +		/* Skip control messages */
> +		if (nlh->nlmsg_type < NLMSG_MIN_TYPE)
> +			goto skip;
> +

This looks like it would break nfnetlink, which appears to be
using 0 as smallest message type.