On Sun, Dec 16, 2018 at 8:24 AM <xiangxia.m....@gmail.com> wrote: > > From: Tonghao Zhang <xiangxia.m....@gmail.com> > > The devconf setting on the init_net will affect other > namespace when them created. For example: > > $ cat /proc/sys/net/ipv4/conf/all/rp_filter > 0 > $ echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter > $ cat /proc/sys/net/ipv4/conf/all/rp_filter > 2 > > $ ip netns add ns100 > $ ip netns exec ns100 bash > $ cat /proc/sys/net/ipv4/conf/all/rp_filter > 2 > > The value of rp_filter in the ns100, should be 0 as > default, but it is 2 same as _init_net_.
This has been a known issue for a long time. There were several attempts to fix this. The concern here is whether it breaks existing applications' expectation with the change like yours. There was a proposal introduces a new /proc file to control this behavior, I forget why it is not accepted either. Please check netdev archives. Thanks.