[ovs-dev] [PATCH] Limit the split elements to 2 (maxsplit + 1)

Gurucharan Shetty shettyg at nicira.com
Tue Mar 3 17:09:33 UTC 2015


On Mon, Mar 2, 2015 at 1:41 PM, Mark Maglana <mmaglana at gmail.com> wrote:
> 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 at gmail.com>
Thank you! Looks like we missed this last time around. I applied this.

> ---
>  vtep/ovs-vtep | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
> index 7173644..60dbb95 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"
>
> --
> 2.0.3
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list