From: Ian Jackson Date: Fri, 1 Jul 2011 22:57:15 +0000 (+0100) Subject: tun: Drop support for Linux 2.2. X-Git-Tag: v0.2.0~50 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=621c2861c31c4eba4a49342011463f485856068a;ds=sidebyside 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 --- 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