Commit e1f9c356 authored by Chunhe Li's avatar Chunhe Li Committed by Pravin B Shelar

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: default avatarChunhe Li <lichunhe@huawei.com>
Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
parent cc3a5ae6
......@@ -224,6 +224,11 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb)
struct net_device *netdev = netdev_vport_priv(vport)->dev;
int len;
if (unlikely(!(netdev->flags & IFF_UP))) {
kfree_skb(skb);
return 0;
}
len = skb->len;
skb_dst_drop(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment