net/tap: fix protocol field for non-IP
authorVipin Varghese <vipin.varghese@intel.com>
Fri, 13 Apr 2018 05:58:47 +0000 (11:28 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:55 +0000 (15:54 +0100)
commit8055b534d69063131f94cec6644f30dcaa9bc4e4
tree55524b571bf5014e22ede0b7a716fd9ca83270d3
parentf0fdd5158e12283e234827202a88ed80ca95002c
net/tap: fix protocol field for non-IP

When non IP packets are sent on TUN interface, the logic put Ipv6 as
protocol field in header. With the current patch, the check is modified
for ipv4, ipv6 and non ip.

Fixes: 204d026a3922 ("net/tap: support tun")

Suggested-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/tap/rte_eth_tap.c