Commit cf27d5e4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add handling of local routes to filters.

parent f6cc43b2
......@@ -216,6 +216,8 @@ parse_filter(gnc_t gnc, void *closure)
if(c < -1)
goto error;
filter->proto = proto;
} else if(strcmp(token, "local") == 0) {
filter->proto = PROTO_LOCAL;
} else if(strcmp(token, "if") == 0) {
char *interface;
c = getword(c, &interface, gnc, closure);
......@@ -420,6 +422,8 @@ filter_match(struct filter *f, const unsigned char *id,
if(f->proto) {
if(!proto || f->proto != proto)
return 0;
} else if(proto == PROTO_LOCAL) {
return 0;
}
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment