]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: use hard_header_len instead of hardcoded ETH_HLEN
authorJiri Benc <jbenc@redhat.com>
Thu, 10 Nov 2016 15:28:17 +0000 (16:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Nov 2016 05:51:02 +0000 (00:51 -0500)
commitf5ae67fda06de5a4d4a1bdf63ddfbc20a6012e4d
tree3804fb58d9d7e735e7a84db09d0717f71f7bd06e
parent9ba904b0dc311ab8cdce0471fc3aad13e9abe9f7
openvswitch: use hard_header_len instead of hardcoded ETH_HLEN

On tx, use hard_header_len while deciding whether to refragment or drop the
packet. That way, all combinations are calculated correctly:

* L2 packet going to L2 interface (the L2 header len is subtracted),
* L2 packet going to L3 interface (the L2 header is included in the packet
  lenght),
* L3 packet going to L3 interface.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/actions.c
net/openvswitch/vport.c