[ovs-dev] [bug4769 1/4] datapath: Avoid random tun_id in odp_packet_cmd_execute().

Jesse Gross jesse at nicira.com
Tue Mar 8 01:35:05 UTC 2011


On Wed, Mar 2, 2011 at 2:30 PM, Ben Pfaff <blp at nicira.com> wrote:
> flow_extract() sets key->tun_id from OVS_CB(packet)->tun_id, which until
> now has contained whatever Netlink put there in its NETLINK_CB structure.
> Zero it earlier so that its value is at least predictable.
>
> The resulting code is still not correct, because key->tun_id and
> key->in_port are now set to arbitrary values.  I have known about this
> since I wrote this function (and before, too, in its earlier incarnations),
> but until now I did not think that it was a problem because I did not
> think that there were any users along this code path.  But that is wrong:
> sFlow sampling uses tun_id and in_port and ODP_ACTION_ATTR_CONTROLLER uses
> in_port.  So we need a way to pass these back down from userspace.  An
> upcoming commit will add a way.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>

Acked-by: Jesse Gross <jesse at nicira.com>



More information about the dev mailing list