Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openvswitch: Drop packets when interdev is not up

If the internal device is not up, it should drop received
packets. Sometimes it receive the broadcast or multicast
packets, and the ip protocol stack will casue more cpu
usage wasted.

Signed-off-by: Chunhe Li <lichunhe@huawei.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

authored by

Chunhe Li and committed by
Pravin B Shelar
e1f9c356 cc3a5ae6

+5
+5
net/openvswitch/vport-internal_dev.c
··· 224 224 struct net_device *netdev = netdev_vport_priv(vport)->dev; 225 225 int len; 226 226 227 + if (unlikely(!(netdev->flags & IFF_UP))) { 228 + kfree_skb(skb); 229 + return 0; 230 + } 231 + 227 232 len = skb->len; 228 233 229 234 skb_dst_drop(skb);