[ovs-git] [openvswitch/ovs] d2ede8: ofproto: Fix for ovs-vswitchd crash on flow-mod wi...
parkrish
noreply at github.com
Tue Mar 5 23:17:53 UTC 2019
Branch: refs/heads/master
Home: https://github.com/openvswitch/ovs
Commit: d2ede8c07d5dfe2c009ba0ec54d5156c7a420fb2
https://github.com/openvswitch/ovs/commit/d2ede8c07d5dfe2c009ba0ec54d5156c7a420fb2
Author: parameswaran krishnamurthy <parkrish at gmail.com>
Date: 2019-03-05 (Tue, 05 Mar 2019)
Changed paths:
M ofproto/ofproto.c
Log Message:
-----------
ofproto: Fix for ovs-vswitchd crash on flow-mod with unsupported action
Problem Description:
The ovs-vswitchd is crashing while invoking flow-mod with upsupported
action(Tested with ovs2.10.1)
Steps to recreate:
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
With this fix, OVS does not crash.
Signed-off-by: Parameswaran Krishnamurthy <parkrish at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
More information about the git
mailing list