summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-10-19 19:48:45 +0200
committerMartin Mares <mj@ucw.cz>1998-10-19 19:48:45 +0200
commit567e6c62208d3bb05b58b8ed08c2be29d6542f2b (patch)
treea3871320714412f3bb91f2f0c90aae44989292af
parent4cf45766bac4b1e3f5196f7e36d012cb7c010dc1 (diff)
downloadbird-567e6c62208d3bb05b58b8ed08c2be29d6542f2b.tar
bird-567e6c62208d3bb05b58b8ed08c2be29d6542f2b.zip
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.
-rw-r--r--sysdep/unix/sync-if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/sync-if.c b/sysdep/unix/sync-if.c
index 4439256..76426e7 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");