From: Jesse Gross Date: Mon, 10 May 2010 23:16:33 +0000 (-0700) Subject: vport: Record and free packets on unattached ports. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7cf2ff0b63dc76af9358282dcbe81e9433a94ae;p=openvswitch 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 5e164a91..716a4588 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;