From: Boris Sukholitko <boris.sukholitko@broadcom•com>
To: netdev@vger•kernel.org, Jamal Hadi Salim <jhs@mojatatu•com>,
Jiri Pirko <jiri@resnulli•us>,
Cong Wang <xiyou.wangcong@gmail•com>
Cc: "David S . Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
wangqing@vivo•com, wenxu@ucloud•cn, eranbe@nvidia•com,
dcaratti@redhat•com, gustavoars@kernel•org, zhangkaiheb@126•com,
vladimir.oltean@nxp•com, alobakin@pm•me,
Ilya Lifshits <ilya.lifshits@broadcom•com>
Subject: Re: [PATCH net-next] net: flow_dissector: do not set invalid PPP protocol
Date: Sun, 3 Oct 2021 10:38:18 +0300 [thread overview]
Message-ID: <20211003073818.GA3433@noodle> (raw)
In-Reply-To: <20211003071345.1661-1-boris.sukholitko@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
Hi,
Please disregard, I see that the patch has been applied already.
My feeble defense is that the previous patch has "Not Applicable" state
on patchwork for some reason:
https://patchwork.kernel.org/project/netdevbpf/patch/20210929113223.22108-1-boris.sukholitko@broadcom.com/
Thanks,
Boris.
On Sun, Oct 03, 2021 at 10:13:45AM +0300, Boris Sukholitko wrote:
> 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>
> ---
> net/core/flow_dissector.c | 3 +--
> 1 file changed, 1 insertion(+), 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 @@ bool __skb_flow_dissect(const struct net *net,
> 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;
> --
> 2.29.2
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
prev parent reply other threads:[~2021-10-03 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-03 7:13 [PATCH net-next] net: flow_dissector: do not set invalid PPP protocol Boris Sukholitko
2021-10-03 7:38 ` Boris Sukholitko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211003073818.GA3433@noodle \
--to=boris.sukholitko@broadcom$(echo .)com \
--cc=alobakin@pm$(echo .)me \
--cc=davem@davemloft$(echo .)net \
--cc=dcaratti@redhat$(echo .)com \
--cc=eranbe@nvidia$(echo .)com \
--cc=gustavoars@kernel$(echo .)org \
--cc=ilya.lifshits@broadcom$(echo .)com \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=vladimir.oltean@nxp$(echo .)com \
--cc=wangqing@vivo$(echo .)com \
--cc=wenxu@ucloud$(echo .)cn \
--cc=xiyou.wangcong@gmail$(echo .)com \
--cc=zhangkaiheb@126$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox