Bug 277208

Summary: neither tun nor tap devices shown
Product: [Applications] kinfocenter Reporter: Toralf Förster <toralf.foerster>
Component: Network InterfacesAssignee: David Hubner <hubn3rd>
Status: RESOLVED FIXED    
Severity: wishlist CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 5.18.0

Description Toralf Förster 2011-07-06 16:41:44 UTC
Version:           unspecified (using KDE 4.6.4) 
OS:                Linux

With the increasing usage of virtual machines those nics should be listed too.

Reproducible: Didn't try



Expected Results:  
show tapX, tunX devices too

OS: Linux (i686) release 2.6.39.2
Compiler: i686-pc-linux-gnu-gcc
Comment 1 Harald Sitter 2020-01-31 15:12:41 UTC
Git commit 4582053b7cac596e6987a8ff460ffe7fb153155b by Harald Sitter.
Committed on 31/01/2020 at 15:11.
Pushed by sitter into branch 'Plasma/5.18'.

do not disable getifaddrs use because of sa_len availablility

Summary:
this fixes ipv6 support in nic listing. well, kinda.

the getifaddrs branch is the only one supporting ipv6 properly
so it seems silly to use the ioctl branch just because sa_len
is not available.
simply wrap around getnameinfo and either use sa_len or
determine the length based on the socket family (as seen on the
getifaddrs manpage). this way the branch compiles fine without
sa_len and is fine to use by just about all glibc systems thus
giving us ipv6 support on just about every glib system.
Related: bug 313892
FIXED-IN: 5.18.0

Test Plan: built on neon. shows ipv6 addresses

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26729

M  +25   -14   Modules/nics/nic.cpp

https://commits.kde.org/kinfocenter/4582053b7cac596e6987a8ff460ffe7fb153155b