diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c index a53855fdc05..8a5b8121bc2 100644 --- a/src/core/loopback-setup.c +++ b/src/core/loopback-setup.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 096a32236cd..15e3247aca9 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -19,7 +19,6 @@ along with systemd; If not, see . ***/ -#include #include #include #include @@ -232,6 +231,8 @@ int sd_rtnl_message_new_addr(uint16_t nlmsg_type, int index, unsigned char famil (*ret)->hdr->nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); (*ret)->hdr->nlmsg_type = nlmsg_type; + if (nlmsg_type == RTM_GETADDR && family == AF_INET) + (*ret)->hdr->nlmsg_flags |= NLM_F_DUMP; ifa = NLMSG_DATA((*ret)->hdr); diff --git a/src/libsystemd/sd-rtnl/rtnl-util.c b/src/libsystemd/sd-rtnl/rtnl-util.c index caa21d60f55..6545ad0c5b4 100644 --- a/src/libsystemd/sd-rtnl/rtnl-util.c +++ b/src/libsystemd/sd-rtnl/rtnl-util.c @@ -19,7 +19,6 @@ along with systemd; If not, see . ***/ -#include #include #include "sd-rtnl.h" diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c index 53efed561a7..21e12f65e3f 100644 --- a/src/libsystemd/sd-rtnl/test-rtnl.c +++ b/src/libsystemd/sd-rtnl/test-rtnl.c @@ -19,7 +19,6 @@ along with systemd; If not, see . ***/ -#include #include #include "util.h" diff --git a/src/network/networkd.h b/src/network/networkd.h index 726cd836996..51d77570d40 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -22,7 +22,6 @@ #pragma once #include -#include #include "sd-event.h" #include "sd-rtnl.h" diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index fcc0f17aee0..a81bb8ea417 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/src/systemd/sd-rtnl.h b/src/systemd/sd-rtnl.h index 5506bfa4fac..321f42af06d 100644 --- a/src/systemd/sd-rtnl.h +++ b/src/systemd/sd-rtnl.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "sd-event.h" #include "_sd-common.h" @@ -71,12 +72,7 @@ int sd_rtnl_message_new_addr(uint16_t msg_type, int index, unsigned char family, sd_rtnl_message **ret); int sd_rtnl_message_new_route(uint16_t nlmsg_type, unsigned char rtm_family, sd_rtnl_message **ret); -/* - unsigned char rtm_dst_len, unsigned char rtm_src_len, - unsigned char rtm_tos, unsigned char rtm_table, - unsigned char rtm_scope, unsigned char rtm_protocol, - unsigned char rtm_type, unsigned flags, sd_rtnl_message **ret); -*/ + sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m); sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m);