summaryrefslogtreecommitdiffstats
path: root/nest/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 68975ad..b2f296b 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -139,7 +139,6 @@ proto_config_new(struct protocol *pr, unsigned size)
add_tail(&new_config->protos, &c->n);
c->global = new_config;
c->protocol = pr;
- c->debug = pr->debug;
c->name = pr->name;
c->out_filter = FILTER_REJECT;
c->table = c->global->master_rtc;
@@ -603,3 +602,20 @@ proto_xxable(char *pattern, int xx)
else
cli_msg(0, "");
}
+
+void
+proto_debug(char *pattern, unsigned int mask)
+{
+ int cnt = 0;
+ WALK_PROTO_LIST(p)
+ if (patmatch(pattern, p->name))
+ {
+ cnt++;
+ p->debug = mask;
+ }
+ WALK_PROTO_LIST_END;
+ if (!cnt)
+ cli_msg(8003, "No protocols match");
+ else
+ cli_msg(0, "");
+}