Bug 81611

Summary: [patch] natd runs with -same_ports by default
Product: Documentation Reporter: Alexander Melkov <melkov>
Component: Manual PagesAssignee: freebsd-doc (Nobody) <doc>
Status: Open ---    
Severity: Affects Only Me CC: doc
Priority: Normal Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   

Description Alexander Melkov 2005-05-29 03:00:09 UTC
even without -same_ports | -m switch natd tries to allocate the same
source port as in the original packet.

PKT_ALIAS_SAME_PORTS flag is set up in LibAliasInit function, -m switch
can also only set this flag.

Probably this default behaviour is actually good, and that's the manpage
should be shanged, not libalias :).

Fix: 

Workaround: create and use a config have with
same_ports no
How-To-Repeat: run natd without -m and inspect incoming and outgoing packet ports with tcpdump.
Comment 1 Matteo Riondato 2005-06-07 19:42:07 UTC
I can confirm this.
IMHO it's not a bug but a feature so it's the man page that should be
fixed.

Please note that this is a probably a doc bug.

A patch for it follows:

--- natd.8.old  Tue Jun  7 20:12:22 2005
+++ natd.8      Tue Jun  7 20:13:07 2005
@@ -65,8 +65,6 @@
 IP address is that of the current machine.
 For each packet changed in this manner, an internal table entry 
 created to record this fact.
-The source port number is also changed to indicate the table ent
-applying to the packet.
 Packets that are received with a target IP of the current host a
 checked against this internal table.
 If an entry is found, it is used to determine the correct target
@@ -110,8 +108,9 @@
 Try to keep the same port number when altering outgoing packets.
 With this option, protocols such as RPC will have a better chanc
 of working.
+Please note that this is the default behaviour.
 If it is not possible to maintain the port number, it will be si
-changed as per normal.
+changed.
.It Fl verbose | v
Do not call
.Xr daemon 3
			 

Best Regards
-- 
Rionda aka Matteo Riondato
G.U.F.I. Staff Member (http://www.gufi.org)
FreeSBIE Developer (http://www.freesbie.org)
Comment 2 Matteo Riondato freebsd_committer freebsd_triage 2006-03-04 10:30:02 UTC
Responsible Changed
From-To: freebsd-bugs->matteo

I'll handle this
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2010-06-19 05:41:48 UTC
Responsible Changed
From-To: matteo->freebsd-doc

Reset PR assigned to inactive committer. 

Hat:	gnats-admin
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:41 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped