+ else if (*p == 11)
+ {
+ // Filter-Id
+ char *filter = p + 2;
+ int l = p[1] - 2;
+ char *suffix;
+ u8 *f = 0;
+ int i;
+
+ LOG(3, 0, s, session[s].tunnel, " Radius reply contains Filter-Id \"%.*s\"\n", l, filter);
+ if ((suffix = memchr(filter, '.', l)))
+ {
+ int b = suffix - filter;
+ if (l - b == 3 && !memcmp("in", suffix+1, 2))
+ f = &session[s].filter_in;
+ else if (l - b == 4 && !memcmp("out", suffix+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)
+ ip_filters[*f - 1].used++;
+ else
+ LOG(3, 0, s, session[s].tunnel, " Unknown filter\n");
+
+ }