Commit 567e6c62 authored by Martin Mareš's avatar Martin Mareš

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.
parent 4cf45766
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment