projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc3a5ae
)
openvswitch: Drop packets when interdev is not up
author
Chunhe Li
<
[email protected]
>
Mon, 8 Sep 2014 20:17:21 +0000
(13:17 -0700)
committer
Pravin B Shelar
<
[email protected]
>
Thu, 6 Nov 2014 07:52:35 +0000
(23:52 -0800)
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 <
[email protected]
>
Signed-off-by: Pravin B Shelar <
[email protected]
>
net/openvswitch/vport-internal_dev.c
patch
|
blob
|
history
diff --git
a/net/openvswitch/vport-internal_dev.c
b/net/openvswitch/vport-internal_dev.c
index 10dc07e1678bcfceb638650869542a57399895ed..6a55f71055051957685b11e8950ba1e4197dce20 100644
(file)
--- a/
net/openvswitch/vport-internal_dev.c
+++ b/
net/openvswitch/vport-internal_dev.c
@@
-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);