NetworkManager/src/systemd
Thomas Haller 0a797bdc2a systemd/dhcp: fix assertion starting DHCP client without MAC address
An assertion in dhcp_network_bind_raw_socket() is triggered when
starting an sd_dhcp_client without setting setting a MAC address
first.

  - sd_dhcp_client_start()
    - client_start()
      - client_start_delayed()
        - dhcp_network_bind_raw_socket()

In that case, the arp-type and MAC address is still unset. Note that
dhcp_network_bind_raw_socket() already checks for a valid arp-type
and MAC address below, so we should just gracefully return -EINVAL.

Maybe sd_dhcp_client_start() should fail earlier when starting without
MAC address. But the failure here will be correctly propagated and
the start aborted.

See-also: https://github.com/systemd/systemd/pull/10054
(cherry picked from commit 34af574d58)
2018-09-12 10:40:07 +02:00
..
sd-adapt systemd: merge branch systemd into master 2018-08-27 10:40:34 +02:00
src systemd/dhcp: fix assertion starting DHCP client without MAC address 2018-09-12 10:40:07 +02:00
meson.build systemd: merge branch systemd into master 2018-08-27 10:40:34 +02:00
nm-sd.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-sd.h build: don't add systemd path the include search path 2016-09-27 14:13:21 +02:00