summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorAshish Varma <ashishvarma.ovs@gmail.com>2018-03-05 15:04:01 -0800
committerBen Pfaff <blp@ovn.org>2018-03-05 17:05:16 -0800
commitc1e01fd1744d0948a01088a36e9f98c9b46b0d1e (patch)
tree665767c0dd32826b9e6f83fdf2e5e814ab68c685 /ofproto
parentd1ea2cc3de99f0695ca89b2bebe49452b2a1db07 (diff)
downloadopenvswitch-c1e01fd1744d0948a01088a36e9f98c9b46b0d1e.tar.gz
ofproto-dpif-upcall: fix for segmentation fault
Added check for NULL pointer on return from xlate_lookup_ofproto function. Access to "ofproto" variable when NULL was causing segmentation fault. VMware-BZ: #2061914 CC: Justin Pettit <jpettit@ovn.org> Fixes: d39ec23de384 ("ofproto-dpif: Don't slow-path controller actions.") Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-upcall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 9d8818095..7bfeedd02 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -2149,6 +2149,11 @@ revalidate_ukey__(struct udpif *udpif, const struct udpif_key *ukey,
ofproto = xlate_lookup_ofproto(udpif->backer, &ctx.flow, &ofp_in_port);
ofpbuf_clear(odp_actions);
+
+ if (!ofproto) {
+ goto exit;
+ }
+
compose_slow_path(udpif, xoutp, &ctx.flow, ctx.flow.in_port.odp_port,
ofp_in_port, odp_actions,
ofproto->up.slowpath_meter_id, &ofproto->uuid);