diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-08-20 16:27:37 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-08-20 16:27:37 +0000 |
commit | 4a9331a4d5ec0960cf3c1adb263a86577c02fe86 (patch) | |
tree | 53aebd87704f9b39f8c3f5317e3a7d0428d99d82 /sbin/pfctl | |
parent | 40640c03fded72ed8ec4fd2be1ae382dd1731a65 (diff) |
braindeadness police: catch queues which specify itself as child... 'nuff said
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/parse.y | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 2a82affc028..887ff9f8bbe 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.407 2003/08/20 13:02:52 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.408 2003/08/20 16:27:36 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -3584,6 +3584,12 @@ expand_queue(struct pf_altq *a, struct node_if *interfaces, errs++; for (nq = nqueues; nq != NULL; nq = nq->next) { + if (!strcmp(a->qname, nq->queue)) { + yyerror("queue cannot have " + "itself as child"); + errs++; + continue; + } n = calloc(1, sizeof(struct node_queue)); if (n == NULL) |