[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMDZJNUNdGNh6TQchcGbfC6ur9C7KZ4Ci8Yj4_=gj7OAvZCytg@mail.gmail.com>
Date: Mon, 1 Nov 2021 14:32:17 +0800
From: Tonghao Zhang <xiangxia.m.yue@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>,
Cong Wang <xiyou.wangcong@...il.com>, ast@...nel.org,
andrii@...nel.org, songliubraving@...com, yhs@...com
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: bpf redirect will loop the packets
Hi
I found the issue,
if we use the bpf_redirect to the same netdevice in the ingress path.
the packet loop.
and now linux doesn't check that. In tx path,
softnet_data.xmit.recursion will limit the recursion.
I think we should check that in ingress. any thoughts?
tc.c:
...
return bpf_redirect(skb->ifindex /* same netdev */, 1);
$ tc filter add dev $NETDEV ingress bpf direct-action obj tc.o sec .text
--
Best regards, Tonghao
Powered by blists - more mailing lists