From: Felix Janda <felix.janda@posteo.de>
To: netfilter-devel@vger.kernel.org
Cc: musl@lists.openwall.com
Subject: [PATCH iptables RFC 4/4] libxt_TCPOPTSTRIP: Use local copy of TCPOPTS constants
Date: Tue, 16 Jun 2015 21:25:04 +0200 [thread overview]
Message-ID: <20150616192504.GF3247@euler> (raw)
musl does not provide these constants in <netinet/tcp.h>
Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
It is not clear to me whether these constants belong to iptables or musl's
netinet/tcp.h. So this message is CC'd to the musl list.
In the code indexed by debian code search I have only found iptables and
traceroute using them without having a local copy of tcp.h.
Note that this patch is incomplete: utils/nfsynproxy.c uses them as well
---
extensions/libxt_TCPOPTSTRIP.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
index 6897857..1617081 100644
--- a/extensions/libxt_TCPOPTSTRIP.c
+++ b/extensions/libxt_TCPOPTSTRIP.c
@@ -7,11 +7,14 @@
#include <stdio.h>
#include <string.h>
#include <xtables.h>
-#include <netinet/tcp.h>
#include <linux/netfilter/xt_TCPOPTSTRIP.h>
-#ifndef TCPOPT_MD5SIG
-# define TCPOPT_MD5SIG 19
-#endif
+
+#define TCPOPT_MAXSEG 2
+#define TCPOPT_WINDOW 3
+#define TCPOPT_SACK_PERMITTED 4
+#define TCPOPT_SACK 5
+#define TCPOPT_TIMESTAMP 8
+#define TCPOPT_MD5SIG 19
enum {
O_STRIP_OPTION = 0,
--
2.3.6
next reply other threads:[~2015-06-16 19:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 19:25 Felix Janda [this message]
2015-06-16 19:28 ` Rich Felker
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=20150616192504.GF3247@euler \
--to=felix.janda@posteo.de \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).