-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate the broadcast address #248
Merged
Merged
Conversation
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
Since the Travis CI build doesn't show the problem this might save someone else a bit of time.
|
Sorry I missed this. The code looks correct. Would you mind squashing into a single commit? |
ping @tcely :) |
This is like "ip addr add 127.0.0.1/8 broadcast +" and prevents interfaces without broadcast addresses. Configuring the IP and netmask, but not the broadcast address leaves many applications in a broken state on Linux interfaces.
Squashed these commits as requested. |
brandt
added a commit
to brandt/netlink
that referenced
this pull request
Oct 30, 2019
Since [vishvananda#248](vishvananda#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: - vishvananda#329 - vishvananda#471 See also: - [RFC 3021](http://tools.ietf.org/html/rfc3021) Alternatives to this PR: A. vishvananda#472 - Adds `AddrAddWithoutCalculatedBroadcast`. B. jjastrze-ovh@9a85a61 - Breaking change to make auto-setting the broadcast address an opt-in feature. C. <no existing PR> - Suppress sending of the broadcast to netlink when `addr` has a broadcast set to `0.0.0.0`.
brandt
added a commit
to brandt/netlink
that referenced
this pull request
Oct 30, 2019
Since [vishvananda#248](vishvananda#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: - vishvananda#329 - vishvananda#471 See also: - [RFC 3021](http://tools.ietf.org/html/rfc3021) Alternatives to this PR: A. vishvananda#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.)
vishvananda
pushed a commit
that referenced
this pull request
Nov 13, 2019
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.)
gkodali-zededa
pushed a commit
to gkodali-zededa/netlink
that referenced
this pull request
May 21, 2021
Since [vishvananda#248](vishvananda#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: - vishvananda#329 - vishvananda#471 See also: - [RFC 3021](http://tools.ietf.org/html/rfc3021) Alternatives to this PR: A. vishvananda#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.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is like "ip addr add 127.0.0.1/8 broadcast +" and prevents interfaces without broadcast addresses.
Configuring the IP and netmask, but not the broadcast address leaves many applications in a broken state on Linux interfaces.