From: Randy Dunlap <rdunlap@infradead.org>
To: cgel.zte@gmail.com, davem@davemloft.net
Cc: yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Zhang Yunkai <zhang.yunkai@zte.com.cn>
Subject: Re: [PATCH] ipv4: add description about martian source
Date: Sun, 13 Feb 2022 19:05:47 -0800 [thread overview]
Message-ID: <7390f20d-e679-6fc3-62cb-95850871561d@infradead.org> (raw)
In-Reply-To: <20220214030123.1716223-1-zhang.yunkai@zte.com.cn>
Hi--
On 2/13/22 19:01, cgel.zte@gmail.com wrote:
> From: Zhang Yunkai <zhang.yunkai@zte.com.cn>
>
> When multiple containers are running in the environment and multiple
> macvlan network port are configured in each container, a lot of martian
> source prints will appear after martian_log is enabled.
Does it need to use one of the printk_ratelimited() calls?
or are they all unique?
> Such as:
> IPv4: martian source 173.254.95.16 from 173.254.100.109,
> on dev eth0
> ll header: 00000000: ff ff ff ff ff ff 40 00 ad fe 64 6d
> 08 06 ......@...dm..
> IPv4: martian source 173.254.95.16 from 173.254.100.109,
> on dev eth1
> ll header: 00000000: ff ff ff ff ff ff 40 00 ad fe 64 6d
> 08 06 ......@...dm..
>
> There is no description of this kind of source in the RFC1812.
>
> Signed-off-by: Zhang Yunkai <zhang.yunkai@zte.com.cn>
> ---
> net/ipv4/fib_frontend.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
> index 4d61ddd8a0ec..3564308e849a 100644
> --- a/net/ipv4/fib_frontend.c
> +++ b/net/ipv4/fib_frontend.c
> @@ -436,6 +436,9 @@ int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
> if (net->ipv4.fib_has_custom_local_routes ||
> fib4_has_custom_rules(net))
> goto full_check;
> + /* Within the same container,it is regarded as a martian source,
Please add a space after the comma: , it is
> + * and the same host but different containers are not.
> + */
> if (inet_lookup_ifaddr_rcu(net, src))
> return -EINVAL;
>
--
~Randy
prev parent reply other threads:[~2022-02-14 3:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 3:01 cgel.zte
2022-02-14 3:05 ` Randy Dunlap [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=7390f20d-e679-6fc3-62cb-95850871561d@infradead.org \
--to=rdunlap@infradead.org \
--cc=cgel.zte@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=zhang.yunkai@zte.com.cn \
/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
all inboxes | Powered by JetHome®