chiark / gitweb /
sd-rtnl: always include linux/rtnetlink.h
authorTom Gundersen <teg@jklm.no>
Fri, 14 Feb 2014 23:06:09 +0000 (00:06 +0100)
committerTom Gundersen <teg@jklm.no>
Sat, 15 Feb 2014 11:14:45 +0000 (12:14 +0100)
src/core/loopback-setup.c
src/libsystemd/sd-rtnl/rtnl-message.c
src/libsystemd/sd-rtnl/rtnl-util.c
src/libsystemd/sd-rtnl/test-rtnl.c
src/network/networkd.h
src/nspawn/nspawn.c
src/systemd/sd-rtnl.h

index a53855fdc05e761375180a262c400a2c90ec8945..8a5b8121bc2404f1ca210aa4f1fd2831449153bb 100644 (file)
@@ -24,7 +24,6 @@
 #include <net/if.h>
 #include <asm/types.h>
 #include <netinet/in.h>
-#include <linux/rtnetlink.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
index 096a32236cdb5d4f08a6c2c130f46d8e1b429874..15e3247aca90dff62178320b78a8c3d7f5647664 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <linux/rtnetlink.h>
 #include <netinet/in.h>
 #include <netinet/ether.h>
 #include <stdbool.h>
@@ -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);
 
index caa21d60f556e9dd7158b12183f9d27816fe9f57..6545ad0c5b4085b80af32b2e0e86c0fadf6026e7 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <linux/rtnetlink.h>
 #include <netinet/ether.h>
 
 #include "sd-rtnl.h"
index 53efed561a7b975267dc0e63c464abdc2af13957..21e12f65e3fe7c46c03e0f85a6df751668b4b493 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <linux/rtnetlink.h>
 #include <netinet/ether.h>
 
 #include "util.h"
index 726cd836996fcc7c1072a6543f20fe4e9b65fa0d..51d77570d40ebab12c8900b4bd68a04da98674fa 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include <arpa/inet.h>
-#include <linux/rtnetlink.h>
 
 #include "sd-event.h"
 #include "sd-rtnl.h"
index fcc0f17aee011a9542262bd0d18177d6dcdadf62..a81bb8ea4175077856f0aa7085c2f0bf688ccf68 100644 (file)
@@ -40,7 +40,6 @@
 #include <sys/un.h>
 #include <sys/socket.h>
 #include <linux/netlink.h>
-#include <linux/rtnetlink.h>
 #include <sys/eventfd.h>
 #include <net/if.h>
 #include <linux/veth.h>
index 5506bfa4fac2ffc4c90a54855288867597119ac8..321f42af06da0f14dbe773fee2a56c9bb0d0731e 100644 (file)
@@ -25,6 +25,7 @@
 #include <inttypes.h>
 #include <netinet/in.h>
 #include <netinet/ether.h>
+#include <linux/rtnetlink.h>
 
 #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);