networkd: Add back static routes after DHCPv4 lease expires

System Internals / systemd - Susant Sahani [redhat.com] - 29 April 2019 16:13 EDT

1. When the DHCPv4 lease expires kernel removes the route. So add it back when we gain lease again.

Closes https://github.com/systemd/systemd/issues/12426

2. When UseRoutes=false do not remove router

b5799eeb07 networkd: Add back static routes after DHCPv4 lease expires.
src/network/networkd-dhcp4.c | 9 ++++++---
src/network/networkd-link.c | 2 +-
src/network/networkd-link.h | 1 +
3 files changed, 8 insertions(+), 4 deletions(-)

Upstream: github.com


  • Share