]> git.ipfire.org Git - thirdparty/systemd.git/commit
networkd : verify dns ip address when parsing configuration (#4492)
authorSusant Sahani <ssahani@users.noreply.github.com>
Wed, 26 Oct 2016 23:31:04 +0000 (05:01 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 26 Oct 2016 23:31:04 +0000 (19:31 -0400)
commit532538244028ca90e9a7c59ec9627a3ff17a7da8
treeddf0f5718c4865443f1e899306faad005b0a2230
parent808b95ef82a0715af7bde08a0050e2477bfc6f0f
networkd : verify dns ip address when parsing configuration (#4492)

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
                  XXXXXXXXXXX
         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.
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h