summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2011-09-20 22:36:07 +0000
committerDavid S. Miller <davem@davemloft.net>2011-09-28 13:34:25 -0400
commit5dd17e08f333cde0fa11000792e33d8d39b5599f (patch)
tree78b83d82aab32696984bae2f0e1ef493e0862379 /net/core/dev.c
parent16e5726269611b71c930054ffe9b858c1cea88eb (diff)
downloadlinux-stable-5dd17e08f333cde0fa11000792e33d8d39b5599f.tar.gz
linux-stable-5dd17e08f333cde0fa11000792e33d8d39b5599f.tar.bz2
linux-stable-5dd17e08f333cde0fa11000792e33d8d39b5599f.zip
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.c12
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 @@
#include <linux/cpu_rmap.h>
#include <linux/if_tunnel.h>
#include <linux/if_pppox.h>
+#include <linux/ppp_defs.h>
#include "net-sysfs.h"
@@ -2556,6 +2557,7 @@ void __skb_get_rxhash(struct sk_buff *skb)
again:
switch (proto) {
case __constant_htons(ETH_P_IP):
+ip:
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
goto done;
@@ -2569,6 +2571,7 @@ again:
nhoff += ip->ihl * 4;
break;
case __constant_htons(ETH_P_IPV6):
+ipv6:
if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
goto done;
@@ -2591,7 +2594,14 @@ again:
proto = *((__be16 *) (skb->data + nhoff +
sizeof(struct pppoe_hdr)));
nhoff += PPPOE_SES_HLEN;
- goto again;
+ switch (proto) {
+ case __constant_htons(PPP_IP):
+ goto ip;
+ case __constant_htons(PPP_IPV6):
+ goto ipv6;
+ default:
+ goto done;
+ }
default:
goto done;
}