-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't auto-set broadcast unless subnet larger than /31
Since [#248](#248), adding an address automatically sets the broadcast if the broadcast address was not specified. This is undesirable when adding an IP with a prefixlen of /31 or /32. (Additional details in the issues linked below.) This changes the behavior so that the broadcast is only automatically set if the prefixlen is /30 or larger. Issue reported in: - #329 - #471 See also: - [RFC 3021](http://tools.ietf.org/html/rfc3021) Alternatives to this PR: A. #472 - Adds `AddrAddWithoutCalculatedBroadcast`. B. jjastrze-ovh@9a85a61 - Breaking change to make auto-setting the broadcast address an opt-in feature. C. already works - Suppress setting the broadcast when addr's broadcast address is set to `0.0.0.0`. (This works today, but I'm not sure the behavior can be relied upon as a public API.)
- Loading branch information
1 parent
e934999
commit aad0bae
Showing
1 changed file
with
31 additions
and
2 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