--- firestarter/src/util.c 2003-06-12 20:50:21.000000000 +0300 +++ firestarter/src/util.c 2003-08-12 20:18:57.000000000 +0300 @@ -85,13 +85,14 @@ } /* [ detect_netfilter ] - * Return true if Linux 2.4 or 2.5 kernel found + * Return true if kernel supports netfilter (Linux 2.4 and newer) */ gboolean detect_netfilter (void) { FILE *f; gchar buf[512]; + char *ver; /* The detection is only done once */ static gint detected = 0; @@ -112,15 +113,17 @@ result = TRUE; } else { while (fgets (buf, 512, f) != NULL) { - if ((strstr (buf, " 2.4.") != NULL) || (strstr (buf, " 2.5.") != NULL)) { - g_print ("NETFILTER detected\n"); - - if (access("/sbin/modprobe", R_OK) == 0) - system ("/sbin/modprobe --autoclean ip_tables"); - else - system ("`which modprobe` --autoclean ip_tables"); + if (strstr (buf, "2.") != NULL){ + ver = strstr (buf, "2."); + if(ver[2] >= '4') { + g_print ("NETFILTER detected\n"); + if (access("/sbin/modprobe", R_OK) == 0) + system ("/sbin/modprobe --autoclean ip_tables"); + else + system ("`which modprobe` --autoclean ip_tables"); - result = TRUE; + result = TRUE; + } } } fclose (f);