diff options
author | avilla <avilla@FreeBSD.org> | 2012-06-12 20:06:19 +0800 |
---|---|---|
committer | avilla <avilla@FreeBSD.org> | 2012-06-12 20:06:19 +0800 |
commit | 3350151619ead3f3702a324c6eabb6e8422e377a (patch) | |
tree | 207b0d4ca55221942e2fe610cd73f9e6dc3ebb4c /net | |
parent | 0ffb6e22e16b671d0bdc9ba1024e389ee325e8fb (diff) | |
download | freebsd-ports-gnome-3350151619ead3f3702a324c6eabb6e8422e377a.tar.gz freebsd-ports-gnome-3350151619ead3f3702a324c6eabb6e8422e377a.tar.zst freebsd-ports-gnome-3350151619ead3f3702a324c6eabb6e8422e377a.zip |
- Import my upstream patches:
* fix wrong traffic report;
* fix link state awareness;
* fix wrong encryption state with MIXED privacy WEP connections;
* fix default gateway detection.
- Update COMMENT.
- Bump PORTREVISION.
https://bugs.kde.org/show_bug.cgi?id=301546
https://bugs.kde.org/show_bug.cgi?id=301577
https://bugs.kde.org/show_bug.cgi?id=301697
https://bugs.kde.org/show_bug.cgi?id=301699
Approved by: makc (maintainer) via email
Diffstat (limited to 'net')
-rw-r--r-- | net/knemo-kde4/Makefile | 4 | ||||
-rw-r--r-- | net/knemo-kde4/files/patch-svn_1299925 | 78 | ||||
-rw-r--r-- | net/knemo-kde4/files/patch-svn_1299926 | 16 | ||||
-rw-r--r-- | net/knemo-kde4/files/patch-svn_1299928 | 19 | ||||
-rw-r--r-- | net/knemo-kde4/files/patch-svn_1299929 | 11 |
5 files changed, 126 insertions, 2 deletions
diff --git a/net/knemo-kde4/Makefile b/net/knemo-kde4/Makefile index 5017e96b07e5..c280d96562d0 100644 --- a/net/knemo-kde4/Makefile +++ b/net/knemo-kde4/Makefile @@ -6,13 +6,13 @@ PORTNAME= knemo PORTVERSION= 0.7.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net kde MASTER_SITES= http://kde-apps.org/CONTENT/content-files/ DISTNAME= 12956-${PORTNAME}-${PORTVERSION} MAINTAINER= makc@FreeBSD.org -COMMENT= Network monitor for KDE +COMMENT= KDE network monitor LATEST_LINK= ${PORTNAME}-kde4 diff --git a/net/knemo-kde4/files/patch-svn_1299925 b/net/knemo-kde4/files/patch-svn_1299925 new file mode 100644 index 000000000000..19ce8feea80a --- /dev/null +++ b/net/knemo-kde4/files/patch-svn_1299925 @@ -0,0 +1,78 @@ +--- ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:18:00 1299924 ++++ ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:18:03 1299925 +@@ -108,6 +108,8 @@ + interface->outgoingBytes = 0; + interface->prevRxPackets = interface->rxPackets; + interface->prevTxPackets = interface->txPackets; ++ interface->rxPackets = 0; ++ interface->txPackets = 0; + interface->addrData.clear(); + interface->ip4DefaultGateway = ip4DefGw; + interface->ip6DefaultGateway = ip6DefGw; +@@ -281,6 +283,7 @@ + void BSDBackend::updateIfaceData( const QString& ifName, BackendData* data ) + { + struct ifaddrs *ifa; ++ unsigned long rx_bytes = 0, tx_bytes = 0; + for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) + { + bool allUp = false; +@@ -294,22 +297,12 @@ + data->status |= KNemoIface::Up; + + // stats ++ struct if_data * stats; + if ( ifa->ifa_data ) + { +- unsigned long rx_bytes = 0, tx_bytes = 0; +- struct if_data * stats = static_cast<if_data *>(ifa->ifa_data); +- data->rxPackets = stats->ifi_ipackets; +- data->txPackets = stats->ifi_opackets; +- rx_bytes = stats->ifi_ibytes; +- tx_bytes = stats->ifi_obytes; +- if ( IFT_PPP == stats->ifi_type ) +- data->interfaceType == KNemoIface::PPP; +- incBytes( data->interfaceType, rx_bytes, data->incomingBytes, data->prevRxBytes, data->rxBytes ); +- data->rxString = KIO::convertSize( data->rxBytes ); +- +- incBytes( data->interfaceType, tx_bytes, data->outgoingBytes, data->prevTxBytes, data->txBytes ); +- data->txString = KIO::convertSize( data->txBytes ); +- ++ stats = static_cast<if_data *>(ifa->ifa_data); ++ if ( stats->ifi_type == IFT_PPP ) ++ data->interfaceType = KNemoIface::PPP; + if ( stats->ifi_link_state == LINK_STATE_UP && ifa->ifa_flags & IFF_UP ) + allUp = true; + } +@@ -350,6 +343,16 @@ + + if ( !addrKey.isEmpty() ) + data->addrData.insert( addrKey, addrVal ); ++ ++ if ( stats ) ++ { ++ // Sum the numbers of all network-level interfaces ++ // (e.g., when several IP addresses are assigned) ++ data->rxPackets += stats->ifi_ipackets; ++ data->txPackets += stats->ifi_opackets; ++ rx_bytes += stats->ifi_ibytes; ++ tx_bytes += stats->ifi_obytes; ++ } + } + } + +@@ -359,6 +362,14 @@ + data->status |= KNemoIface::Connected; + } + } ++ ++ // Traffic stats. No check needed: if there were no stats, ++ // values are and always were 0 ++ incBytes( data->interfaceType, rx_bytes, data->incomingBytes, data->prevRxBytes, data->rxBytes ); ++ data->rxString = KIO::convertSize( data->rxBytes ); ++ incBytes( data->interfaceType, tx_bytes, data->outgoingBytes, data->prevTxBytes, data->txBytes ); ++ data->txString = KIO::convertSize( data->txBytes ); ++ + if ( data->status < KNemoIface::Available ) + data->status = KNemoIface::Unavailable; + } diff --git a/net/knemo-kde4/files/patch-svn_1299926 b/net/knemo-kde4/files/patch-svn_1299926 new file mode 100644 index 000000000000..f54632aef0e9 --- /dev/null +++ b/net/knemo-kde4/files/patch-svn_1299926 @@ -0,0 +1,16 @@ +--- ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:18:03 1299925 ++++ ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:18:06 1299926 +@@ -334,7 +334,12 @@ + addrKey = getAddr( ifa, addrVal ); + + // Check here too for non-ethernet interfaces +- if ( ifa->ifa_flags & IFF_RUNNING && ++ struct ifmediareq ifmr; ++ memset( &ifmr, 0, sizeof( ifmr ) ); ++ strncpy( ifmr.ifm_name, ifName.toLatin1(), sizeof( ifmr.ifm_name ) ); ++ if ( ioctl( s, SIOCGIFMEDIA, &ifmr ) >= 0 && ++ ifmr.ifm_status & IFM_AVALID && ++ ifmr.ifm_status & IFM_ACTIVE && + addrVal.scope != RT_SCOPE_LINK && + addrVal.scope != RT_SCOPE_NOWHERE ) + { diff --git a/net/knemo-kde4/files/patch-svn_1299928 b/net/knemo-kde4/files/patch-svn_1299928 new file mode 100644 index 000000000000..2f49468daa86 --- /dev/null +++ b/net/knemo-kde4/files/patch-svn_1299928 @@ -0,0 +1,19 @@ +--- ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:19:11 1299927 ++++ ./src/knemod/backends/bsdbackend.cpp 2012/06/12 02:22:52 1299928 +@@ -429,14 +429,9 @@ + data->prevAccessPoint = data->accessPoint; + } + +- if ( get80211val( ifName, IEEE80211_IOC_AUTHMODE, &val) >= 0 ) ++ if ( get80211val( ifName, IEEE80211_IOC_PRIVACY, &val ) >= 0 ) + { +- if ( val == IEEE80211_AUTH_WPA ) +- data->isEncrypted = true; +- } +- else if ( get80211val( ifName, IEEE80211_IOC_WEP, &val ) >= 0 && val != IEEE80211_WEP_NOSUP ) +- { +- if ( val == IEEE80211_WEP_ON ) ++ if ( val > 0 ) + data->isEncrypted = true; + } + diff --git a/net/knemo-kde4/files/patch-svn_1299929 b/net/knemo-kde4/files/patch-svn_1299929 new file mode 100644 index 000000000000..764da804cdc0 --- /dev/null +++ b/net/knemo-kde4/files/patch-svn_1299929 @@ -0,0 +1,11 @@ +--- ./src/common/utils.cpp 2012/06/12 02:22:52 1299928 ++++ ./src/common/utils.cpp 2012/06/12 02:22:55 1299929 +@@ -211,7 +211,7 @@ + ifname = tempname; + } + +- cp += sizeof( struct sockaddr ); ++ cp += SA_SIZE( sa ); + } + } + else |