From: Jakub Kicinski <kuba@kernel.org>
To: Clara Engler <cve@cve.cx>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org
Subject: Re: [PATCH] ipv4: Fix log message for martian source
Date: Mon, 1 Dec 2025 11:40:25 -0800 [thread overview]
Message-ID: <20251201114025.1e6aa795@kernel.org> (raw)
In-Reply-To: <aS3kX7DApnSfJtT9@3f40c99ffb840b3b>
On Mon, 1 Dec 2025 19:54:23 +0100 Clara Engler wrote:
> On Fri, Nov 28, 2025 at 10:47:12AM -0800, Jakub Kicinski wrote:
> > Could you explain how you discovered the issue? (it should ideally be
> > part of the commit msg TBH)
>
> In the past few days, I toyed around with TUN interfaces and using them
> as a tunnel (receiving packets via a TUN and sending them over a TCP
> stream; receiving packets from a TCP stream and writing them to a
> TUN).[^1]
>
> When these IP addresses contained local IPs (i.e. 10.0.0.0/8 in source
> and destination), everything worked fine. However, sending them to a
> real routeable IP address on the internet led to them being treated as a
> martian packet, obviously. I was able to fix this with some sysctl's
> and iptables settings, but while debugging I found the log message
> rather confusing, as I was unsure on whether the packet that gets
> dropped was the packet originating from me, or the response from the
> endpoint, as "martian source <ROUTEABLE IP>" could also be falsely
> interpreted as the response packet being martian, due to the word
> "source" followed by the routeable IP address, implying the source
> address of that packet is set to this IP.
>
> [^1]: https://backreference.org/2010/03/26/tuntap-interface-tutorial
I see. Sounds legit, we can adjust the error msg per you suggestion.
Unfortunately, we just entered a merge window and then there will be
an end-of-year shutdown period so you'll need to post v2 in around a
month :(
next prev parent reply other threads:[~2025-12-01 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 21:59 [PATCH] ipv4: Fix log message for martian source Clara Engler
2025-11-28 2:17 ` Jakub Kicinski
2025-11-28 16:47 ` Clara Engler
2025-11-28 18:47 ` Jakub Kicinski
2025-12-01 18:54 ` Clara Engler
2025-12-01 19:40 ` Jakub Kicinski [this message]
2025-12-01 21:35 ` Clara Engler
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=20251201114025.1e6aa795@kernel.org \
--to=kuba@kernel.org \
--cc=cve@cve.cx \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).