From nobody  Thu Dec 31 03:46:46 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id DAA20292;
          Thu, 31 Dec 1998 03:46:46 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199812311146.DAA20292@hub.freebsd.org>
Date: Thu, 31 Dec 1998 03:46:46 -0800 (PST)
From: N/A
To: freebsd-gnats-submit@freebsd.org
Subject: received packets piling up on natd's ICMP socket
X-Send-Pr-Version: www-1.0

>Number:         9253
>Category:       bin
>Synopsis:       received packets piling up on natd's ICMP socket
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 31 03:50:00 PST 1998
>Closed-Date:    Tue Mar 30 02:12:07 PST 1999
>Last-Modified:  Tue Mar 30 02:12:28 PST 1999
>Originator:     Juha Nurmela
>Release:        3.0-CURRENT
>Organization:
ACME Inc.
>Environment:
FreeBSD pena.oh5nxo.ampr.org 3.0-CURRENT
FreeBSD 3.0-CURRENT #1: Sun Dec 20 02:0 8:52 EET 1998
junki@pena.oh5nxo.ampr.org:/usr/src/sys/compile/PENA  i386
>Description:
natd creates an icmp socket to send packets out
and never reads anything from the socket.
The socket slowly queues all incoming packets.
>How-To-Repeat:
natd -interface ep0
ipfw divert natd ip from any to any via ep0
...time passes...
netstat -a | grep \^icmp
>Fix:
*** /usr/src/usr.sbin/natd/natd.c      Thu Dec 31 13:05:55 1998
--- /usr/src/usr.sbin/natd/natd.c.old  Thu Dec 31 13:04:25 1998
***************
*** 230,244 ****
                routeSock = -1;
  /*
   * Create socket for sending ICMP messages.
-  * Disable reads for the socket, otherwise it slowly fills
-  * up with received icmps which we do not use.
   */
        icmpSock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
        if (icmpSock == -1)
                Quit ("Unable to create ICMP socket.");
- 
-       shutdown(icmpSock, SHUT_RD);
- 
  /*
   * Become a daemon unless verbose mode was requested.
   */
--- 230,239 ----

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Tue Mar 30 02:12:07 PST 1999 
State-Changed-Why:  
Fixed in -current & -stable, thanks. 
>Unformatted:
