Bug 31393

Summary: portmap(1) cannot be bound solely to 127.0.0.1
Product: Base System Reporter: Frank Tobin <ftobin>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   

Description Frank Tobin 2001-10-20 22:50:00 UTC
It is not possible to start portmap listening solely to the localhost (127.0.0.1).  The problem is that portmap always appends 127.0.0.1 to every list of -h options (addresses) passed in, and then dies when tryin to bind to the localhost port the second time.

Fix: 

One solution would be to have portmap not add 127.0.0.1 automatically to its list; this functionality is probably not a good design.  But due to backwards compatibility, a more desirable option would be to just have to check if 127.0.0.1 is in hosts[] before adding it a second time to the list of addresses to bind to.
How-To-Repeat: Run "portmap -h 127.0.0.1".  portmap will die.
Comment 1 ceri 2001-10-23 09:07:05 UTC
There is already a patch for this in bin/30235

I believe this problem no longer exists in -current, so this patch would
need to be applied directly to -stable, so if you could test it out that
would be good.

Please submit followup to that PR, so that this PR can be closed.

Ceri
Comment 2 dwmalone freebsd_committer freebsd_triage 2001-10-24 21:18:52 UTC
State Changed
From-To: open->closed

Closed at submitters request as a duplicate of PR 30235, which contains 
patches.