]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Use (SOCK_DGRAM,IPPROTO_IP) socket instead of (SOCK_STREAM,IPPROTO_TCP).
authorMartin Mares <mj@ucw.cz>
Mon, 19 Oct 1998 17:48:45 +0000 (17:48 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 19 Oct 1998 17:48:45 +0000 (17:48 +0000)
This is exactly what Linux ifconfig does and seems to be the preferred way.

sysdep/unix/sync-if.c

index 44392560419fb6daff60c18b44ab2b97a4e7292c..76426e73c9570d5ead4a17a0a2c6a418a53c0bc0 100644 (file)
@@ -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");