[ovs-dev] [PATCH] vtep-ctl: Fix a bug.
Justin Pettit
jpettit at nicira.com
Thu Jun 11 22:47:54 UTC 2015
Thanks for catching that.
Acked-by: Justin Pettit <jpettit at nicira.com>
--Justin
> On Jun 8, 2015, at 11:03 PM, Alex Wang <alexw at nicira.com> wrote:
>
> add_port_to_cache() uses 'cache_name' as the shash node name for
> shash_add(). So, the del_cached_port() must also pass 'cache_name'
> as argument for shash_find_and_delete().
>
> This bug does not cause any issue currently but should be fixed.
>
> Signed-off-by: Alex Wang <alexw at nicira.com>
> ---
> vtep/vtep-ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c
> index ead22ea..a501a98 100644
> --- a/vtep/vtep-ctl.c
> +++ b/vtep/vtep-ctl.c
> @@ -798,7 +798,7 @@ del_cached_port(struct vtep_ctl_context *ctx, struct vtep_ctl_port *port)
> char *cache_name = xasprintf("%s+%s", port->ps->name, port->port_cfg->name);
>
> list_remove(&port->ports_node);
> - shash_find_and_delete(&ctx->ports, port->port_cfg->name);
> + shash_find_and_delete(&ctx->ports, cache_name);
> vteprec_physical_port_delete(port->port_cfg);
> free(cache_name);
> free(port);
> --
> 1.7.9.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list