mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
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.
This commit is contained in:
parent
4cf45766ba
commit
567e6c6220
@ -170,7 +170,7 @@ scan_if(timer *t)
|
|||||||
void
|
void
|
||||||
scan_if_init(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);
|
DBG("Using socket %d for interface and route scanning\n", if_scan_sock);
|
||||||
if (if_scan_sock < 0)
|
if (if_scan_sock < 0)
|
||||||
die("Cannot create scanning socket: %m");
|
die("Cannot create scanning socket: %m");
|
||||||
|
Loading…
Reference in New Issue
Block a user