From ed4031e4676affcb39962942ff437382d8f30c27 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 15 Feb 2011 10:07:20 -0800 Subject: [PATCH] dpif-netdev: Fix segfault handling packets. Reported-by: Hassan Khan --- AUTHORS | 1 + lib/dpif-netdev.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index c48479fc..4116ada9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -50,6 +50,7 @@ Derek Cormier derek.cormier@lab.ntt.co.jp DK Moon dkmoon@nicira.com Gaetano Catalli gaetano.catalli@gmail.com Ghanem Bahri bahri.ghanem@gmail.com +Hassan Khan hassan.khan@seecs.edu.pk Hector Oron hector.oron@gmail.com Henrik Amren henrik@nicira.com Jad Naous jnaous@gmail.com diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 93dd1cde..035ceaed 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -1315,7 +1315,7 @@ dp_netdev_output_control(struct dp_netdev *dp, const struct ofpbuf *packet, upcall->key_len = key_len; upcall->userdata = arg; - q->upcalls[++q->head & QUEUE_MASK] = upcall; + q->upcalls[q->head++ & QUEUE_MASK] = upcall; return 0; } -- 2.30.2