From: Cong Wang <xiyou.wangcong@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Netdev <netdev@vger.kernel.org>,
WireGuard mailing list <wireguard@lists.zx2c4.com>,
Cong Wang <cong.wang@bytedance.com>,
Peilin Ye <peilin.ye@bytedance.com>
Subject: Re: [Patch net] wireguard: preserve skb->mark on ingress side
Date: Mon, 27 Sep 2021 20:27:55 -0700 [thread overview]
Message-ID: <CAM_iQpV-JKrk8vaHDeD0pXaheN0APUxH5Lp+mGCM=_yZQ1hd4w@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9rbfBHUnoifdQV6pOp8MHwowEp7ooOhV-JSJmanRzksLA@mail.gmail.com>
On Mon, Sep 27, 2021 at 8:22 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Hi Cong,
>
> I'm not so sure this makes sense, as the inner packet is in fact
> totally different. If you want to distinguish the ingress interface,
The contents are definitely different, but skb itself is the same.
Please also take a look at other tunnels, they all preserve this
in similar ways, that is, comparing net namespaces. Any reason
why wireguard is so different from other tunnels?
> can't you just use `iptables -i wg0` or `ip rule add ... iif wg0`?
>
My bad, I forgot to mention we run eBPF on egress side, where
skb->dev is already set to egress device (a non-wireguard device),
and of course skb_iif has been cleared even earlier.
Thanks.
next prev parent reply other threads:[~2021-09-28 3:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 3:19 Cong Wang
2021-09-28 3:22 ` Jason A. Donenfeld
2021-09-28 3:27 ` Cong Wang [this message]
2021-10-07 20:55 ` Cong Wang
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='CAM_iQpV-JKrk8vaHDeD0pXaheN0APUxH5Lp+mGCM=_yZQ1hd4w@mail.gmail.com' \
--to=xiyou.wangcong@gmail.com \
--cc=Jason@zx2c4.com \
--cc=cong.wang@bytedance.com \
--cc=netdev@vger.kernel.org \
--cc=peilin.ye@bytedance.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).