Disable reads on our ICMP socket. We only use it for sending.
PR: 9253
This commit is contained in:
parent
323753d200
commit
f3d640240b
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user