aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/flow_dissector.c
diff options
context:
space:
mode:
authorBoris Sukholitko <boris.sukholitko@broadcom.com>2021-09-29 14:32:23 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-30 13:09:28 +0100
commit2e861e5e97175dfa7b7bc055c45acdc06d2301d3 (patch)
tree242a5046fe2599bb99cee7ba24223dc9ec583a28 /net/core/flow_dissector.c
parentnet: dsa: rtl8366rb: Use core filtering tracking (diff)
downloadlinux-dev-2e861e5e97175dfa7b7bc055c45acdc06d2301d3.tar.xz
linux-dev-2e861e5e97175dfa7b7bc055c45acdc06d2301d3.zip
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>
Diffstat (limited to '')
-rw-r--r--net/core/flow_dissector.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index bac0184cf3de..7d0a9f84aaf7 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1196,9 +1196,8 @@ proto_again:
break;
}
- proto = hdr->proto;
nhoff += PPPOE_SES_HLEN;
- switch (proto) {
+ switch (hdr->proto) {
case htons(PPP_IP):
proto = htons(ETH_P_IP);
fdret = FLOW_DISSECT_RET_PROTO_AGAIN;