summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorSalvatore Daniele <sdaniele@redhat.com>2021-11-04 15:39:45 -0400
committerIlya Maximets <i.maximets@ovn.org>2021-11-29 22:28:04 +0100
commit59622fd1bc5ce92d01eae19b321695ee56ddec53 (patch)
tree827b1c0163fb093fd40d5c40051c7268de02a575 /utilities
parent3b2982c423f75c1512467643ee2b8b5df46a5185 (diff)
downloadopenvswitch-59622fd1bc5ce92d01eae19b321695ee56ddec53.tar.gz
ovs-save: Save igmp flows in ofp_parse syntax.
match.c generates the keyword "igmp", which is not supported in ofp-parse. This means that flow dumps containing 'igmp' can not be restored. Removing the 'igmp' keyword entirely could break existing scripts in stable branches, so this patch creates a workaround within ovs-save by converting any instances of "igmp" within $bridge.flows.dump into "ip, nw_proto=2", and any instances of igmp_type/code into the generic tp_src/dst. Signed-off-by: Salvatore Daniele <sdaniele@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/ovs-save5
1 files changed, 4 insertions, 1 deletions
diff --git a/utilities/ovs-save b/utilities/ovs-save
index 27ce3a9aa..fb2025b76 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -150,7 +150,10 @@ save_flows () {
ovs-ofctl -O $ofp_version dump-flows --no-names --no-stats "$bridge" | \
sed -e '/NXST_FLOW/d' \
-e '/OFPST_FLOW/d' \
- -e 's/\(idle\|hard\)_age=[^,]*,//g' > \
+ -e 's/\(idle\|hard\)_age=[^,]*,//g' \
+ -e 's/igmp_type/tp_src/g' \
+ -e 's/igmp_code/tp_dst/g' \
+ -e 's/igmp/ip,nw_proto=2/g' > \
"$workdir/$bridge.flows.dump"
done
echo "rm -rf \"$workdir\""