do not disable getifaddrs use because of sa_len availablility
ClosedPublic

Authored by sitter on Jan 17 2020, 3:24 PM.

Details

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.

BUG: 313892
BUG: 277208
FIXED-IN: 5.18.0

Test Plan

built on neon. shows ipv6 addresses

Diff Detail

Repository
R102 KInfoCenter
Branch
ipv6
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21280
Build 21298: arc lint + arc unit
sitter created this revision.Jan 17 2020, 3:24 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 17 2020, 3:24 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Jan 17 2020, 3:24 PM
sitter updated this revision to Diff 73777.Jan 17 2020, 3:25 PM

committing the latest working tree helps a lot -.-

sitter edited the summary of this revision. (Show Details)Jan 22 2020, 5:11 PM
ngraham accepted this revision.Jan 31 2020, 1:16 PM
This revision is now accepted and ready to land.Jan 31 2020, 1:16 PM
This revision was automatically updated to reflect the committed changes.
jjazeix added inline comments.
Modules/nics/nic.cpp
146

buf is not defined in this conditional and causes a build fail on freebsd: https://build.kde.org/view/Failing/job/Plasma/job/kinfocenter/job/kf5-qt5%20FreeBSDQt5.13/lastFailedBuild/

sitter marked an inline comment as done.Jan 31 2020, 4:26 PM
sitter added inline comments.
Modules/nics/nic.cpp
146

thanks. should be fixed