Re: [RFC Patch net-next] inet: introduce a sysctl ip_local_ports_strict_use

2015-07-24 Thread Cong Wang
On Wed, Jul 22, 2015 at 10:39 PM, Stephen Hemminger wrote: > On Wed, 22 Jul 2015 17:07:37 -0700 > Cong Wang wrote: > >> For a real example, named randomly selects some port to bind() for >> security concern. (It doesn't use bind(0) to let kernel to select port >> because it is not random enough,

Re: [RFC Patch net-next] inet: introduce a sysctl ip_local_ports_strict_use

2015-07-22 Thread Stephen Hemminger
On Wed, 22 Jul 2015 17:07:37 -0700 Cong Wang wrote: > For a real example, named randomly selects some port to bind() for > security concern. (It doesn't use bind(0) to let kernel to select port > because it is not random enough, kernel usually just picks the next > available.) When running named

[RFC Patch net-next] inet: introduce a sysctl ip_local_ports_strict_use

2015-07-22 Thread Cong Wang
Mesos network isolator [1] uses a port range based solution to isolate network traffic to different containers. One problem with this solution is that when some application _explicitly_ binds to a port which is not in its own range, bind() still succeeds but no traffic would even go to that port.