diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-14 16:25:01 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-18 13:34:22 +0100 |
commit | 072320eab04d29247d7eb1b1fc32ae10e25c020f (patch) | |
tree | 3427c60c7b495eedb22b95d33bad673411b944b1 /src/basic/in-addr-util.h | |
parent | dhcp: handle multiple addresses for "Router" (option 3) in DHCP library (diff) | |
download | systemd-072320eab04d29247d7eb1b1fc32ae10e25c020f.tar.xz systemd-072320eab04d29247d7eb1b1fc32ae10e25c020f.zip |
dhcp: move filtering of bogus DNS/NTP addresses out of DHCP client
The DHCP client should not pre-filter addresses beyond what RFC
requires. If a client's user (like networkd) wishes to skip/filter
certain addresses, it's their responsibility.
The point of this is that the DHCP library does not hide/abstract
information that might be relevant for certain users. For example,
NetworkManager exposes DHCP options in its API. When doing that, the
options should be close to the actual lease.
This is related to commit d9ec2e632df4905201facf76d6a205edc952116a
(dhcp4: filter bogus DNS/NTP server addresses silently).
Diffstat (limited to 'src/basic/in-addr-util.h')
-rw-r--r-- | src/basic/in-addr-util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/in-addr-util.h b/src/basic/in-addr-util.h index 3069790519..c21567122c 100644 --- a/src/basic/in-addr-util.h +++ b/src/basic/in-addr-util.h @@ -30,6 +30,8 @@ int in_addr_is_link_local(int family, const union in_addr_union *u); bool in4_addr_is_localhost(const struct in_addr *a); int in_addr_is_localhost(int family, const union in_addr_union *u); +bool in4_addr_is_non_local(const struct in_addr *a); + int in_addr_equal(int family, const union in_addr_union *a, const union in_addr_union *b); int in_addr_prefix_intersect(int family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen); int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen); |