-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set broadcast IP address for static IPv4 config
When running the `"ip addr"` command, the broadcast IP address wasn't getting set properly: ``` 4: uap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000 link/ether b4:8c:9d:9c:2a:0b brd ff:ff:ff:ff:ff:ff inet 172.16.61.1/24 brd 172.16.61.1 scope global uap0 valid_lft forever preferred_lft forever ``` I'm not sure when/how this started, but this commit fixes the issue by always setting it to the all-ones host (RFC 922): ``` 4: uap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000 link/ether b4:8c:9d:9c:2a:0b brd ff:ff:ff:ff:ff:ff inet 172.16.61.1/24 brd 172.16.61.255 scope global uap0 valid_lft forever preferred_lft forever ``` The code supports /31 and /32 subnets to avoid raising should this ever be called for them.
- Loading branch information
Showing
3 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters