mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
dissector: do not set invalid PPP protocol
The following flower filter fails to match non-PPP_IP{V6} packets wrapped in PPP_SES protocol: tc filter add dev eth0 ingress protocol ppp_ses flower \ action simple sdata hi64 The reason is that proto local variable is being set even when FLOW_DISSECT_RET_OUT_BAD status is returned. The fix is to avoid setting proto variable if the PPP protocol is unknown. Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
55b115c7ec
commit
2e861e5e97
1 changed files with 1 additions and 2 deletions
|
@ -1196,9 +1196,8 @@ bool __skb_flow_dissect(const struct net *net,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
proto = hdr->proto;
|
|
||||||
nhoff += PPPOE_SES_HLEN;
|
nhoff += PPPOE_SES_HLEN;
|
||||||
switch (proto) {
|
switch (hdr->proto) {
|
||||||
case htons(PPP_IP):
|
case htons(PPP_IP):
|
||||||
proto = htons(ETH_P_IP);
|
proto = htons(ETH_P_IP);
|
||||||
fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
|
||||||
|
|
Loading…
Reference in a new issue