It's possible to encounter a few different errors when preparing
to send a packet to userspace in queue_control_packet().  This
ensures that if we encounter one of these problems, the issue is
properly recorded as a lost packet.

Signed-off-by: Jesse Gross <[email protected]>
---
 datapath/datapath.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 733acad..69b524c 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -441,7 +441,11 @@ int dp_upcall(struct datapath *dp, struct sk_buff *skb, 
const struct dp_upcall_i
                }
        }
 
-       return queue_control_packets(dp, skb, upcall_info);
+       err = queue_control_packets(dp, skb, upcall_info);
+       if (err)
+               goto err;
+
+       return 0;
 
 err_kfree_skb:
        kfree_skb(skb);
-- 
1.7.1


_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Reply via email to