From 621c2861c31c4eba4a49342011463f485856068a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 1 Jul 2011 23:57:15 +0100 Subject: [PATCH] tun: Drop support for Linux 2.2. tun.c attempted to guess at runtime what kind of tun interface to use by looking at uname. Specifically, for Linux it would do TUN_FLAVOUR_BSD if u.release starts 2.2 TUN_FLAVOUR_LINUX if u.release starts 2.4 and require the user to specify, otherwise. Linux 2.6 and all later versions use TUN_FLAVOUR_LINUX. The guessing code is pretty nasty and Linux 2.2 is very very obsolete, so drop it. Signed-off-by: Ian Jackson --- tun.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tun.c b/tun.c index 5f9aa98..7d1053a 100644 --- a/tun.c +++ b/tun.c @@ -479,10 +479,7 @@ static list_t *tun_create(closure_t *self, struct cloc loc, dict_t *context, fatal_perror("tun_create: uname"); } if (strcmp(u.sysname,"Linux")==0) { - if (u.release[0]=='2' && u.release[1]=='.' && u.release[3]=='.') { - if (u.release[2]=='2') st->tun_flavour=TUN_FLAVOUR_BSD; - else if (u.release[2]=='4') st->tun_flavour=TUN_FLAVOUR_LINUX; - } + st->tun_flavour=TUN_FLAVOUR_LINUX; } else if (strcmp(u.sysname,"SunOS")==0) { st->tun_flavour=TUN_FLAVOUR_STREAMS; } else if (strcmp(u.sysname,"FreeBSD")==0 -- 2.30.2