]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350576: ipfw: fix jail option after r348215
authorKyle Evans <kevans@FreeBSD.org>
Thu, 15 Aug 2019 17:40:48 +0000 (17:40 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 15 Aug 2019 17:40:48 +0000 (17:40 +0000)
commit3ba439d2598fd8609aa0b6ff842e3a8f19865467
tree863ec06eaa8c0f7f1d53ecfa97e150b68ed86a40
parentdcebc28d01acf9d9555a51a351931fe481f6ff84
MFC r350576: ipfw: fix jail option after r348215

r348215 changed jail_getid(3) to validate passed-in jids as active jails
(as the function is documented to return -1 if the jail does not exist).
This broke the jail option (in some cases?) as the jail historically hasn't
needed to exist at the time of rule parsing; jids will get stored and later
applied.

Fix this caller to attempt to parse *av as a number first and just use it
as-is to match historical behavior. jail_getid(3) must still be used in
order for name arguments to work, but it's strictly a fallback in case we
weren't given a number.
sbin/ipfw/ipfw2.c