network: fixes gateway assignment through DHCPv4
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Aug 2020 13:31:01 +0000 (22:31 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Sep 2020 17:48:55 +0000 (19:48 +0200)
commit58bd4a70de5c1937de5f8c35d303fb1be91901fb
treec7989c4fb07be6b289220c26d2085efa47babb32
parent8ad5382fe3795ab9de51adc54d896e3dd00eb6d8
network: fixes gateway assignment through DHCPv4

This fixes the following issue:
- If a DHCP lease does not contains router option, then routes with
`Gateway=_dhcp` setting introduce unexpected results.

This also makes several failure paths critical. And adjust warnings when
classless routes are provided.

(cherry picked from commit 2200c3cf56ca6ddede06c15ca1d9b3dfc60c33ae)
src/network/networkd-dhcp4.c