Skip to content

Commit

Permalink
- Fix erroneous netmask after DHCP failure on first setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Nov 17, 2024
1 parent c015833 commit 80b48ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cube/swiss/source/bba.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static void *net_thread_func(void *arg)

net_initialized = 1;
strcpy(swissSettings.bbaLocalIp, inet_ntoa(bba_localip));
swissSettings.bbaNetmask = (32 - __builtin_ctz(bba_netmask.s_addr));
swissSettings.bbaNetmask = bba_netmask.s_addr ? (32 - __builtin_ctz(bba_netmask.s_addr)) : 0;
strcpy(swissSettings.bbaGateway, inet_ntoa(bba_gateway));

char ifname[4];
Expand Down

0 comments on commit 80b48ac

Please sign in to comment.