diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-03 11:37:05 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-03 11:37:54 +0200 |
commit | 63dadd9075abd913ba6bf87e5933beb8eb8eeefb (patch) | |
tree | f4841eea7379de5face82a0f416f82b6e974d75f /src/network/networkd-tuntap.c | |
parent | 6ef892fc05791a6609489df7b5d1b081819c5de9 (diff) |
networkd: tuntap - enable PacketInfo by default
Diffstat (limited to 'src/network/networkd-tuntap.c')
-rw-r--r-- | src/network/networkd-tuntap.c | 10 |
1 files changed, 4 insertions, 6 deletions
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) |