[ovs-dev] [PATCH] Avoid crash in OvS while transmitting fragmented packets over tunnel.

Rohith Basavaraja rohith.basavaraja at ericsson.com
Fri May 11 06:35:39 UTC 2018


Hi Darell,

I reproduce the issue by making VM to transmit fragmented packets and in OvS if we have corresponding rule
to transmit the received fragmented packet (from VM) over tunnel then I always hit the crash.

Thanks
Rohith

On 11/05/18, 2:16 AM, "Darrell Ball" <dball at vmware.com> wrote:

    Thanks Rohith
    I see this patch was applied, but I have one question inline.
    
    
    On 4/20/18, 1:48 AM, "ovs-dev-bounces at openvswitch.org on behalf of Rohith Basavaraja" <ovs-dev-bounces at openvswitch.org on behalf of rohith.basavaraja at ericsson.com> wrote:
    
        Currently when fragmented packets are to be transmitted in to tunnel,
        base_flow->nw_frag which was initially non-zero at reception is not
        reset to zero when the base_flow and flow are rewritten
        as part of the emulated tnl_push action in the ofproto-dpif-xlate
        module.
        
        Because of this when fragmented packets are transmitted out of tunnel,
        we hit crash caused by the following assert.
        
        lib/odp-util.c:5654: assertion flow->nw_proto == base_flow->nw_proto &&
        flow->nw_frag == base_flow->nw_frag failed in commit_set_ipv4_action()
    
    Can you describe how you hit this assertion?
    I have some testing in and around this code, but have not hit this yet, so I was curious?
    
        With the following change propagate_tunnel_data_to_flow__
        is modified to reset *nw_frag* to zero. 
    
    
        Also, that currently we don't
        fragment tunnelled packets, we should reset *nw_frag* to zero in
        propagate_tunnel_data_to_flow__.
    
        Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
        From: Rohith Basavaraja <rohith.basavaraja at ericsson.com>
        CC: Jan Scheurich <jan.scheurich at ericsson.com>
        
        ---
         ofproto/ofproto-dpif-xlate.c | 1 +
         1 file changed, 1 insertion(+)
        
        diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
        index 94e3ddb..e9ed037 100644
        --- a/ofproto/ofproto-dpif-xlate.c
        +++ b/ofproto/ofproto-dpif-xlate.c
        @@ -3310,6 +3310,7 @@ propagate_tunnel_data_to_flow__(struct flow *dst_flow,
             dst_flow->ipv6_dst = src_flow->tunnel.ipv6_dst;
             dst_flow->ipv6_src = src_flow->tunnel.ipv6_src;
         
        +    dst_flow->nw_frag = 0; /* Tunnel packets are unfragmented. */
    
    
             dst_flow->nw_tos = src_flow->tunnel.ip_tos;
             dst_flow->nw_ttl = src_flow->tunnel.ip_ttl;
             dst_flow->tp_dst = src_flow->tunnel.tp_dst;
        -- 
        1.9.1
        
        
        
        
        _______________________________________________
        dev mailing list
        dev at openvswitch.org
        https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=6ZMZ7J9yNmX0ZQRMQyUfQ8fZrhemcMFiUqpnVD_jN9w&s=lYu98hfGnEvKr7YcK50fxDDY9-d0mA3W0yYtpSeeIQo&e=
        
    
    
    
    



More information about the dev mailing list