Skip to content
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

nixos/networking: set broadcast address #45003

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

imuli
Copy link
Contributor

@imuli imuli commented Aug 14, 2018

Motivation for this change

This allows the broadcast address to be specified in networking.interfaces.*.ipv[46].broadcast defaulting to "+" (which per ip-address(8) sets all the bits after the prefix). This does change the default broadcast address for anyone who has set static addresses - from 0.0.0.0 to the highest address on the specified network.

This fixes #34026 and (already closed) #26196.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@oxij
Copy link
Member

oxij commented Aug 18, 2018 via email

@imuli
Copy link
Contributor Author

imuli commented Aug 20, 2018

@oxij One thing I found when poking at the networkd version of this is that currently the default broadcast address changes when you toggle networking.useNetworkd - it's "0.0.0.0" under scripts and the highest address under networkd. That inconsistency seems undesirable.

@Mic92 Mic92 requested a review from fpletz August 20, 2018 13:27
@imuli
Copy link
Contributor Author

imuli commented Aug 20, 2018

FYI I have a partial version (still with a bug in the networkd version - not clear on how to add fields to that generated file) that drops the "-" option and just gives empty (corresponding to "+") and a full IP address as options to better match up with networkd.

@Mic92
Copy link
Member

Mic92 commented Aug 20, 2018

That makes sense.

@imuli imuli force-pushed the broadcast-address branch 3 times, most recently from 073a6e1 to 66d396d Compare August 21, 2018 00:24
@imuli
Copy link
Contributor Author

imuli commented Aug 21, 2018

Figured out the systemd/networkd stuff. How does this look?

@oxij
Copy link
Member

oxij commented Aug 21, 2018 via email

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the extra checks if broadcast exists. Thanks!

@mmahut
Copy link
Member

mmahut commented Aug 7, 2019

Any updates on this pull request, please?

@imuli
Copy link
Contributor Author

imuli commented Aug 29, 2019

I have not tested this post conflict-resolution, though if I understand the change of forEach = flip map correctly it should work.

@imuli
Copy link
Contributor Author

imuli commented Aug 29, 2019

Looks good except for the extra checks if broadcast exists. Thanks!

That check is necessary for manual IPv6 setup, as IPv6 does not have broadcast addresses.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@stale
Copy link

stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2021
@adminy
Copy link
Contributor

adminy commented Oct 21, 2023

This seems to be a useful thing to be able to set. I've got wifi and lan(cabled) connected at the same time.
Wifi has this:
inet 192.168.1.158/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
lan only has this:
inet 192.168.1.93/24 scope global eth0

so its missing the brd address. How does everyone else deal with this ?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 21, 2023
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@wegank wegank marked this pull request as draft March 20, 2024 14:57
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to define the broadcast address for statically configured interfaces
9 participants