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
base: master
Are you sure you want to change the base?
Conversation
31c3dae
to
59c9b2d
Compare
9ec32bf
to
7da34d7
Compare
I would make this `nullOr` and use `optionalString` there. This way nothing changes unless you will it to.
I wonder what @wkennington @tstrobel @rnhmjoj from git blame think.
|
@oxij One thing I found when poking at the networkd version of this is that currently the default broadcast address changes when you toggle |
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. |
That makes sense. |
073a6e1
to
66d396d
Compare
Figured out the systemd/networkd stuff. How does this look? |
I do agree that we should try to homogenize things between scripted and networkd services. Would networkd still work fine if we were to set this option to "+" by default?
As it is:
- I feel like `ip.broadcast != ""`s are begging for that option to become `nullOr`.
- `Broadcast = optional`, I would think this should be `mkIf` or something.
|
66d396d
to
45b1cff
Compare
45b1cff
to
7463368
Compare
There was a problem hiding this 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!
Any updates on this pull request, please? |
I have not tested this post conflict-resolution, though if I understand the change of |
That check is necessary for manual IPv6 setup, as IPv6 does not have broadcast addresses. |
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
This seems to be a useful thing to be able to set. I've got wifi and lan(cabled) connected at the same time. so its missing the brd address. How does everyone else deal with this ? |
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 - from0.0.0.0
to the highest address on the specified network.This fixes #34026 and (already closed) #26196.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
nix path-info -S
before and after)