nixos-in-place: netmasks are interpreted wrongly
When /etc/network/interfaces specifies a /18, the network setup script interprets it as being a /16:
# cat /etc/network/interfaces
…
auto eth0
iface eth0 inet static
address …
netmask 255.255.192.0
gateway …
up ip addr add … dev eth0
dns-nameservers 8.8.8.8 8.8.4.4
# ip a
…
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether … brd ff:ff:ff:ff:ff:ff
inet …/16 scope global eth0
valid_lft forever preferred_lft forever
…
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 19 (3 by maintainers)
@KibaFox DO used to write to it as the primary way of configuring the network, but none of the current images make use of that — you’re expected to get this information from the link-local metadata service. It’s written to when you create a new droplet — if we hardcode it in
configuration.nix, every image would have to be provisioned by hand, like in an absurd alternate universe where DHCP was never invented.