Systemd/src/systemd
Thomas Haller f8862395e8 dhcp: handle multiple addresses for "Router" (option 3) in DHCP library
The Router DHCP option may contain a list of one or more
routers ([1]). Extend the API of sd_dhcp_lease to return a
list instead of only the first.

Note that networkd still only uses the first router (if present).
Aside from extending the internal API of the DHCP client, there
is almost no change in behavior. The only visible difference in
behavior is that the "ROUTER" variable in the lease file is now a
list of addresses.

Note how RFC 2132 does not define certain IP addresses as invalid for the
router option. Still, previously sd_dhcp_lease_get_router() would never
return a "0.0.0.0" address. In fact, the previous API could not
differenciate whether no router option was present, whether it
was invalid, or whether its first router was "0.0.0.0". No longer let
the DHCP client library impose additional restrictions that are not
part of RFC. Instead, the caller should handle this. The patch does
that, and networkd only consideres the first router entry if it is not
"0.0.0.0".

[1] https://tools.ietf.org/html/rfc2132#section-3.5
2019-02-18 13:34:22 +01:00
..
_sd-common.h Use c99 static array size declarations in exported functions too 2019-01-04 12:37:25 +01:00
meson.build meson: use cross compilation compatible c++ check 2018-12-28 12:17:06 +09:00
sd-bus-protocol.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-bus-vtable.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-bus.h sd-bus: add sd_bus_close_unref() helper 2019-01-17 16:12:38 +01:00
sd-daemon.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-device.h sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start() 2018-11-10 22:53:00 +09:00
sd-dhcp-client.h network: fix handling of uninitialized and zero IAID setting 2018-12-10 14:25:28 +01:00
sd-dhcp-lease.h dhcp: handle multiple addresses for "Router" (option 3) in DHCP library 2019-02-18 13:34:22 +01:00
sd-dhcp-server.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-dhcp6-client.h dhcp6: don't include internal header "sparse-endian.h" in "sd-dhcp6-client.h" 2018-10-04 21:29:35 +02:00
sd-dhcp6-lease.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-event.h libsystemd: introduce _sd_destroy_t 2018-12-02 06:21:11 +01:00
sd-hwdb.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-id128.h Use c99 static array size declarations in exported functions too 2019-01-04 12:37:25 +01:00
sd-ipv4acd.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-ipv4ll.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
sd-journal.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-lldp.h Merge pull request #11241 from bengal/lldp-802-3-subtypes 2019-01-06 18:15:51 +01:00
sd-login.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-messages.h core: log a recognizable message when a unit succeeds, too 2018-11-16 15:22:48 +01:00
sd-ndisc.h ndisc: improve debug log message 2018-11-06 20:15:09 +09:00
sd-netlink.h sd-netlink: introduce sd_netlink_message_append_sockaddr_in{,6}() 2019-01-28 12:19:29 +01:00
sd-network.h sd-network: add new API sd_network_link_get_dns_default_route() 2018-12-21 12:10:07 +01:00
sd-path.h sd-path: drop redundant "= 0ULL" assignment in enum 2018-11-09 17:19:45 +01:00
sd-radv.h sd-radv: per our CODING_STYLE don't use 'bool' in public headers 2018-11-26 22:31:15 +01:00
sd-resolve.h tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
sd-utf8.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00