summaryrefslogtreecommitdiffstats
path: root/sbin/natd
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-11-27 11:00:16 +0000
committerru <ru@FreeBSD.org>2001-11-27 11:00:16 +0000
commit3c293c52fd17eb62317ce21a6a3613d80b6eea80 (patch)
tree415a291cb583348e3b54a076e3d0978c405d749c /sbin/natd
parent1274247e0e3dd348947218f27d7fe44eba6806b1 (diff)
downloadFreeBSD-src-3c293c52fd17eb62317ce21a6a3613d80b6eea80.zip
FreeBSD-src-3c293c52fd17eb62317ce21a6a3613d80b6eea80.tar.gz
Fixed (local) style bugs in previous revision.
Diffstat (limited to 'sbin/natd')
-rw-r--r--sbin/natd/natd.84
-rw-r--r--sbin/natd/natd.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/sbin/natd/natd.8 b/sbin/natd/natd.8
index 20961a2..a6d927b 100644
--- a/sbin/natd/natd.8
+++ b/sbin/natd/natd.8
@@ -463,7 +463,9 @@ rules starting from the rule number
will be used for punching firewall holes.
The range will be cleared for all rules on startup.
.It Fl log_ipfw_denied
-Log when a packet can't be re-injected because a ipfw rule deny it.
+Log when a packet can not be re-injected because an
+.Xr ipfw 8
+rule blocks it.
.El
.Sh RUNNING NATD
The following steps are necessary before attempting to run
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index b5e65fc..351d652 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -126,7 +126,7 @@ static int packetDirection;
static int dropIgnoredIncoming;
static int logDropped;
static int logFacility;
-static int log_ipfw_denied;
+static int logIpfwDenied;
int main (int argc, char** argv)
{
@@ -161,7 +161,7 @@ int main (int argc, char** argv)
dynamicMode = 0;
logDropped = 0;
logFacility = LOG_DAEMON;
- log_ipfw_denied = 0;
+ logIpfwDenied = 0;
/*
* Mark packet buffer empty.
*/
@@ -616,7 +616,7 @@ static void FlushPacketBuffer (int fd)
(struct ip*) packetBuf,
ifMTU - aliasOverhead);
}
- else if (errno == EACCES && log_ipfw_denied) {
+ else if (errno == EACCES && logIpfwDenied) {
sprintf (msgBuf, "failed to write packet back");
Warn (msgBuf);
@@ -1257,7 +1257,7 @@ static void ParseOption (const char* option, const char* parms)
break;
case LogDenied:
- logDropped = 1;
+ logDropped = yesNoValue;
break;
case LogFacility:
@@ -1283,8 +1283,10 @@ static void ParseOption (const char* option, const char* parms)
case PunchFW:
SetupPunchFW(strValue);
break;
+
case LogIpfwDenied:
- log_ipfw_denied=1;
+ logIpfwDenied = yesNoValue;;
+ break;
}
}
OpenPOWER on IntegriCloud