summaryrefslogtreecommitdiffstats
path: root/sbin/natd/natd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/natd/natd.c')
-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 a6e25b3..fd7ea11 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.
*/
OpenPOWER on IntegriCloud