[ovs-dev] [PATCH 1/2] odp-util: Always encode mask of 0xffff for dl_type < ETH_TYPE_MIN.
Justin Pettit
jpettit at nicira.com
Wed Jul 3 16:46:21 UTC 2013
Thanks, Andy. I pushed to all affected branches.
--Justin
On Jul 3, 2013, at 9:33 AM, Andy Zhou <azhou at nicira.com> wrote:
> Both patches look good.
> acked-by: Andy Zhou <azhou at nicira.com>
>
>
>
> On Tue, Jul 2, 2013 at 6:43 PM, Justin Pettit <jpettit at nicira.com> wrote:
> For non-Ethernet II packets, we don't set an EtherType netlink attribute
> and set the Ethertype mask attribute to 0xffff. The code was encoding
> whatever mask was passed in, which could lead to bugs if the caller
> didn't know the userspace-kernel interface.
>
> Found by inspection.
>
> Signed-off-by: Justin Pettit <jpettit at nicira.com>
> ---
> lib/odp-util.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index 14994a9..c05664c 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -2373,7 +2373,7 @@ odp_flow_key_from_flow__(struct ofpbuf *buf, const struct flow *data,
> * 802.3 SNAP packet with valid eth_type).
> */
> if (is_mask) {
> - nl_msg_put_be16(buf, OVS_KEY_ATTR_ETHERTYPE, data->dl_type);
> + nl_msg_put_be16(buf, OVS_KEY_ATTR_ETHERTYPE, htons(UINT16_MAX));
> }
> goto unencap;
> }
> --
> 1.7.5.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list