aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index f47c126..1614d61 100644
--- a/src/device.c
+++ b/src/device.c
@@ -235,6 +235,10 @@ static void destruct(struct net_device *dev)
free_netdev(dev);
}
+static const struct device_type device_type = {
+ .name = KBUILD_MODNAME
+};
+
static void setup(struct net_device *dev)
{
struct wireguard_device *wg = netdev_priv(dev);
@@ -258,6 +262,8 @@ static void setup(struct net_device *dev)
dev->hw_enc_features |= WG_NETDEV_FEATURES;
dev->mtu = ETH_DATA_LEN - MESSAGE_MINIMUM_LENGTH - sizeof(struct udphdr) - max(sizeof(struct ipv6hdr), sizeof(struct iphdr));
+ SET_NETDEV_DEVTYPE(dev, &device_type);
+
/* We need to keep the dst around in case of icmp replies. */
netif_keep_dst(dev);