summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/networking/dhcpcd.nix
AgeCommit message (Collapse)Author
2018-11-30nixos/dhcpcd: (try to) restart chrony in the exitHookAustin Seipp
As the comment notes, restarts/exits of dhcpcd generally require restarting the NTP service since, if name resolution fails for a pool of servers, the service might break itself. To be on the safe side, try restarting Chrony in these instances, too. Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-08-22nixos/dhcpcd: Wait for devices to settleSarah Brofeldt
2018-08-05dhcpcd service: order before network targetVincent Bernat
This reverts a change applied in PR #18491. When interfaces are configured by DHCP (typical in a cloud environment), ordering after network.target cause trouble to applications expecting some network to be present on boot (for example, cloud-init is quite brittle when network hasn't been configured for `cloud-init.service`) and on shutdown (for example, collectd needs to flush metrics on shutdown). When ordering after network.target, we ensure applications relying on network.target won't have any network reachability on boot and potentially on shutdown. Therefore, I think ordering before network.target is better.
2018-02-20Merge pull request #35141 from abbradar/dhcpcd-orderFranz Pletz
dhcpcd service: fix service dependencies when default gateways are set
2018-02-19dhcpcd service: want for both IP stacksNikolay Amiantov
We want to wait for both stacks to be active before declaring that network is active. So either both default gateways must be specified or only IPv4 if IPv6 is disabled to avoid dhcpcd for network-online.target.
2018-02-19dhcpcd service: always want by multi-userNikolay Amiantov
When default gateways were specified the service wasn't wanted by anything at all before.
2018-02-17nixos/networking-interfaces: rename IP addresses/routes optionsrnhmjoj
2017-09-18nixos/networking: network is online if default gw setFranz Pletz
Previously services depending on network-online.target would wait until dhcpcd times out if it was enabled and a static network address configuration was used. Setting the default gateway statically is enough for the networking to be considered online. This also adjusts the relevant networking tests to wait for network-online.target instead of just network.target.
2017-04-16dhcpcd service: clear exit code of exitHook (#24909)Christian Kögler
* dhcpcd: clear exit code of exitHook * dhcpcd: restart ntp server in oneshot in exit-hook
2017-02-23dhcpcd service: fix network-online.target integrationFranz Pletz
When dhcpcd instead of networkd is used, the network-online.target behaved the same as network.target, resulting in broken services that need a working network connectivity when being started. This commit makes dhcpcd wait for a lease and makes it wanted by network-online.target. In turn, network-online.target is now wanted by multi-user.target, so it will be activated at every boot.
2016-09-13networking.dhcpcd: use upstream targetsAlexander Ried
2016-09-13networking.dhcpcd: Don't add to system closure when using networkd (#18436)Alexander Ried
2016-09-11treewide: fix fallout of ip-up deprecationFranz Pletz
See #18319 for details. Starting network-online.target manually does not work as it hangs indefinitely. Additionally, don't treat avahi and dhcpcd special and sync their systemd units with the respective upstream suggestion.
2016-09-10treewide: deprecate ip-up.target (#18319)Alexander Ried
Systemd upstream provides targets for networking. This also includes a target network-online.target. In this PR I remove / replace most occurrences since some of them were even wrong and could delay startup.
2015-09-25nixos networking: add vswitch optionThomas Strobel
Add a configuration option for Open vSwitch that is similar to the option for the Linux kernel ethernet bridge.
2015-02-22nixos/dhcpcd: Only run resume commands if enabled.aszlig
The networkd implementation sets systemd.services.dhcpcd.enable to false in nixos/modules/tasks/network-interfaces-systemd.nix. So we need to respect that in the dhcpcd module. If we don't, the resumeCommand is set nevertheless, which causes the post-resume.service to fail after resuming: Failed to reload dhcpcd.service: Unit dhcpcd.service is masked. post-resume.service: main process exited, code=exited, status=1/FAILURE Failed to start Post-Resume Actions. Dependency failed for Post-Resume Actions. Unit post-resume.service entered failed state. post-resume.service failed. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-02-04nixos/dhcpd: Also try restarting openntpd as it suffers the same dns ↵William A. Kennington III
resolution problem
2014-11-26nixos/networking: FixesWilliam A. Kennington III
2014-11-26nixos/dhcpcd: Respect per interface dhcp optionsWilliam A. Kennington III
2014-11-26nixos: Support network-online target in addition to ip-upWilliam A. Kennington III
2014-11-26nixos/network-interfaces: Provide a networkd implementationWilliam A. Kennington III
2014-09-06start dhcpcd after network-interfacesAristid Breitkreuz
2014-09-01Merge pull request #3908 from wkennington/master.ipMichael Raskin
Reapply the multi-ip code
2014-09-01nixos: add dhcpcd.persistent optionJan Malakhovski
2014-08-31Revert "Revert "Merge pull request #3182 from wkennington/master.ipv6""William A. Kennington III
This reverts commit ea8910652fcecbcd4f21aa1c66b1a0a239408b04.
2014-08-31Revert "Merge pull request #3182 from wkennington/master.ipv6"Rob Vermaas
This reverts commit b23fd6585481a42937e105d5fce630a549900e86, reversing changes made to 43654cba2c280ce17b81db44993d1c1bcae3a9c6.
2014-08-30nixos/network-interfaces: Support the old ip configuration conventionWilliam A. Kennington III
2014-08-30nixos/network-interfaces: Add support for multiple ipv4 / ipv6 addressesWilliam A. Kennington III
2014-08-29Merge pull request #3200 from wkennington/master.dhcpcdMichael Raskin
nixos/dhcpcd: Add an explicit interfaces option
2014-08-14nixos/dhcpcd: Don't configure sit devicesWilliam A. Kennington III
2014-08-14nixos/dhcpcd: Use null instead of empty list to disable allowInterfacesWilliam A. Kennington III
2014-08-14nixos/dhcpcd: Add an explicit interfaces optionWilliam A. Kennington III
2014-05-12dhcpcd: Allow adding hook codeWout Mertens
2014-05-07Containers: Use systemd-nspawn's --network-veth flagEelco Dolstra
Note that this causes the name of the host-side interface to change from c-<name> to ve-<name>.
2014-04-24dhcpcd: Fix segfaultsEelco Dolstra
This fixes several problems in the dhcpcd service: * A segfault during startup, due to a race with udev (dhcpcd would get an ADD event from udev, causing it to re-add an interface that it already had, leading to a segfault later on). * A hang/segfault processing "dhcpcd rebind" (which NixOS calls after waking up from suspend). Also, add "lo" to the list of ignored interfaces. It usually ignores "lo", but apparently not when it gets an ADD event from udev.
2014-04-24Remove some dead codeEelco Dolstra
2014-04-18Remove dhcpcd_without_udev attributeEelco Dolstra
2014-04-18Work around apparent dhcpcd bugEelco Dolstra
2014-04-18Slight test speedupEelco Dolstra
Don't do a pointless ARP check in dhcpcd.
2014-04-14Rewrite ‘with pkgs.lib’ -> ‘with lib’Eelco Dolstra
Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
2014-04-10Merge branch 'containers'Eelco Dolstra
Fixes #2105.
2014-03-24nixos: fix linux containers (systemd-nspawn, lxc, lxc-libvirt)Jaka Hudoklin
- Make dhcp work, use dhcpcd without udev in container - Make login shell work, patch getty to not wait for /dev/tty0 - Make ssh work, sshd/pam do not start session
2014-03-18Add support for running a container with a private network interfaceEelco Dolstra
For example, the following sets up a container named ‘foo’. The container will have a single network interface eth0, with IP address 10.231.136.2. The host will have an interface c-foo with IP address 10.231.136.1. systemd.containers.foo = { privateNetwork = true; hostAddress = "10.231.136.1"; localAddress = "10.231.136.2"; config = { services.openssh.enable = true; }; }; With ‘privateNetwork = true’, the container has the CAP_NET_ADMIN capability, allowing it to do arbitrary network configuration, such as setting up firewall rules. This is secure because it cannot touch the interfaces of the host. The helper program ‘run-in-netns’ is needed at the moment because ‘ip netns exec’ doesn't quite do the right thing (it remounts /sys without bind-mounting the original /sys/fs/cgroups).
2014-02-02dhcpcd: Update to 6.2.1Eelco Dolstra
Dhcpcd now has integration with udev, so it should no longer be a problem if udev renames an interface while dhcpcd is running.
2013-12-31network-interfaces: Add the ability to create bond devicesWilliam A. Kennington III
This patch adds support for the creations of new bond devices, aggregate pipes of physical devices for extra throughput or failover. Additionally, add better correction at the startup of a bridge of vlan interface (delete old, stale interfaces).
2013-11-26Disable various services when running inside a containerEelco Dolstra
2013-10-29Remove the dhclient moduleEelco Dolstra
It's no longer used by NixOS (replaced by dhcpcd).
2013-10-10Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra