OSDN Git Service

openvswitch: Fix IPv6 later frags parsing
authorYi-Hung Wei <yihung.wei@gmail.com>
Thu, 3 Jan 2019 17:51:57 +0000 (09:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2019 21:00:02 +0000 (13:00 -0800)
commit41e4e2cd75346667b0c531c07dab05cce5b06d15
treefafd45ea370c481ea2d5e00a8cb2224b8bd89d96
parentba3e1847d6471f30241f11069d8f153ed8cb052b
openvswitch: Fix IPv6 later frags parsing

The previous commit fa642f08839b
("openvswitch: Derive IP protocol number for IPv6 later frags")
introduces IP protocol number parsing for IPv6 later frags that can mess
up the network header length calculation logic, i.e. nh_len < 0.
However, the network header length calculation is mainly for deriving
the transport layer header in the key extraction process which the later
fragment does not apply.

Therefore, this commit skips the network header length calculation to
fix the issue.

Reported-by: Chris Mi <chrism@mellanox.com>
Reported-by: Greg Rose <gvrose8192@gmail.com>
Fixes: fa642f08839b ("openvswitch: Derive IP protocol number for IPv6 later frags")
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/flow.c