| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
In commit c52ed2cbdc5b851ebc7bc19d7c682b14a4a16ba4 a free_ipv6addresses()
call was removed, which lead to duplicated IPv6 address information in some
cases. Re-add this freeing, to be sure we don't add existing information to
an already existing pointer chain.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
|
|
|
| |
The callback function for device link information was lacking a simple
check to avoid a SEGV in these situations.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
This caused a double free situation, when Python tried to free the object if the
etherinfo::get_ipv6_addresses() method was called several times. In addition
the ethtool::get_interfaces_info() would also free the structures uses by
etherinfo_ipv6addr objects.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
The struct nl_handle was wrapped inside struct _nlconnection. This
is really not needed if open_netlink() and close_netlink() functions
uses "pointer's pointer" (struct nl_handle **) instead. Removes also
the need to declare a static struct _nlconnection, as the
global nlconnection variable can now be a pointer as well.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
| |
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
| |
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the IPv6 protocol allows a single device to have more than one IPv6 address,
the previous implementation did not provide all IPv6 information. It would reject
all except the last parsed IPv6 address.
NOTE: This implementation will break the previous API.
This change removes the ethtool.etherinfo.ipv6_address and
ethtool.etherinfo.ipv6_netmask members. A new member is added,
ethtool.etherinfo.ipv6_addresses (in plural). This contains a tupple list
containing of ethtool.etherinfo_ipv6addr objects, one object for each configured
IPv6 address on the device. These objects have the following members available:
.address - The IPv6 address
.netmask - The IPv6 netmask (in bit notation)
.scope - A string with the IPv6 address scope
Example code:
import ethtool
devs = ethtool.get_interfaces_info('eth0')
for ip6 in devs[0].ipv6_addresses:
print "[%s] %s/%i" % (ip6.scope, ip6.address, ip6.netmask)
Signed-off-by: David Sommerseth <davids@redhat.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|