From: Guru Shetty [mailto:[email protected]]
Sent: Saturday, January 28, 2017 1:03 AM
To: Alin Serdean <[email protected]>
Cc: [email protected]
Subject: Re: [ovs-dev] [PATCH 1/3] ovn-trace: Possible null dereference



On 26 January 2017 at 23:14, Alin Serdean 
<[email protected]<mailto:[email protected]>> wrote:
Found by inspection.

Signed-off-by: Alin Gabriel Serdean 
<[email protected]<mailto:[email protected]>>
---
 ovn/utilities/ovn-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ovn/utilities/ovn-trace.c b/ovn/utilities/ovn-trace.c
index 307556b..2e2859a 100644
--- a/ovn/utilities/ovn-trace.c
+++ b/ovn/utilities/ovn-trace.c
@@ -1224,7 +1224,7 @@ execute_output(const struct ovntrace_datapath *dp, struct 
flow *uflow,
         }
     }

-    if (port->tunnel_key != in_key || allow_loopback) {
+    if (port && (port->tunnel_key != in_key || allow_loopback)) {
The parentheses above feels odd. Did you want (port &&   port->tunnel_key != 
in_key) ||  allow_loopback) ?
[Alin Serdean] That makes more sense. I sent out v2: 
http://patchwork.ozlabs.org/patch/721279/


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to