linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ipv4: add description about martian source
@ 2022-02-14  3:27 cgel.zte
  2022-02-15 14:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-02-14  3:27 UTC (permalink / raw)
  To: davem; +Cc: yoshfuji, dsahern, kuba, netdev, linux-kernel, Zhang Yunkai

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. they are almost
the same, and printed by net_warn_ratelimited. Each arp message will
trigger this print on each network port.

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,
+		 * and the same host but different containers are not.
+		 */
 		if (inet_lookup_ifaddr_rcu(net, src))
 			return -EINVAL;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ipv4: add description about martian source
  2022-02-14  3:27 [PATCH v2] ipv4: add description about martian source cgel.zte
@ 2022-02-15 14:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-15 14:40 UTC (permalink / raw)
  To: CGEL; +Cc: davem, yoshfuji, dsahern, kuba, netdev, linux-kernel, zhang.yunkai

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 14 Feb 2022 03:27:21 +0000 you 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. they are almost
> the same, and printed by net_warn_ratelimited. Each arp message will
> trigger this print on each network port.
> 
> [...]

Here is the summary with links:
  - [v2] ipv4: add description about martian source
    https://git.kernel.org/netdev/net/c/9d2d38c35e7a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-15 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14  3:27 [PATCH v2] ipv4: add description about martian source cgel.zte
2022-02-15 14:40 ` patchwork-bot+netdevbpf

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).