From: Jesse Gross Date: Mon, 10 May 2010 23:16:33 +0000 (-0700) Subject: vport: Record and free packets on unattached ports. X-Git-Tag: v1.0.0~24 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f7cf2ff0b63dc76af9358282dcbe81e9433a94ae;p=sliver-openvswitch.git vport: Record and free packets on unattached ports. We throw away packets that are received on vports not attached to a datapath but we are actually leaking them. This records that an error took place and frees the skb. --- diff --git a/datapath/vport.c b/datapath/vport.c index 5e164a914..716a45883 100644 --- a/datapath/vport.c +++ b/datapath/vport.c @@ -1047,8 +1047,12 @@ vport_receive(struct vport *vport, struct sk_buff *skb) { struct dp_port *dp_port = vport_get_dp_port(vport); - if (!dp_port) + if (!dp_port) { + vport_record_error(vport, VPORT_E_RX_DROPPED); + kfree_skb(skb); + return; + } if (vport->ops->flags & VPORT_F_GEN_STATS) { struct vport_percpu_stats *stats;