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
This commit is contained in:
parent
9e16b9530a
commit
f6f297871d
@ -4021,7 +4021,8 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user