0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Use (SOCK_DGRAM,IPPROTO_IP) socket instead of (SOCK_STREAM,IPPROTO_TCP).

This is exactly what Linux ifconfig does and seems to be the preferred way.
This commit is contained in:
Martin Mares 1998-10-19 17:48:45 +00:00
parent 4cf45766ba
commit 567e6c6220

View File

@ -170,7 +170,7 @@ scan_if(timer *t)
void void
scan_if_init(void) scan_if_init(void)
{ {
if_scan_sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if_scan_sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
DBG("Using socket %d for interface and route scanning\n", if_scan_sock); DBG("Using socket %d for interface and route scanning\n", if_scan_sock);
if (if_scan_sock < 0) if (if_scan_sock < 0)
die("Cannot create scanning socket: %m"); die("Cannot create scanning socket: %m");