summaryrefslogtreecommitdiffstats
path: root/discover/network.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-06-30 16:13:58 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-08-23 10:56:45 +1000
commit5496eee36f70631ae45403f90ed7b4dc143f27c0 (patch)
tree9eebbfa8d23071eefbd33d12b559c277721e3af2 /discover/network.c
parent58a9dfb65164095f32b1d5f7070015da5111d884 (diff)
downloadpetitboot-5496eee36f70631ae45403f90ed7b4dc143f27c0.zip
petitboot-5496eee36f70631ae45403f90ed7b4dc143f27c0.tar.gz
discover/network: Ignore tun devicesv1.2.3
In some environments a default 'tun' device is created. Petitboot doesn't use this and it clutters up the list of network devices, so ignore it if it is encountered. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/network.c')
-rw-r--r--discover/network.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/network.c b/discover/network.c
index 4b79015..2de96ec 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -515,6 +515,9 @@ static int network_handle_nlmsg(struct network *network, struct nlmsghdr *nlmsg)
return 0;
}
+ /* ignore the default tun device in some environments */
+ if (strncmp(ifname, "tun", strlen("tun")) == 0)
+ return 0;
interface = find_interface_by_ifindex(network, info->ifi_index);
if (!interface) {
OpenPOWER on IntegriCloud