* [PATCH iptables RFC 4/4] libxt_TCPOPTSTRIP: Use local copy of TCPOPTS constants
@ 2015-06-16 19:25 Felix Janda
2015-06-16 19:28 ` Rich Felker
0 siblings, 1 reply; 2+ messages in thread
From: Felix Janda @ 2015-06-16 19:25 UTC (permalink / raw)
To: netfilter-devel; +Cc: musl
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH iptables RFC 4/4] libxt_TCPOPTSTRIP: Use local copy of TCPOPTS constants
2015-06-16 19:25 [PATCH iptables RFC 4/4] libxt_TCPOPTSTRIP: Use local copy of TCPOPTS constants Felix Janda
@ 2015-06-16 19:28 ` Rich Felker
0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2015-06-16 19:28 UTC (permalink / raw)
To: netfilter-devel, musl
On Tue, Jun 16, 2015 at 09:25:04PM +0200, Felix Janda wrote:
> 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
I'm not sure either. I'd like to hear from someone who has a good
argument one way or the other.
Rich
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-16 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 19:25 [PATCH iptables RFC 4/4] libxt_TCPOPTSTRIP: Use local copy of TCPOPTS constants Felix Janda
2015-06-16 19:28 ` Rich Felker
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).