summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index 3222e50..a7b0bdc 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -186,14 +186,14 @@ void MainWindowImp::getAllInterfaces()
ifc.ifc_req = ifrs;
result = ioctl(sockfd, SIOCGIFCONF, &ifc);
for (unsigned int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); i++)
{
struct ifreq *pifr = &ifrs[i];
-
- ifaces += pifr->ifr_name;
+ if ( !QString( pifr->ifr_name ).startsWith( "wifi" ) ) ifaces += pifr->ifr_name;
+ else odebug << "ignoring hostap control interface " << pifr->ifr_name << oendl;
}
}
else
{
procFile.open(IO_ReadOnly);
QString line;
@@ -203,13 +203,15 @@ void MainWindowImp::getAllInterfaces()
procTs.readLine(); // eat a line
procTs.readLine(); // eat a line
while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null)
{
if((loc = line.find(":")) != -1)
{
- ifaces += line.left(loc);
+ // ignore wifi* (hostap control interfaces)
+ if ( !line.left(loc).startsWith( "wifi" ) ) ifaces += line.left(loc);
+ else odebug << "ignoring hostap control interface " << line.left(loc) << oendl;
}
}
}
for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it)
{