diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-netdev.c | 1 | ||||
-rw-r--r-- | src/network/networkd-tuntap.c | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c index a8c1ea3b44..5ee9da6de0 100644 --- a/src/network/networkd-netdev.c +++ b/src/network/networkd-netdev.c @@ -569,6 +569,7 @@ static int netdev_load_one(Manager *manager, const char *filename) { netdev->vxlanid = VXLAN_VID_MAX + 1; netdev->tunnel_pmtudisc = true; netdev->learning = true; + netdev->packet_info = true; r = config_parse(NULL, filename, file, "Match\0NetDev\0VLAN\0MACVLAN\0VXLAN\0Tunnel\0Peer\0Tun\0Tap\0", diff --git a/src/network/networkd-tuntap.c b/src/network/networkd-tuntap.c index 19dc2ad252..ae2d5c1e33 100644 --- a/src/network/networkd-tuntap.c +++ b/src/network/networkd-tuntap.c @@ -35,14 +35,12 @@ static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) { memset(ifr, 0, sizeof(*ifr)); - if (netdev->kind != NETDEV_KIND_TAP) - ifr->ifr_flags |= IFF_TUN; - else + if (netdev->kind == NETDEV_KIND_TAP) ifr->ifr_flags |= IFF_TAP; - - if (netdev->packet_info) - ifr->ifr_flags &= ~IFF_NO_PI; else + ifr->ifr_flags |= IFF_TUN; + + if (!netdev->packet_info) ifr->ifr_flags |= IFF_NO_PI; if (netdev->one_queue) |