From 567e6c62208d3bb05b58b8ed08c2be29d6542f2b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 19 Oct 1998 17:48:45 +0000 Subject: [PATCH] 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. --- sysdep/unix/sync-if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdep/unix/sync-if.c b/sysdep/unix/sync-if.c index 44392560..76426e73 100644 --- a/sysdep/unix/sync-if.c +++ b/sysdep/unix/sync-if.c @@ -170,7 +170,7 @@ scan_if(timer *t) 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); if (if_scan_sock < 0) die("Cannot create scanning socket: %m");