Project

General

Profile

Actions

Bug #3869

closed

tcp anon port calculation wrong

Added by Arne Jansen almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
networking
Start date:
2013-07-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

If tcp_largest_anon_port gets tuned down from the default of 65536, some percentage of all source ports for outgoing tcp connections are chosen as tcp_smallest_anon_port. E.g., if you tune down tcp_largest_anon_port to 49152, 1/4 of all connections will use port 32768 as source port. If you make several successive connections to the same peer, some connections will be rejected with RST, as the tuple is still in use on the peer.

The problem is here:
[[http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/inet/tcp/tcp_bind.c#230]]
The test has to be expanded to also check for port > largest_anon_port.

Workarounds:
a) don't tune down
b) disable random anon port

Actions

Also available in: Atom PDF