From: Pablo Neira <pablo@eurodev.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>
Subject: [PATCH 2/2] fix CLUSTERIP rule deletion in iptables
Date: Sun, 06 Mar 2005 23:41:56 +0100 [thread overview]
Message-ID: <422B8734.9040404@eurodev.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 61 bytes --]
This fixes rule deletion in CLUSTERIP in iptables.
--
Pablo
[-- Attachment #2: fix-cluster-del.patch --]
[-- Type: text/x-patch, Size: 1993 bytes --]
Index: include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
===================================================================
--- include/linux/netfilter_ipv4/ipt_CLUSTERIP.h (revision 0)
+++ include/linux/netfilter_ipv4/ipt_CLUSTERIP.h (revision 0)
@@ -0,0 +1,37 @@
+#ifndef _IPT_CLUSTERIP_H_target
+#define _IPT_CLUSTERIP_H_target
+
+enum clusterip_hashmode {
+ CLUSTERIP_HASHMODE_SIP = 0,
+ CLUSTERIP_HASHMODE_SIP_SPT,
+ CLUSTERIP_HASHMODE_SIP_SPT_DPT,
+};
+
+#define CLUSTERIP_HASHMODE_MAX CLUSTERIP_HASHMODE_SIP_SPT_DPT
+
+#define CLUSTERIP_MAX_NODES 16
+
+#define CLUSTERIP_FLAG_NEW 0x00000001
+
+struct clusterip_config;
+
+struct ipt_clusterip_tgt_info {
+
+ u_int32_t flags;
+
+ /* only relevant for new ones */
+ u_int8_t clustermac[6];
+ u_int16_t num_total_nodes;
+ u_int16_t num_local_nodes;
+ u_int16_t local_nodes[CLUSTERIP_MAX_NODES];
+ enum clusterip_hashmode hash_mode;
+ u_int32_t hash_initval;
+
+#ifdef KERNEL_64_USERSPACE_32
+ u_int64_t config;
+#else
+ struct clusterip_config *config;
+#endif
+};
+
+#endif /*_IPT_CLUSTERIP_H_target*/
Index: extensions/libipt_CLUSTERIP.c
===================================================================
--- extensions/libipt_CLUSTERIP.c (revision 3742)
+++ extensions/libipt_CLUSTERIP.c (working copy)
@@ -7,6 +7,7 @@
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
+#include <stddef.h>
#if defined(__GLIBC__) && __GLIBC__ == 2
#include <net/ethernet.h>
@@ -16,7 +17,7 @@
#include <iptables.h>
#include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter_ipv4/ipt_CLUSTERIP.h>
+#include "../include/linux/netfilter_ipv4/ipt_CLUSTERIP.h"
static void
help(void)
@@ -242,7 +243,7 @@
.name = "CLUSTERIP",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)),
- .userspacesize = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)),
+ .userspacesize = offsetof(struct ipt_clusterip_tgt_info, config),
.help = &help,
.init = &init,
.parse = &parse,
reply other threads:[~2005-03-06 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=422B8734.9040404@eurodev.net \
--to=pablo@eurodev.net \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.