sd-dhcp6-client.c uses ARPHRD_ETHER and more from net/if_arp.h.
In upstream systemd code, that header is included indirectly via
udev.h. As we don't include udev.h, include net/if_arp.h
directly in the adapter.
This function was added to inject the ifname to the dhcp6 client.
As dhcp_identifier_set_iaid() now looks up the name itself by calling
if_indextoname(), this is no longer needed.
Also patch dhcp_identifier_set_iaid() to get the ifname via
if_indextoname(), instead of udev.
This also makes our local modification sd_dhcp6_client_set_ifname()
obsolete, which will be removed next.
The 'log.h' header from systemd implements most logging commands based on a
few fundamental logging commands. Reuse 'log.h' for most parts and let the
adapter only redefine the necessary commands.
I cannot reproduce any compiler warnings with these changes.
I think it is desirable, that our version of the code is
as similar as possible to the upstream systemd code.
Undo these local modifications.
Make our copy more similar to what systemd has by removing
local changes that are unnecessary.
These changes don't affect the build, because the code is excluded
with #if 0.
dcbw added a comment line and submitted the patch to systemd.
The patch was merged without the comment. Remove it also from our
version, to make the file more similar to what systemd has.
Only basic merging. The result does not yet compile.
https://bugzilla.gnome.org/show_bug.cgi?id=742719
Conflicts:
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-packet.c
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.c
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.h
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-lease.c
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
src/dhcp-manager/systemd-dhcp/src/shared/macro.h
src/dhcp-manager/systemd-dhcp/src/shared/strv.c
src/dhcp-manager/systemd-dhcp/src/shared/util.c
src/dhcp-manager/systemd-dhcp/src/shared/util.h
src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
The statement
g_return_val_if_reached (NM_MODEM_IP_TYPE_UNKNOWN);
was wrong, because the return type is 'const char *'.
But just refactor nm_modem_ip_type_to_string() to get rid of
the static table and make it a switch statement.
Fixes: 85d9132464
A gnu extension to printf adds the format specifier "%m"
to print @errno. To preserve the error number until the
point where the logging statement is constructed, pass
it as an additional argument to _nm_log().
This is not (yet) used from NM internal code. But systemd is adding
similar functionality to its logging functions. Add the same also to
nm-logging, to support systemd's usage of "%m".
This does not yet work, because the --order option
contains colons which bash completion considers as
separaters.
For now, implement it and ignore that problem. It
works correctly until you specify more then one
order-columns separated by colon.
https://bugzilla.gnome.org/show_bug.cgi?id=738613
Fixes: 40e98f5d68
dhclient only supports fqdn.fqdn for server DDNS updates with
DHCPv6. And even though the underlying DHCP options that fqdn.fqdn
controls allow non-qualified hostnames on the wire, dhclient does
not. So we must require a fully-qualified name for DHCPv6.
Second, while no-client-updates seems like it should be "off", doing
that apparently makes dhclient set the "O" flag to 1 which appears to
be a bug, and results in the server not doing the DDNS update. So
we must stop setting that option too.
Found by: Alexander Groß
No functional change, a cosmetic thing for now.
We want it set before any routes are added and ensure routes have a valid
ifindex before we pass it to the platform.
In a future NMRouteManager will need to look up the route for a device in
its cache thus we'll need to make sure routes passed to the it have an
appropriate ifindex set.
No functional change, a cosmetic thing for now.
We want it set before any routes are added and ensure routes have a valid
ifindex before we pass it to the platform.
In a future NMRouteManager will need to look up the route for a device in
its cache thus we'll need to make sure routes passed to the it have an
appropriate ifindex set.
Create a NMRouteManager singleton.
Refactor, no functional changes apart from change of log domain from
LOGD_PLATFORM to LOGD_CORE.
Subsequent commit will keep track of the conflicting routes, avoid overwriting
older ones with newer ones and apply the new ones when the old ones go away.