af_packet: Check return of dev_set_promiscuity/allmulti
authorWang Chen <wangchen@cn.fujitsu.com>
Tue, 15 Jul 2008 03:49:46 +0000 (20:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jul 2008 03:49:46 +0000 (20:49 -0700)
commit2aeb0b88b3c7a0e3bef55e7ff0efffd5d971aa57
tree5b944f469ab809b4e88f6b25b99e8488f58983ce
parentfc943b12e48f9341bce48c2fadf094cc721aab93
af_packet: Check return of dev_set_promiscuity/allmulti

dev_set_promiscuity/allmulti might overflow.  Commit: "netdevice: Fix
promiscuity and allmulti overflow" in net-next makes
dev_set_promiscuity/allmulti return error number if overflow happened.

In af_packet, we check all positive increment for promiscuity and
allmulti to get error return.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c