Date: Tue, 11 May 2021 08:45:58 GMT From: Lutz Donnerhacke <donner@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f6f297871d46 - main - sbin/ipfw: Allow tablearg as hostname Message-ID: <202105110845.14B8jwdY041862@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=f6f297871d469daf808f78faead8f950a2c81e36 commit f6f297871d469daf808f78faead8f950a2c81e36 Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-05-11 08:22:16 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-05-11 08:44:33 +0000 sbin/ipfw: Allow tablearg as hostname Hostnames starting with "tablearg" are considered as a functional argument instead of a literal. Reported by: ae Reviewers: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30208 --- sbin/ipfw/ipfw2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 498da22e6599..fb1d9a4a180b 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -4021,7 +4021,8 @@ chkarg: NEED1("missing forward address[:port]"); - if (strncmp(*av, "tablearg", 8) == 0) + if (strncmp(*av, "tablearg", 8) == 0 && + ((*av)[8] == '\0' || (*av)[8] == ',' || (*av)[8] == ':')) memcpy(++(*av), "0.0.0.0", 7); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105110845.14B8jwdY041862>