[ovs-dev] [PATCH 3/3] netdev-linux: maintain original device's state
Flavio Leitner
fbl at redhat.com
Mon May 29 19:40:23 UTC 2017
It is important to maintain the original state when
the device already exists in the system.
Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
lib/netdev-linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index d181e4f..efcb7ac 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -851,6 +851,7 @@ netdev_linux_construct_tap(struct netdev *netdev_)
}
/* Create tap device. */
+ get_flags(&netdev->up, &netdev->ifi_flags);
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
ovs_strzcpy(ifr.ifr_name, name, sizeof ifr.ifr_name);
if (ioctl(netdev->tap_fd, TUNSETIFF, &ifr) == -1) {
--
2.9.4
More information about the dev
mailing list