On Mon, Oct 21, 2019 at 06:56:03PM +0200, Phil Sutter wrote:
> getopt_long() would try to parse the negative priority as an option and
> return -1 as it is not known:
>
> | # nft add chain x y { type filter hook input priority -30\; }
> | nft: invalid option -- '3'
>
> Fix this by prefixing optstring with a plus character. This instructs
> getopt_long() to not collate arguments but just stop after the first
> non-option, leaving the rest for manual handling. In fact, this is just
> what nft desires: mixing options with nft syntax leads to confusive
> command lines anyway.
>
> Signed-off-by: Phil Sutter <[email protected]>
Acked-by: Pablo Neira Ayuso <[email protected]>