From nobody@FreeBSD.org  Sat Sep  1 08:07:10 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id DC5D037B40A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Sep 2001 08:07:09 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f81F79S35239;
	Sat, 1 Sep 2001 08:07:09 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109011507.f81F79S35239@freefall.freebsd.org>
Date: Sat, 1 Sep 2001 08:07:09 -0700 (PDT)
From: Flemming Jacobsen <fj@batmule.dk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] Packets reinjected by natd but denied by ipfw generates annoying errors
X-Send-Pr-Version: www-1.0

>Number:         30255
>Category:       misc
>Synopsis:       [PATCH] Packets reinjected by natd but denied by ipfw generates annoying errors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 01 08:10:02 PDT 2001
>Closed-Date:    Tue Nov 27 03:07:01 PST 2001
>Last-Modified:  Tue Nov 27 03:08:22 PST 2001
>Originator:     Flemming Jacobsen
>Release:        4-stable
>Organization:
>Environment:
N/A
>Description:
When natd tries to reinject a packet which is denied by a (later) ipfw rule annoying logmessages of the form:
  natd[pid]: failed to write packet back (Permission denied)
are generated.
This patch adds an option to suppress these messages.
>How-To-Repeat:
Install FreeBSD on system with two network cards. Setup nat'ing.
Add an ipfw after the divert rule denying traffic.
Watch the logmessages.
>Fix:
Apply patch from: http://www.batmule.dk/FreeBSD/natd.EACCES.udiff
Add "-nolog_ipfw_denied" to natd commandline
Messages suppressed.

The patch has been tested on 3 moderatly used firewalls for nearly 5+ months without any noticeable ill effects.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Tue Sep 25 07:24:17 PDT 2001 
State-Changed-Why:  
With my MAINTAINER hat on, I don't like this option. 

This error usually indicates a misconfigured firewall. 
It is almost always possible to write firewall rules 
that do not result in EACCES from firewall. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30255 
State-Changed-From-To: closed->open 
State-Changed-By: ru 
State-Changed-When: Wed Oct 31 10:17:23 PST 2001 
State-Changed-Why:  
I will reconsider introducing this option. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Oct 31 10:17:23 PST 2001 
Responsible-Changed-Why:  
I'm the maintainer of natd(8). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30255 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Tue Nov 27 03:07:01 PST 2001 
State-Changed-Why:  
The new option -log_ipfw_denied was introduced, 
active by default with the -verbose option. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30255 
>Unformatted:
