Bug 24683

Summary: obscure natd(8) error message
Product: Base System Reporter: klaus <klaus>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
natd.newpatch none

Description klaus 2001-01-27 19:10:04 UTC
There is a rather annoying problem with natd(8)'s error message
"unable to write packet back (...)". This error message may occur
when a host is down, or when a firewall rule prevents natd from
completing a sendto(). The problem is not that this error message 
exists, but that it does not give *any* detail (_which_ packet, 
addresses?).

The problem is frequently reported on -questions and other lists,
and it's also been bugging me for a while because I just couldn't
figure out what was happening from ipfw logs et al.

Fix: This simple patch makes the error message verbose enough to be useful:
How-To-Repeat: 
(see description)
One scenario where this seems to happen frequently is when you're 
running Samba and natd on the same box.
Comment 1 k.brunner 2001-01-28 12:01:48 UTC
Here's a slightly extended patch which also substitutes snprintf() for
sprintf().
Comment 2 ru freebsd_committer freebsd_triage 2001-02-27 08:36:03 UTC
State Changed
From-To: open->closed

natd(8) shows the packet's details if run in verbose mode: 

Out [TCP]  [TCP] 194.220.45.115:49328 -> 212.110.128.68:21 aliased to 
[TCP] 194.220.45.115:41926 -> 212.110.128.68:21 
natd: failed to write packet back: Permission denied