diff options
author | Martin Mares <mj@ucw.cz> | 1998-10-19 19:48:45 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-10-19 19:48:45 +0200 |
commit | 567e6c62208d3bb05b58b8ed08c2be29d6542f2b (patch) | |
tree | a3871320714412f3bb91f2f0c90aae44989292af /sysdep/unix | |
parent | 4cf45766bac4b1e3f5196f7e36d012cb7c010dc1 (diff) | |
download | bird-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.
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/sync-if.c | 2 |
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"); |