Skip to content

Commit

Permalink
Merge pull request #195 from pwieczorkiewicz/tuntap-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomaschewski committed Mar 18, 2014
2 parents 4b41146 + 8fd603b commit 8d55386
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion include/wicked/tuntap.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <wicked/types.h>

struct ni_tuntap {
ni_bool_t persistent; /* Always TRUE */
uid_t owner;
gid_t group;
};
Expand Down
2 changes: 1 addition & 1 deletion src/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ __ni_tuntap_create(const ni_netdev_t *cfg)
if ((rv = ioctl(devfd, TUNSETIFF, (void *) &ifr)) < 0)
goto error;

if ((rv = ioctl(devfd, TUNSETPERSIST, cfg->tuntap->persistent)) < 0)
if ((rv = ioctl(devfd, TUNSETPERSIST, 1)) < 0)
goto error;

owner = cfg->tuntap->owner;
Expand Down
4 changes: 0 additions & 4 deletions src/tuntap.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static inline void
__ni_tuntap_init(ni_tuntap_t *cfg)
{
memset(cfg, 0, sizeof(*cfg));
cfg->persistent = TRUE;
}

/*
Expand Down Expand Up @@ -81,9 +80,6 @@ ni_tuntap_validate(const ni_tuntap_t *cfg)
if (cfg == NULL)
return "uninitialized tun/tap options";

if (FALSE == cfg->persistent)
return "Invalid/unsupported tun persistent setting (FALSE)";

if (cfg->owner == -1U)
return "Invalid/unset tun owner UID";

Expand Down

0 comments on commit 8d55386

Please sign in to comment.