Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f19157dfa033
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ab018f754bc9
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 10, 2020

  1. nixos/network-interfaces: assertion for DHCP on bridges

    Assert that the user doesn't have a bridge configured while
    networking.useDHCP is true. Due to new behaviour of dhcpcd [0], this
    would result in the bridge not getting an address via DHCP, regardless
    of wether it has networking.interfaces.<name?>.useDHCP set or not.
    
    [0] https://roy.marples.name/archives/dhcpcd-discuss/0002621.html
    erictapen committed Apr 10, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    erictapen Kerstin
    Copy the full SHA
    54ad186 View commit details
  2. Merge pull request #84221 from erictapen/dhcpcd-error-on-bridges

    [20.03] nixos/network-interfaces: Assert that bridges can get an address via DHCP
    worldofpeace authored Apr 10, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ab018f7 View commit details
Showing with 11 additions and 0 deletions.
  1. +11 −0 nixos/modules/tasks/network-interfaces.nix
11 changes: 11 additions & 0 deletions nixos/modules/tasks/network-interfaces.nix
Original file line number Diff line number Diff line change
@@ -976,6 +976,17 @@ in
Temporary addresses are only needed when IPv6 is enabled.
'';
})) ++ [
{
assertion = cfg.useDHCP -> cfg.bridges == {};
message = ''
There are the bridges [ ${builtins.toString (builtins.attrNames cfg.bridges)} ] configured while `networking.useDHCP` is enabled.
dhcpcd doesn't give IPv4 addresses to bridges by default anymore,
so you have to set `networking.useDHCP = false` and then whitelist
every interface you need DHCP on with
`networking.interfaces.<name?>.useDHCP = true`.
'';
}
] ++ [
{
assertion = cfg.hostId == null || (stringLength cfg.hostId == 8 && isHexString cfg.hostId);
message = "Invalid value given to the networking.hostId option.";