[PC-BSD Commits] r5991 - pcbsd/trunk/pcbsd-netmanager/src/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Wed Jan 13 10:42:14 PST 2010


Author: kris
Date: 2010-01-13 10:42:14 -0800 (Wed, 13 Jan 2010)
New Revision: 5991

Modified:
   pcbsd/trunk/pcbsd-netmanager/src/NetworkManager/networkman.cpp
Log:

Setup network manager to report IP / netmask from lagg0 device 



Modified: pcbsd/trunk/pcbsd-netmanager/src/NetworkManager/networkman.cpp
===================================================================
--- pcbsd/trunk/pcbsd-netmanager/src/NetworkManager/networkman.cpp	2010-01-13 18:30:13 UTC (rev 5990)
+++ pcbsd/trunk/pcbsd-netmanager/src/NetworkManager/networkman.cpp	2010-01-13 18:42:14 UTC (rev 5991)
@@ -92,10 +92,8 @@
        foundDev = false;
 
        QString dev = *it;
-       if (dev.indexOf("lo0") == -1
-	   && dev.indexOf("lo1") == -1
-	   && dev.indexOf("lo2") == -1
-	   && dev.indexOf("lo3") == -1
+       if (dev.indexOf("lo") != 0 
+	   && dev.indexOf("lagg") == -1
 	   && dev.indexOf("fwe") == -1
 	   && dev.indexOf("plip") == -1
 	   && dev.indexOf("pfsync") == -1
@@ -278,6 +276,11 @@
 
 QString NetworkMan::getIpForIdent( QString ident )
 {
+   QString cmd = "ifconfig lagg0 | grep " + ident;
+   QString checkLagg = getLineFromCommandOutput(cmd.toLatin1());
+   if ( ! checkLagg.isEmpty() )
+    ident = "lagg0";
+
    NetworkInterface ifr(ident);
    return ifr.ipAsString();
 }
@@ -629,6 +632,11 @@
 
 QString NetworkMan::getNetmaskForIdent( QString ident )
 {
+   QString cmd = "ifconfig lagg0 | grep " + ident;
+   QString checkLagg = getLineFromCommandOutput(cmd.toLatin1());
+   if ( ! checkLagg.isEmpty() )
+    ident = "lagg0";
+
    NetworkInterface ifr(ident);
    return ifr.netmaskAsString();
 }



More information about the Commits mailing list