diff options
author | Mark Maglana <mmaglana@gmail.com> | 2015-03-02 13:41:35 -0800 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2015-03-03 09:07:50 -0800 |
commit | 5aa5d00e989c31650501d96c38c835e256c47593 (patch) | |
tree | 1ace2e2363e0456e969d5f71882e5a622f3ec7a0 | |
parent | c7794d20f5617432edb96b5b7ee57ecb113af940 (diff) | |
download | openvswitch-5aa5d00e989c31650501d96c38c835e256c47593.tar.gz |
vtep: Limit the split elements to 2 (maxsplit + 1)
This change ensures that we always end up with two elements even
if the name of the physical port contains dashes. For example, a
binding of "0100-br0-eth1" will be split to ["0100", "br0-eth1"]
instead of ["0100", "br0", "eth1"].
Signed-off-by: Mark Maglana <mmaglana@gmail.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
-rwxr-xr-x | vtep/ovs-vtep | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep index 717364464..60dbb9593 100755 --- a/vtep/ovs-vtep +++ b/vtep/ovs-vtep @@ -513,7 +513,7 @@ def add_binding(binding, ls): def del_binding(binding, ls): vlog.info("removing binding %s" % binding) - vlan, pp_name = binding.split("-") + vlan, pp_name = binding.split("-", 1) pbinding = binding+"-p" lbinding = binding+"-l" |