Re: [Patch net] fib: relax source validation check for loopback packets

2019-07-13 Thread Cong Wang
On Sat, Jul 13, 2019 at 11:30 PM Cong Wang wrote: > It's complicated, Mesos network isolation uses this case: > https://cgit.twitter.biz/mesos/tree/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp Oops, please use the open source link instead: https://github.com/apache/mesos/blob/

Re: [Patch net] fib: relax source validation check for loopback packets

2019-07-13 Thread Cong Wang
On Sat, Jul 13, 2019 at 3:42 PM David Ahern wrote: > > On 7/12/19 2:17 PM, Cong Wang wrote: > > diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > > index 317339cd7f03..8662a44a28f9 100644 > > --- a/net/ipv4/fib_frontend.c > > +++ b/net/ipv4/fib_frontend.c > > @@ -388,6 +388,12 @@ st

Re: [Patch net] fib: relax source validation check for loopback packets

2019-07-13 Thread David Ahern
On 7/13/19 4:42 PM, David Ahern wrote: > On 7/12/19 2:17 PM, Cong Wang wrote: >> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c >> index 317339cd7f03..8662a44a28f9 100644 >> --- a/net/ipv4/fib_frontend.c >> +++ b/net/ipv4/fib_frontend.c >> @@ -388,6 +388,12 @@ static int __fib_valid

Re: [Patch net] fib: relax source validation check for loopback packets

2019-07-13 Thread David Ahern
On 7/12/19 2:17 PM, Cong Wang wrote: > diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > index 317339cd7f03..8662a44a28f9 100644 > --- a/net/ipv4/fib_frontend.c > +++ b/net/ipv4/fib_frontend.c > @@ -388,6 +388,12 @@ static int __fib_validate_source(struct sk_buff *skb, > __be32 src,

[Patch net] fib: relax source validation check for loopback packets

2019-07-12 Thread Cong Wang
In a rare case where we redirect local packets from veth to lo, these packets fail to pass the source validation when rp_filter is turned on, as the tracing shows: <...>-311708 [040] ..s1 7951180.957825: fib_table_lookup: table 254 oif 0 iif 1 src 10.53.180.130 dst 10.53.180.130 tos 0 scope 0 f