Thanks for your quick reply! I still got the same segfault with the patch 
applied. Then I tried setting the .tab at the packet instead (see patch below). 
This seems to have resolved the segfaults.

--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4854,6 +4853,7 @@ nxt_resume(struct ofproto *ofproto_,
     dp_packet_put(&packet, pin->base.packet, pin->base.packet_len);

     pkt_metadata_from_flow(&packet.md, &pin->base.flow_metadata.flow);
+    packet.md.tunnel.metadata.tab = ofproto_get_tun_tab(ofproto_);

     /* Fix up in_port. */
     ofproto_dpif_set_packet_odp_port(ofproto,

-----Ursprüngliche Nachricht-----
Von: [email protected] 
[mailto:[email protected]] Im Auftrag von Ben Pfaff
Gesendet: Samstag, 28. Juli 2018 01:22
An: Markus Blank-Burian <[email protected]>
Cc: [email protected]
Betreff: Re: [ovs-discuss] Segfault in tun_metadata_to_geneve__ while 
processing DNS requests from OVN controller

On Fri, Jul 27, 2018 at 11:35:56AM +0000, Markus Blank-Burian wrote:
> Hello,
>
>
>
> I am using with OpenVSwitch 2.9.2, controlled by a recent version of 
> networking-ovn and have problems with segmentation faults in 
> tun_metadata_to_geneve__ which are apparently caused by DNS requests 
> generated by the OVN controller. The .tab pointer in the flow variable is 
> NULL, as can be seen below. For completeness, I have included both the 
> contents of the flow metadata and the packet data. Last, there are a few log 
> entries with more of the packet processing data just before the segfault 
> (10.14.33.16, .17 are the tunnel endpoints, 10.14.30.75 is a virtual router 
> and 128.176.196.36 is a DNS server). To be sure, that the issue is caused by 
> the DNS requests, I disabled DNS functionality manually in networking-ovn and 
> removed all DNS entries in the NB database. Since then, I have observed no 
> more segfaults.

Thanks for the bug report.

Would you mind trying out the following patch?  I believe that it should 
correctly initialize the NULL member.

--8<--------------------------cut here-------------------------->8--

From: Ben Pfaff <[email protected]>
Date: Fri, 27 Jul 2018 16:19:40 -0700
Subject: [PATCH] ofproto-dpif: Use ofproto tunnel metadata table for executing  
packet.

Reported-by: Markus Blank-Burian <[email protected]>
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047111.html
Signed-off-by: Ben Pfaff <[email protected]>
---
 ofproto/ofproto-dpif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 
3365d4185926..51ff809c4c99 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4862,6 +4862,7 @@ nxt_resume(struct ofproto *ofproto_,

     struct flow headers;
     flow_extract(&packet, &headers);
+    headers.tunnel.metadata.tab = ofproto_get_tun_tab(ofproto_);

     /* Execute the datapath actions on the packet. */
     struct dpif_execute execute = {
--
2.16.1
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to