Lines 1234-1246
Link Here
|
1234 |
} |
1234 |
} |
1235 |
/* We need to enable BSD compatibility. Otherwise an attacker |
1235 |
/* We need to enable BSD compatibility. Otherwise an attacker |
1236 |
* could flood our log files by sending us tons of ICMP errors. |
1236 |
* could flood our log files by sending us tons of ICMP errors. |
1237 |
*/ |
|
|
1238 |
if (setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, \ |
1237 |
if (setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, \ |
1239 |
(char *) &on, sizeof(on)) < 0) { |
1238 |
(char *) &on, sizeof(on)) < 0) { |
1240 |
logerror("setsockopt(BSDCOMPAT), suspending inet"); |
1239 |
logerror("setsockopt(BSDCOMPAT), suspending inet"); |
1241 |
close(fd); |
1240 |
close(fd); |
1242 |
return -1; |
1241 |
return -1; |
1243 |
} |
1242 |
} |
|
|
1243 |
*/ |
1244 |
if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) { |
1244 |
if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) { |
1245 |
logerror("bind, suspending inet"); |
1245 |
logerror("bind, suspending inet"); |
1246 |
close(fd); |
1246 |
close(fd); |