+ else if (*p == 11)
+ {
+ // Filter-Id
+ char *filter = p + 2;
+ int l = p[1] - 2;
+ char *s;
+ u8 *f = 0;
+ int i;
+
+ LOG(3, 0, s, session[s].tunnel, " Radius reply contains Filter-Id \"%.*s\"\n", l, filter);
+ if ((s = memchr(filter, '.', l)))
+ {
+ int b = s - filter;
+ if (l - b == 3 && !memcmp("in", s+1, 2))
+ f = &session[s].filter_in;
+ else if (l - b == 4 && !memcmp("out", s+1, 3))
+ f = &session[s].filter_out;
+
+ l = b;
+ }
+
+ if (!f)
+ {
+ LOG(3, 0, s, session[s].tunnel, " Invalid filter\n");
+ continue;
+ }
+
+ for (*f = 0, i = 0; !*f && i < MAXFILTER; i++)
+ if (strlen(ip_filters[i].name) == l &&
+ !strncmp(ip_filters[i].name, filter, l))
+ *f = i + 1;
+
+ if (!*f)
+ LOG(3, 0, s, session[s].tunnel, " Unknown filter\n");
+
+ }