]> git.ipfire.org Git - thirdparty/ipset.git/commit
ipset-translate: allow invoking with a path name
authorQuentin Armitage <quentin@armitage.org.uk>
Thu, 11 Aug 2022 16:52:18 +0000 (17:52 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 16 Aug 2022 21:38:37 +0000 (23:38 +0200)
commite1b60b2a93356c313cccb2abfdae4b58d530e02b
tree27ca7de796923e91809d93199db8ceb2cd48f2e1
parentbe7f6099feb7b5d34715b06f9308877cdcdc404a
ipset-translate: allow invoking with a path name

Executing /usr/sbin/ipset-translate results in the ipset functionality being run, rather than the ipset-translate functionality.

 # ipset-translate destroy fred
 This command is not supported, use `ipset-translate restore < file'

 # /usr/sbin/ipset-translate destroy fred
 ipset v7.15: The set with the given name does not exist

use basename() to resolve the issue.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1626
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/ipset.c