mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Don't scan broadcast address, limit network size
This commit is contained in:
parent
59babd75a2
commit
f28e95b078
@ -1005,8 +1005,12 @@ void overlay_mdp_poll(struct sched_ent *alarm)
|
||||
continue;
|
||||
|
||||
scans[i].interface = interface;
|
||||
scans[i].current = ntohl(interface->address.sin_addr.s_addr & interface->netmask.s_addr);
|
||||
scans[i].last = ntohl(interface->broadcast_address.sin_addr.s_addr);
|
||||
scans[i].current = ntohl(interface->address.sin_addr.s_addr & interface->netmask.s_addr)+1;
|
||||
scans[i].last = ntohl(interface->broadcast_address.sin_addr.s_addr)-1;
|
||||
if (scans[i].last - scans[i].current>0x10000){
|
||||
INFOF("Skipping scan on interface %s as the address space is too large",interface->name);
|
||||
continue;
|
||||
}
|
||||
scans[i].alarm.alarm=start;
|
||||
scans[i].alarm.function=overlay_mdp_scan;
|
||||
start+=100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user