netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Quentin Armitage <quentin@armitage.org.uk>
Cc: netfilter-devel@vger.kernel.org,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Subject: Re: [PATCH] ipset-translate: allow invoking with a path name
Date: Tue, 16 Aug 2022 23:40:33 +0200	[thread overview]
Message-ID: <YvwO0SAEtDRLkBH6@salvia> (raw)
In-Reply-To: <20220811165218.59854-1-quentin@armitage.org.uk>

Applied, thanks.

On Thu, Aug 11, 2022 at 05:52:18PM +0100, Quentin Armitage wrote:
> Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
> ---
>  src/ipset.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipset.c b/src/ipset.c
> index 6d42b60..e53ffb1 100644
> --- a/src/ipset.c
> +++ b/src/ipset.c
> @@ -6,6 +6,8 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> +#define _GNU_SOURCE
> +
>  #include <assert.h>			/* assert */
>  #include <stdio.h>			/* fprintf */
>  #include <stdlib.h>			/* exit */
> @@ -31,7 +33,7 @@ main(int argc, char *argv[])
>  		exit(1);
>  	}
>  
> -	if (!strcmp(argv[0], "ipset-translate")) {
> +	if (!strcmp(basename(argv[0]), "ipset-translate")) {
>  		ret = ipset_xlate_argv(ipset, argc, argv);
>  	} else {
>  		ret = ipset_parse_argv(ipset, argc, argv);
> -- 
> 2.34.3
> 

      reply	other threads:[~2022-08-16 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 16:52 [PATCH] ipset-translate: allow invoking with a path name Quentin Armitage
2022-08-16 21:40 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvwO0SAEtDRLkBH6@salvia \
    --to=pablo@netfilter.org \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=quentin@armitage.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).