Message ID | 20220214032721.1716878-1-zhang.yunkai@zte.com.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | 9d2d38c35e7a3de96340c446f3b0fde7b2e7348e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v2] ipv4: add description about martian source | expand |
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!
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;