netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Chris PeBenito <chpebeni@linux.microsoft.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libiptc] libip6tc.h: Add extern "C" wrapping for C++ linking.
Date: Tue, 30 Jul 2019 16:43:07 +0200	[thread overview]
Message-ID: <20190730144307.625q7berqsxnb7yu@salvia> (raw)
In-Reply-To: <20190715155855.4415-1-chpebeni@linux.microsoft.com>

Hi Chris,

On Mon, Jul 15, 2019 at 11:58:55AM -0400, Chris PeBenito wrote:
[...]
> diff --git a/include/libiptc/libip6tc.h b/include/libiptc/libip6tc.h
> index 9aed80a0..eaf34d65 100644
> --- a/include/libiptc/libip6tc.h
> +++ b/include/libiptc/libip6tc.h
> @@ -12,6 +12,10 @@
>  #include <linux/netfilter_ipv6/ip6_tables.h>
>  #include <libiptc/xtcshared.h>
>  
> +#ifdef __cplusplus
> +extern "C" {
> +#endif

This patch is very small, it does not harm anyone I think.

However, please note that we've been discouraging people to use the
iptables blob interface for years.

This interface is prone to races (see the userspace lock and the -w
option in iptables) and the binary layout is obscure.

Not sure how advance you're in developing a userspace program using
this interface, if in early stage, I'd suggest you go for command (in
string format) pipe them to iptables-restore, which is what most
people do to implement third party software that generates rules for
iptables.

Thanks.

      reply	other threads:[~2019-07-30 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 15:58 [PATCH libiptc] libip6tc.h: Add extern "C" wrapping for C++ linking Chris PeBenito
2019-07-30 14:43 ` 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=20190730144307.625q7berqsxnb7yu@salvia \
    --to=pablo@netfilter.org \
    --cc=chpebeni@linux.microsoft.com \
    --cc=netfilter-devel@vger.kernel.org \
    /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).