aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <2khramtsov@gmail.com>2021-02-01 19:03:57 +0000
committerKristof Provost <kp@FreeBSD.org>2021-02-01 20:25:11 +0000
commit682c31db4ecfb8fc6cac0e8ad4945c03379ea3d1 (patch)
tree16bbec7039fd9aeced804d32a49227de94fad793 /sbin/ipfw/ipfw2.c
parent38bfc6dee33bedb290e1ea2540f97a86fe3caee0 (diff)
downloadsrc-682c31db4ecfb8fc6cac0e8ad4945c03379ea3d1.tar.gz
src-682c31db4ecfb8fc6cac0e8ad4945c03379ea3d1.zip
ipfw(8) crashes when ext6hdr option is omitted
Verify that the option is passed, error out if it's not. The problem can be trivially triggered with `ipfw add allow ext6hdr`. PR: 253169 Reviewed by: kp@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28447
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 67303d8bb1e7..19f7f331091d 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -4961,6 +4961,7 @@ read_options:
break;
case TOK_EXT6HDR:
+ NEED1("missing extension header");
fill_ext6hdr( cmd, *av );
av++;
break;