From 687340bf5dad00341bb609926e06c73d7369f622 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 21 Jun 2001 10:28:40 +0000 Subject: [PATCH] When reporting that a packet can't be written back, usually because of a restrictive firewall rule, also report detail on the packet that caused the failure. MFC after: 3 days --- sbin/natd/natd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index a41d540b4bda..3f5ae0dd362e 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -586,7 +586,7 @@ static void DoAliasing (int fd, int direction) static void FlushPacketBuffer (int fd) { int wrote; - char msgBuf[80]; + char msgBuf[160]; /* * Put packet back for processing. */ @@ -616,7 +616,8 @@ static void FlushPacketBuffer (int fd) } else { - sprintf (msgBuf, "failed to write packet back"); + sprintf (msgBuf, "failed to write packet back (%s)", + FormatPacket((struct ip*) packetBuf)); Warn (msgBuf); } }