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:42:07 +0000 (09:42 -0700)
commit57375281c749806c5a5533a665cb823131aba37d
tree30fb02edcb84048677419188741ed39d40c92994
parent81f2f21e369cf54c247d20d524efa68d43a48f82
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