mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Fixed broadcast calculation bug.
This commit is contained in:
parent
70b287a1c9
commit
45dcebc048
4
batman.c
4
batman.c
@ -80,8 +80,8 @@ int readRoutingTable(struct in_addr peers[],int *peer_count,int peer_max){
|
||||
|
||||
if (m!=0xFFFFFFFF){
|
||||
/* Netmask indicates a network, so calculate broadcast address */
|
||||
unsigned int d=(d&m)|(0xffffffff^m);
|
||||
if (debug>1) fprintf(stderr,"Adding broadcast address %08x\n",d);
|
||||
d=(d&m)|(0xffffffff^m);
|
||||
if (debug) fprintf(stderr,"Adding broadcast address %08lx\n",d);
|
||||
}
|
||||
|
||||
if (*peer_count<peer_max) peers[(*peer_count)++].s_addr=d;
|
||||
|
Loading…
Reference in New Issue
Block a user