提交 5dd17e08 编写于 作者: C Changli Gao 提交者: David S. Miller

net: rps: fix the support for PPPOE

The upper protocol numbers of PPPOE are different, and should be treated
specially.
Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 16e57262
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
#include <linux/cpu_rmap.h> #include <linux/cpu_rmap.h>
#include <linux/if_tunnel.h> #include <linux/if_tunnel.h>
#include <linux/if_pppox.h> #include <linux/if_pppox.h>
#include <linux/ppp_defs.h>
#include "net-sysfs.h" #include "net-sysfs.h"
...@@ -2556,6 +2557,7 @@ void __skb_get_rxhash(struct sk_buff *skb) ...@@ -2556,6 +2557,7 @@ void __skb_get_rxhash(struct sk_buff *skb)
again: again:
switch (proto) { switch (proto) {
case __constant_htons(ETH_P_IP): case __constant_htons(ETH_P_IP):
ip:
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
goto done; goto done;
...@@ -2569,6 +2571,7 @@ void __skb_get_rxhash(struct sk_buff *skb) ...@@ -2569,6 +2571,7 @@ void __skb_get_rxhash(struct sk_buff *skb)
nhoff += ip->ihl * 4; nhoff += ip->ihl * 4;
break; break;
case __constant_htons(ETH_P_IPV6): case __constant_htons(ETH_P_IPV6):
ipv6:
if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff)) if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
goto done; goto done;
...@@ -2591,7 +2594,14 @@ void __skb_get_rxhash(struct sk_buff *skb) ...@@ -2591,7 +2594,14 @@ void __skb_get_rxhash(struct sk_buff *skb)
proto = *((__be16 *) (skb->data + nhoff + proto = *((__be16 *) (skb->data + nhoff +
sizeof(struct pppoe_hdr))); sizeof(struct pppoe_hdr)));
nhoff += PPPOE_SES_HLEN; 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: default:
goto done; goto done;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册