summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Ding <handing@chinatelecom.cn>2022-07-01 18:52:40 +0800
committerIlya Maximets <i.maximets@ovn.org>2022-08-08 19:13:31 +0200
commitbd4a72d28708c9e70e4b4db8ca220dd9c434dd0b (patch)
tree2a2cfc98de248a72b7de13eb777453180445b20e
parentf77c14b639bf08b830ea30d49436dcee5d55bd6c (diff)
downloadopenvswitch-bd4a72d28708c9e70e4b4db8ca220dd9c434dd0b.tar.gz
ovs-save: Use right OpenFlow version for add-tlv-map.
When the bridge protocols is not included Openflow10, printing an error message "version negotiation failed" when doing "Restoring saved flows". Signed-off-by: Han Ding <handing@chinatelecom.cn> Acked-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rwxr-xr-xutilities/ovs-save2
1 files changed, 1 insertions, 1 deletions
diff --git a/utilities/ovs-save b/utilities/ovs-save
index a190902f4..67092ecf7 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -127,7 +127,7 @@ save_flows () {
# Get the highest enabled OpenFlow version
ofp_version=$(get_highest_ofp_version "$bridge")
- printf "%s" "ovs-ofctl add-tlv-map ${bridge} '"
+ printf "%s" "ovs-ofctl -O $ofp_version add-tlv-map ${bridge} '"
ovs-ofctl dump-tlv-map ${bridge} -O $ofp_version | \
awk '/^ *0x/ {if (cnt != 0) printf ","; \
cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'