mbox series

[v2,0/3] Namespaceify two sysctls related with route

Message ID 20220824020051.213658-1-xu.xin16@zte.com.cn (mailing list archive)
Headers show
Series Namespaceify two sysctls related with route | expand

Message

CGEL Aug. 24, 2022, 2 a.m. UTC
From: xu xin <xu.xin16@zte.com.cn>

With the rise of cloud native, more and more container applications are
deployed. The network namespace is one of the foundations of the container.
The sysctls of error_cost and error_burst are important knobs to control
the sending frequency of ICMP_DEST_UNREACH packet for ipv4. When different
containers has requirements on the tuning of error_cost and error_burst,
for host's security, the sysctls should exist per network namespace.

Different netns has different requirements on the setting of error_cost
and error_burst, which are related with limiting the frequency of sending
ICMP_DEST_UNREACH packets. Enable them to be configured per netns.


v1->v2:
Change the format of Signed-off-by, remove team's signoff.


*** BLURB HERE ***

xu xin (3):
  ipv4: Namespaceify route/error_cost knob
  ipv4: Namespaceify route/error_burst knob
  ipv4: add documentation of two sysctls about icmp

 Documentation/networking/ip-sysctl.rst | 17 ++++++++++
 include/net/netns/ipv4.h               |  2 ++
 net/ipv4/route.c                       | 45 ++++++++++++++------------
 3 files changed, 44 insertions(+), 20 deletions(-)

Comments

David Ahern Aug. 25, 2022, 3:27 p.m. UTC | #1
On 8/23/22 7:00 PM, cgel.zte@gmail.com wrote:
> From: xu xin <xu.xin16@zte.com.cn>
> 
> With the rise of cloud native, more and more container applications are
> deployed. The network namespace is one of the foundations of the container.
> The sysctls of error_cost and error_burst are important knobs to control
> the sending frequency of ICMP_DEST_UNREACH packet for ipv4. When different
> containers has requirements on the tuning of error_cost and error_burst,
> for host's security, the sysctls should exist per network namespace.
> 
> Different netns has different requirements on the setting of error_cost
> and error_burst, which are related with limiting the frequency of sending
> ICMP_DEST_UNREACH packets. Enable them to be configured per netns.
> 
> 

you did not respond to the IPv6 question Jakub asked.

I think it is legacy for IPv4 since it pre-dates the move to git and
just never added to IPv6. But, if it is important enough for this to
move to per container then it should be important enough to add for IPv6
too.
CGEL Aug. 30, 2022, 9:59 a.m. UTC | #2
On Thu, Aug 25, 2022 at 08:27:04AM -0700, David Ahern wrote:
> On 8/23/22 7:00 PM, cgel.zte@gmail.com wrote:
> > From: xu xin <xu.xin16@zte.com.cn>
> > 
> > With the rise of cloud native, more and more container applications are
> > deployed. The network namespace is one of the foundations of the container.
> > The sysctls of error_cost and error_burst are important knobs to control
> > the sending frequency of ICMP_DEST_UNREACH packet for ipv4. When different
> > containers has requirements on the tuning of error_cost and error_burst,
> > for host's security, the sysctls should exist per network namespace.
> > 
> > Different netns has different requirements on the setting of error_cost
> > and error_burst, which are related with limiting the frequency of sending
> > ICMP_DEST_UNREACH packets. Enable them to be configured per netns.
> > 
> > 
> 
> you did not respond to the IPv6 question Jakub asked.
> 
> I think it is legacy for IPv4 since it pre-dates the move to git and
> just never added to IPv6. But, if it is important enough for this to
> move to per container then it should be important enough to add for IPv6
> too.

Probably yes, but however, there are still many applications using the
legacies for IPv4. Maybe it's not that important for IPv6 that have never
used it, but from the perspective of container's compatibility to host,
it is better to move to per container.