From 4a9331a4d5ec0960cf3c1adb263a86577c02fe86 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 20 Aug 2003 16:27:37 +0000 Subject: braindeadness police: catch queues which specify itself as child... 'nuff said --- sbin/pfctl/parse.y | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sbin/pfctl') 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) -- cgit v1.2.3