aboutsummaryrefslogtreecommitdiff
path: root/sbin/natd
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-03-30 10:11:21 +0000
committerBrian Somers <brian@FreeBSD.org>1999-03-30 10:11:21 +0000
commitf3d640240bb2989a4a344d3cafbf2d8041fa2840 (patch)
tree78b857e0b7e957cd665df968efc125697fc254e0 /sbin/natd
parent323753d2002f3138c6abcdda0a86fab35523e27b (diff)
Notes
Diffstat (limited to 'sbin/natd')
-rw-r--r--sbin/natd/natd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index a6e25b3ea7f3..fd7ea110a5ec 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -9,7 +9,7 @@
*
* Ari Suutari <suutari@iki.fi>
*
- * $Id: natd.c,v 1.12 1999/03/24 20:30:20 brian Exp $
+ * $Id: natd.c,v 1.13 1999/03/24 20:30:48 brian Exp $
*/
#define SYSLOG_NAMES
@@ -270,6 +270,13 @@ int main (int argc, char** argv)
icmpSock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
if (icmpSock == -1)
Quit ("Unable to create ICMP socket.");
+
+/*
+ * And disable reads for the socket, otherwise it slowly fills
+ * up with received icmps which we do not use.
+ */
+ shutdown(icmpSock, SHUT_RD);
+
/*
* Become a daemon unless verbose mode was requested.
*/