dpif-linux: Fix byte-swapping direction in nl_msg_put_u16() call.
authorBen Pfaff <blp@nicira.com>
Fri, 15 Feb 2013 19:24:27 +0000 (11:24 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 15 Feb 2013 21:23:07 +0000 (13:23 -0800)
commit7e2d8aeaf5ef25408a6f345e2611b647851e0120
tree5275f18410a3dd64f25c9d32a158969cdc226ec2
parentc39b1a5c3b0854846f1b956196628e0185b61c72
dpif-linux: Fix byte-swapping direction in nl_msg_put_u16() call.

OVS_TUNNEL_ATTR_DST_PORT expects a u16, tnl_cfg->dst_port is a be16, so
we want ntohs() instead of htons().

In practice htons() and ntohs() perform the same operation, so this does
not fix a real bug.

Found by sparse.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c