[ovs-discuss] ovs 2.10.1 crash on attempting flow-mod with unsupported action

parameswaran krishnamurthy parkrish at gmail.com
Tue Mar 5 08:27:09 UTC 2019


Hi,

With the attached patch I'm able to avert the crash.Can you please review
and suggest if the patch is fine ?

Thanks and regards,
Parameswaran


On Fri, Mar 1, 2019 at 4:32 PM parameswaran krishnamurthy <
parkrish at gmail.com> wrote:

> Hello OVS team,
>
> I'm observing crash in ovs-vswitchd on attempting the following sequence
> of configuration.
> Shouldn't the function modify_flow_init_strict honor the return value of
> add_flow_init instead of always returning zero ? Please share your thoughts.
>
> Thanks and regards,
> Parameswaran
>
>
> Step 1) Create a flow
>
> ovs-ofctl add-flow switch1
> priority=228,dl_type=0x0800,dl_vlan="600",in_port=25,actions=output:ALL
>
> This step is successful.
>
>
>
> Step 2) Invoke flow-mod with incorrect contents.
>
> ovs-ofctl mod-flows switch1
> priority=228,dl_type=0x0800,dl_vlan="600",in_port=25,actions=output:ALL,mod_vlan_vid:50,mod_vlan_pcp=6,mod_nw_tos=16
>
>
>
> In the above example, the ofproto provider I have, will return error for
> rule_construct as set_fields come after Output.
>
> However the OVS is ignoring the error (The return value of add_flow_init
> is ignored in modify_flow_init_strict) and eventually the ovs-vswitched
> crashes.
>
>
>
>  Crash backtrace
>
> ------------------------
>
> Thread 1 "ovs-vswitchd" received signal SIGSEGV, Segmentation fault.
>
> 0x00007f6a06e785fb in modify_flows_start__ (
>
>     ofproto=ofproto at entry=0x55b289cecc28, ofm=ofm at entry=0x7ffdf7d57b70)
>
>     at ofproto/ofproto.c:5402
>
> 5402    in ofproto/ofproto.c
>
> (gdb) bt
>
> #0  0x00007f6a06e785fb in modify_flows_start__ (
>
>     ofproto=ofproto at entry=0x55b289cecc28, ofm=ofm at entry=0x7ffdf7d57b70)
>
>     at ofproto/ofproto.c:5402
>
> #1  0x00007f6a06e790db in modify_flows_start_loose (ofm=0x7ffdf7d57b70,
>
>     ofproto=0x55b289cecc28) at ofproto/ofproto.c:5443
>
> #2  ofproto_flow_mod_start (ofproto=ofproto at entry=0x55b289cecc28,
>
>     ofm=ofm at entry=0x7ffdf7d57b70) at ofproto/ofproto.c:7672
>
> #3  0x00007f6a06e79164 in handle_flow_mod__ (
>
>     ofproto=ofproto at entry=0x55b289cecc28, fm=fm at entry=0x7ffdf7d57d20,
>
>     req=req at entry=0x7ffdf7d57cd0) at ofproto/ofproto.c:5858
>
> #4  0x00007f6a06e792c2 in handle_flow_mod (ofconn=ofconn at entry
> =0x55b289d528c0,
>
>     oh=oh at entry=0x55b289d5a410) at ofproto/ofproto.c:5835
>
> #5  0x00007f6a06e7a173 in handle_openflow__ (msg=0x55b289d351d0,
>
>     ofconn=0x55b289d528c0) at ofproto/ofproto.c:8127
>
> #6  handle_openflow (ofconn=0x55b289d528c0, ofp_msg=0x55b289d351d0)
>
>     at ofproto/ofproto.c:8296
>
> #7  0x00007f6a06e6a013 in ofconn_run (
>
>     handle_openflow=0x7f6a06e796f0 <handle_openflow>,
> ofconn=0x55b289d528c0)
>
>     at ofproto/connmgr.c:1446
>
> #8  connmgr_run (mgr=0x55b289d14fe0,
>
>     handle_openflow=handle_openflow at entry=0x7f6a06e796f0
> <handle_openflow>)
>
>     at ofproto/connmgr.c:365
>
> #9  0x00007f6a06e73056 in ofproto_run (p=0x55b289cecc28)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190305/9c56ba0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovs_2.10.1.patch
Type: application/octet-stream
Size: 1834 bytes
Desc: not available
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190305/9c56ba0e/attachment.obj>


More information about the discuss mailing list