diff options
author | Changli Gao <xiaosuo@gmail.com> | 2011-09-20 18:36:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-28 13:34:25 -0400 |
commit | 5dd17e08f333cde0fa11000792e33d8d39b5599f (patch) | |
tree | 78b83d82aab32696984bae2f0e1ef493e0862379 /net/core/dev.c | |
parent | 16e5726269611b71c930054ffe9b858c1cea88eb (diff) |
net: rps: fix the support for PPPOE
The upper protocol numbers of PPPOE are different, and should be treated
specially.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index bf49a47ddfdb..7f4486e127e9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -135,6 +135,7 @@ | |||
135 | #include <linux/cpu_rmap.h> | 135 | #include <linux/cpu_rmap.h> |
136 | #include <linux/if_tunnel.h> | 136 | #include <linux/if_tunnel.h> |
137 | #include <linux/if_pppox.h> | 137 | #include <linux/if_pppox.h> |
138 | #include <linux/ppp_defs.h> | ||
138 | 139 | ||
139 | #include "net-sysfs.h" | 140 | #include "net-sysfs.h" |
140 | 141 | ||
@@ -2556,6 +2557,7 @@ void __skb_get_rxhash(struct sk_buff *skb) | |||
2556 | again: | 2557 | again: |
2557 | switch (proto) { | 2558 | switch (proto) { |
2558 | case __constant_htons(ETH_P_IP): | 2559 | case __constant_htons(ETH_P_IP): |
2560 | ip: | ||
2559 | if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) | 2561 | if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) |
2560 | goto done; | 2562 | goto done; |
2561 | 2563 | ||
@@ -2569,6 +2571,7 @@ again: | |||
2569 | nhoff += ip->ihl * 4; | 2571 | nhoff += ip->ihl * 4; |
2570 | break; | 2572 | break; |
2571 | case __constant_htons(ETH_P_IPV6): | 2573 | case __constant_htons(ETH_P_IPV6): |
2574 | ipv6: | ||
2572 | if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff)) | 2575 | if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff)) |
2573 | goto done; | 2576 | goto done; |
2574 | 2577 | ||
@@ -2591,7 +2594,14 @@ again: | |||
2591 | proto = *((__be16 *) (skb->data + nhoff + | 2594 | proto = *((__be16 *) (skb->data + nhoff + |
2592 | sizeof(struct pppoe_hdr))); | 2595 | sizeof(struct pppoe_hdr))); |
2593 | nhoff += PPPOE_SES_HLEN; | 2596 | nhoff += PPPOE_SES_HLEN; |
2594 | goto again; | 2597 | switch (proto) { |
2598 | case __constant_htons(PPP_IP): | ||
2599 | goto ip; | ||
2600 | case __constant_htons(PPP_IPV6): | ||
2601 | goto ipv6; | ||
2602 | default: | ||
2603 | goto done; | ||
2604 | } | ||
2595 | default: | 2605 | default: |
2596 | goto done; | 2606 | goto done; |
2597 | } | 2607 | } |