From b1322df8272facab353a5198e36304e01b5d4a60 Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Mon, 1 Jun 2015 17:52:49 +0000 Subject: [PATCH] use the modified tun_flowctl driver if it exists From: weston --- daemon/core/emane/nodes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/core/emane/nodes.py b/daemon/core/emane/nodes.py index 65526063..bdf08df1 100644 --- a/daemon/core/emane/nodes.py +++ b/daemon/core/emane/nodes.py @@ -12,6 +12,7 @@ share the same MAC+PHY model. ''' import sys +import os.path from core.api import coreapi from core.coreobj import PyCoreNet @@ -183,8 +184,12 @@ class EmaneNode(EmaneNet): flowcontrol = True if "virtual" in type.lower(): - trans.appendChild(emane.xmlparam(transdoc, "devicepath", - "/dev/net/tun")) + if os.path.exists("/dev/net/tun_flowctl"): + trans.appendChild(emane.xmlparam(transdoc, "devicepath", + "/dev/net/tun_flowctl")) + else: + trans.appendChild(emane.xmlparam(transdoc, "devicepath", + "/dev/net/tun")) if flowcontrol: trans.appendChild(emane.xmlparam(transdoc, "flowcontrolenable", "on"))