ValveSoftware/voglperf — pull request #11 by gotschelm (2014-05-31 16:08:30+00:00)
Title: Fix crash on systems with tuntap interfaces

In voglutils.cpp: getifaddrs() returns a linked list
of network interfaces of type 'struct ifAddrStruct'.
This may include tuntap interfaces of which the ifa->addr is NULL
To replicate this behaviour one can add a tuntap interface like this:
$ sudo ip tuntap add tun99 mode tun
To remove the previously created tuntap interface:
$ sudo ip tuntap del tun99 mode tun
These tuntap devices may be created by VPN software such as
OpenVPN.

To work around this, we simply check whether
ifa->addr is not NULL before proceeding.