IP_GRE: Fix GRE_CSUM case.
authorPravin B Shelar <pshelar@nicira.com>
Sun, 24 Feb 2013 20:05:05 +0000 (20:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2013 20:47:41 +0000 (15:47 -0500)
commit8f10098fb978c3cdd8ee7d72f7aa4330873f4544
treecbd52a954ee36b237b6d230088a1116ced5fdc78
parent8dc98eb2e8ccfbfb90348f8dc42f4a528a8a9961
IP_GRE: Fix GRE_CSUM case.

commit "ip_gre: allow CSUM capable devices to handle packets"
aa0e51cdda005cd37e2, broke GRE_CSUM case.
GRE_CSUM needs checksum computed for inner packet. Therefore
csum-calculation can not be offloaded if tunnel device requires
GRE_CSUM.  Following patch fixes it by computing inner packet checksum
for GRE_CSUM type, for all other type of GRE devices csum is offloaded.

CC: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c