[ovs-dev] [PATCH] datapath: do not add Geneve attributes if vport does not exist

Jesse Gross jesse at nicira.com
Thu Jul 17 23:08:41 UTC 2014


On Thu, Jul 17, 2014 at 3:46 PM, Ansis Atteka <aatteka at nicira.com> wrote:
> diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
> index 5f975a1..a4108c0 100644
> --- a/datapath/flow_netlink.c
> +++ b/datapath/flow_netlink.c
> @@ -1034,7 +1034,7 @@ int ovs_nla_put_flow(struct datapath *dp, const struct sw_flow_key *swkey,
>                         struct vport *in_port;
>
>                         in_port = ovs_vport_ovsl_rcu(dp, swkey->phy.in_port);
> -                       if (in_port->ops->type == OVS_VPORT_TYPE_GENEVE)
> +                       if (in_port && in_port->ops->type == OVS_VPORT_TYPE_GENEVE)

I think is probably not only an issue for Geneve ports (since the
crash happens before we get to check the type) but for tunnel ports in
general. I also guess that the scenario is not that the port hasn't
been created yet but that the port has been deleted and the flow still
exists.

One thing that I worry about is that this has the possibility to
change how the flow is reported - before the flow deletion it has
Geneve options but immediately after the flow still exists but without
options. OVS will likely deal with this but it doesn't seem like a
great thing.



More information about the dev mailing list