diff options
author | Martin Mares <mj@ucw.cz> | 1998-10-19 17:48:45 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-10-19 17:48:45 +0000 |
commit | 567e6c62208d3bb05b58b8ed08c2be29d6542f2b (patch) | |
tree | a3871320714412f3bb91f2f0c90aae44989292af /sysdep/unix | |
parent | 4cf45766bac4b1e3f5196f7e36d012cb7c010dc1 (diff) |
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 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"); |