From 7677c2239c0e9ecf2605c6875409aa66a80ff6fc Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 3 Aug 2004 13:46:23 +0000 Subject: deny hilarious prepends. OK henning@ --- usr.sbin/bgpd/parse.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/bgpd/parse.y') diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 1d0ab4cf87d..489f1294a29 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.129 2004/08/02 21:30:55 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.130 2004/08/03 13:46:22 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -1099,6 +1099,10 @@ filter_set_opt : LOCALPREF number { } | PREPEND number { $$.flags = SET_PREPEND; + if ($2 > 128) { + yyerror("to many prepends"); + YYERROR; + } $$.prepend = $2; } | PFTABLE string { -- cgit v1.2.3