networkd : verify dns ip address when parsing configuration (#4492)

System Internals / systemd - Susant Sahani [users.noreply.github.com] - 26 October 2016 18:31 UTC

Invalid IP addresses would be passed through as-is: $ networkctl status wlp3s0: ● 2: wlp3s0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/wlp3s0.network Type: wlan State: routable (configured) Path: pci-0000:03:00.0 Driver: iwlwifi
Vendor: Intel Corporation Model: Centrino Advanced-N 6205 [Taylor Peak] (Centrino Advanced-N 6205 AGN) HW Address: XXXXXXXXXX (Intel Corporate) Address: 192.168.2.103

Gateway: 192.168.2.1 (Arcadyan Technology Corporation) DNS: 127.0.0.5553

Instead verify that DNS= has a valid list of addresses when parsing configuration.

Fixes #4462.

5325382 networkd : verify dns ip address when parsing configuration (#4492)
src/network/networkd-network-gperf.gperf | 2 +-
src/network/networkd-network.c | 50 ++++++++++++++++++++++++++++++
src/network/networkd-network.h | 1 +
3 files changed, 52 insertions(+), 1 deletion(-)

Upstream: github.com


  • Share