Skip to content

Commit

Permalink
net: bug fix for vlan + gro issue
Browse files Browse the repository at this point in the history
Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
Even the tcp handshake was not taking place.
This is because, the eth_type_trans call before the netif_receive_skb
in napi_gro_finish() resets the skb->dev to napi->dev from the previously
set vlan netdev interface. This causes the ip_route_input to drop the
incoming packet considering it as a packet coming from a martian source.

I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
With this fix, the traffic starts and the test runs fine on both vlan
and non-vlan interfaces.

CC: Herbert Xu <[email protected]>
CC: Patrick McHardy <[email protected]>
Signed-off-by: Ajit Khaparde <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ajitkhaparde1 authored and davem330 committed Feb 24, 2010
1 parent 675c607 commit c4d4979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ gro_result_t napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb,
switch (ret) {
case GRO_NORMAL:
case GRO_HELD:
skb->protocol = eth_type_trans(skb, napi->dev);
skb->protocol = eth_type_trans(skb, skb->dev);

if (ret == GRO_HELD)
skb_gro_pull(skb, -ETH_HLEN);
Expand Down

0 comments on commit c4d4979

Please sign in to comment.