odp-util: Always encode mask of 0xffff for dl_type < ETH_TYPE_MIN.
authorJustin Pettit <jpettit@nicira.com>
Mon, 1 Jul 2013 17:43:18 +0000 (10:43 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 3 Jul 2013 16:40:49 +0000 (09:40 -0700)
commit48432528a53a276d4c75d40bf911ce8c0a24fe66
tree22010acf901242ab50c0ce680cadc337e4d9eeda
parent5bc6241b420ba5ce0ff40f9456f0b8215d34f3fb
odp-util: Always encode mask of 0xffff for dl_type < ETH_TYPE_MIN.

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@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
lib/odp-util.c