summaryrefslogtreecommitdiffstats
path: root/src/network/netdev/ipvlan.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-11-07 08:27:33 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-11-26 22:38:26 +0100
commit9f0cf80dd007491698978dbfe38158d74c1c9526 (patch)
treecfb5ace7b0ab1fcbc2bd9262acd99b5512b9ab8d /src/network/netdev/ipvlan.c
parentnetwork: veth: use SYNTHETIC_ERRNO() macro or use real error cause (diff)
downloadsystemd-9f0cf80dd007491698978dbfe38158d74c1c9526.tar.xz
systemd-9f0cf80dd007491698978dbfe38158d74c1c9526.zip
network/netdev: introduce .iftype to netdev vtable
And disable .generate_mac flag for non-ether interfaces.
Diffstat (limited to 'src/network/netdev/ipvlan.c')
-rw-r--r--src/network/netdev/ipvlan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c
index 92a8f583e3..d15766cd7b 100644
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <net/if.h>
+#include <netinet/in.h>
+#include <linux/if_arp.h>
#include "conf-parser.h"
#include "ipvlan.h"
@@ -63,6 +65,7 @@ const NetDevVTable ipvlan_vtable = {
.sections = NETDEV_COMMON_SECTIONS "IPVLAN\0",
.fill_message_create = netdev_ipvlan_fill_message_create,
.create_type = NETDEV_CREATE_STACKED,
+ .iftype = ARPHRD_ETHER,
.generate_mac = true,
};
@@ -72,6 +75,7 @@ const NetDevVTable ipvtap_vtable = {
.sections = NETDEV_COMMON_SECTIONS "IPVTAP\0",
.fill_message_create = netdev_ipvlan_fill_message_create,
.create_type = NETDEV_CREATE_STACKED,
+ .iftype = ARPHRD_ETHER,
.generate_mac = true,
};