* [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
@ 2008-01-17 20:10 Jan Engelhardt
2008-01-17 20:10 ` [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts Jan Engelhardt
` (3 more replies)
0 siblings, 4 replies; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-17 20:10 UTC (permalink / raw)
To: kaber; +Cc: Netfilter Developer Mailing List
commit a6c73fee39cedc87ef2562f84d5b1f68a315a79b
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Thu Jan 17 18:58:05 2008 +0100
[NETFILTER]: ebtables: expand/remove unneeded macros
The EBT_*_{MATCH,TARGET,WATCHER} macros are only used within the
accompanying .c source file, so they can be moved to it. And since
they are only used once, we can just as well expand them.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h
index a11b0c2..11421ca 100644
--- a/include/linux/netfilter_bridge/ebt_802_3.h
+++ b/include/linux/netfilter_bridge/ebt_802_3.h
@@ -4,8 +4,6 @@
#define EBT_802_3_SAP 0x01
#define EBT_802_3_TYPE 0x02
-#define EBT_802_3_MATCH "802_3"
-
/*
* If frame has DSAP/SSAP value 0xaa you must check the SNAP type
* to discover what kind of packet we're carrying.
diff --git a/include/linux/netfilter_bridge/ebt_among.h b/include/linux/netfilter_bridge/ebt_among.h
index 7654069..d120451 100644
--- a/include/linux/netfilter_bridge/ebt_among.h
+++ b/include/linux/netfilter_bridge/ebt_among.h
@@ -60,6 +60,4 @@ struct ebt_among_info
#define ebt_among_wh_src(x) ((x)->wh_src_ofs ? \
(struct ebt_mac_wormhash*)((char*)(x) + (x)->wh_src_ofs) : NULL)
-#define EBT_AMONG_MATCH "among"
-
#endif
diff --git a/include/linux/netfilter_bridge/ebt_arp.h b/include/linux/netfilter_bridge/ebt_arp.h
index cbf4843..e5c9fbf 100644
--- a/include/linux/netfilter_bridge/ebt_arp.h
+++ b/include/linux/netfilter_bridge/ebt_arp.h
@@ -12,7 +12,6 @@
#define EBT_ARP_MASK (EBT_ARP_OPCODE | EBT_ARP_HTYPE | EBT_ARP_PTYPE | \
EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_SRC_MAC | EBT_ARP_DST_MAC | \
EBT_ARP_GRAT)
-#define EBT_ARP_MATCH "arp"
struct ebt_arp_info
{
diff --git a/include/linux/netfilter_bridge/ebt_arpreply.h b/include/linux/netfilter_bridge/ebt_arpreply.h
index 96a8339..1f333a3 100644
--- a/include/linux/netfilter_bridge/ebt_arpreply.h
+++ b/include/linux/netfilter_bridge/ebt_arpreply.h
@@ -6,6 +6,5 @@ struct ebt_arpreply_info
unsigned char mac[ETH_ALEN];
int target;
};
-#define EBT_ARPREPLY_TARGET "arpreply"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h
index d684747..7cca9d0 100644
--- a/include/linux/netfilter_bridge/ebt_ip.h
+++ b/include/linux/netfilter_bridge/ebt_ip.h
@@ -23,7 +23,6 @@
#define EBT_IP_DPORT 0x20
#define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\
EBT_IP_SPORT | EBT_IP_DPORT )
-#define EBT_IP_MATCH "ip"
/* the same values are used for the invflags */
struct ebt_ip_info
diff --git a/include/linux/netfilter_bridge/ebt_limit.h b/include/linux/netfilter_bridge/ebt_limit.h
index d8b6500..be43d36 100644
--- a/include/linux/netfilter_bridge/ebt_limit.h
+++ b/include/linux/netfilter_bridge/ebt_limit.h
@@ -1,8 +1,6 @@
#ifndef __LINUX_BRIDGE_EBT_LIMIT_H
#define __LINUX_BRIDGE_EBT_LIMIT_H
-#define EBT_LIMIT_MATCH "limit"
-
/* timings are in milliseconds. */
#define EBT_LIMIT_SCALE 10000
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h
index 96e231a..fb25ebe 100644
--- a/include/linux/netfilter_bridge/ebt_log.h
+++ b/include/linux/netfilter_bridge/ebt_log.h
@@ -6,7 +6,6 @@
#define EBT_LOG_NFLOG 0x04
#define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP)
#define EBT_LOG_PREFIX_SIZE 30
-#define EBT_LOG_WATCHER "log"
struct ebt_log_info
{
diff --git a/include/linux/netfilter_bridge/ebt_mark_m.h b/include/linux/netfilter_bridge/ebt_mark_m.h
index 301524f..bcfc2f0 100644
--- a/include/linux/netfilter_bridge/ebt_mark_m.h
+++ b/include/linux/netfilter_bridge/ebt_mark_m.h
@@ -10,6 +10,5 @@ struct ebt_mark_m_info
uint8_t invert;
uint8_t bitmask;
};
-#define EBT_MARK_MATCH "mark_m"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_mark_t.h b/include/linux/netfilter_bridge/ebt_mark_t.h
index 6270f6f..159f073 100644
--- a/include/linux/netfilter_bridge/ebt_mark_t.h
+++ b/include/linux/netfilter_bridge/ebt_mark_t.h
@@ -19,6 +19,5 @@ struct ebt_mark_t_info
/* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
int target;
};
-#define EBT_MARK_TARGET "mark"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_nat.h b/include/linux/netfilter_bridge/ebt_nat.h
index 435b886..e1b62b4 100644
--- a/include/linux/netfilter_bridge/ebt_nat.h
+++ b/include/linux/netfilter_bridge/ebt_nat.h
@@ -8,7 +8,5 @@ struct ebt_nat_info
/* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
int target;
};
-#define EBT_SNAT_TARGET "snat"
-#define EBT_DNAT_TARGET "dnat"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_pkttype.h b/include/linux/netfilter_bridge/ebt_pkttype.h
index 0d64bbb..de6848a 100644
--- a/include/linux/netfilter_bridge/ebt_pkttype.h
+++ b/include/linux/netfilter_bridge/ebt_pkttype.h
@@ -6,6 +6,5 @@ struct ebt_pkttype_info
uint8_t pkt_type;
uint8_t invert;
};
-#define EBT_PKTTYPE_MATCH "pkttype"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_redirect.h b/include/linux/netfilter_bridge/ebt_redirect.h
index 5c67990..e9dbda7 100644
--- a/include/linux/netfilter_bridge/ebt_redirect.h
+++ b/include/linux/netfilter_bridge/ebt_redirect.h
@@ -6,6 +6,5 @@ struct ebt_redirect_info
/* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
int target;
};
-#define EBT_REDIRECT_TARGET "redirect"
#endif
diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h
index e5fd678..83a6da3 100644
--- a/include/linux/netfilter_bridge/ebt_stp.h
+++ b/include/linux/netfilter_bridge/ebt_stp.h
@@ -18,8 +18,6 @@
#define EBT_STP_MASK 0x0fff
#define EBT_STP_CONFIG_MASK 0x0ffe
-#define EBT_STP_MATCH "stp"
-
struct ebt_stp_config_info
{
uint8_t flags;
diff --git a/include/linux/netfilter_bridge/ebt_ulog.h b/include/linux/netfilter_bridge/ebt_ulog.h
index b677e26..4dafcc0 100644
--- a/include/linux/netfilter_bridge/ebt_ulog.h
+++ b/include/linux/netfilter_bridge/ebt_ulog.h
@@ -6,7 +6,6 @@
#define EBT_ULOG_MAXNLGROUPS 32 /* hardcoded netlink max */
#define EBT_ULOG_PREFIX_LEN 32
#define EBT_ULOG_MAX_QLEN 50
-#define EBT_ULOG_WATCHER "ulog"
#define EBT_ULOG_VERSION 1
struct ebt_ulog_info {
diff --git a/include/linux/netfilter_bridge/ebt_vlan.h b/include/linux/netfilter_bridge/ebt_vlan.h
index 1d98be4..4715d7b 100644
--- a/include/linux/netfilter_bridge/ebt_vlan.h
+++ b/include/linux/netfilter_bridge/ebt_vlan.h
@@ -5,7 +5,6 @@
#define EBT_VLAN_PRIO 0x02
#define EBT_VLAN_ENCAP 0x04
#define EBT_VLAN_MASK (EBT_VLAN_ID | EBT_VLAN_PRIO | EBT_VLAN_ENCAP)
-#define EBT_VLAN_MATCH "vlan"
struct ebt_vlan_info {
uint16_t id; /* VLAN ID {1-4095} */
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 41a7807..2e8d994 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -52,7 +52,7 @@ static int ebt_802_3_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_802_3 =
{
- .name = EBT_802_3_MATCH,
+ .name = "802_3",
.match = ebt_filter_802_3,
.check = ebt_802_3_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c
index 6436d30..3fb9ed4 100644
--- a/net/bridge/netfilter/ebt_among.c
+++ b/net/bridge/netfilter/ebt_among.c
@@ -207,7 +207,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
}
static struct ebt_match filter_among = {
- .name = EBT_AMONG_MATCH,
+ .name = "among",
.match = ebt_filter_among,
.check = ebt_among_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 1814139..039faf4 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -115,7 +115,7 @@ static int ebt_arp_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_arp =
{
- .name = EBT_ARP_MATCH,
+ .name = "arp",
.match = ebt_filter_arp,
.check = ebt_arp_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 48a80e4..90dfa68 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -75,7 +75,7 @@ static int ebt_target_reply_check(const char *tablename, unsigned int hookmask,
static struct ebt_target reply_target =
{
- .name = EBT_ARPREPLY_TARGET,
+ .name = "arpreply",
.target = ebt_target_reply,
.check = ebt_target_reply_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index 74262e9..7ebbaaf 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -48,7 +48,7 @@ static int ebt_target_dnat_check(const char *tablename, unsigned int hookmask,
static struct ebt_target dnat =
{
- .name = EBT_DNAT_TARGET,
+ .name = "dnat",
.target = ebt_target_dnat,
.check = ebt_target_dnat_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
index 69f7f0a..272e9ff 100644
--- a/net/bridge/netfilter/ebt_ip.c
+++ b/net/bridge/netfilter/ebt_ip.c
@@ -107,7 +107,7 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_ip =
{
- .name = EBT_IP_MATCH,
+ .name = "ip",
.match = ebt_filter_ip,
.check = ebt_ip_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index d48fa5c..fcf3151 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -92,7 +92,7 @@ static int ebt_limit_check(const char *tablename, unsigned int hookmask,
static struct ebt_match ebt_limit_reg =
{
- .name = EBT_LIMIT_MATCH,
+ .name = "limit",
.match = ebt_limit_match,
.check = ebt_limit_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 3be9e98..97db468 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -177,7 +177,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
static struct ebt_watcher log =
{
- .name = EBT_LOG_WATCHER,
+ .name = "log",
.watcher = ebt_log,
.check = ebt_log_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 6cba543..0b44fec 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -59,7 +59,7 @@ static int ebt_target_mark_check(const char *tablename, unsigned int hookmask,
static struct ebt_target mark_target =
{
- .name = EBT_MARK_TARGET,
+ .name = "mark",
.target = ebt_target_mark,
.check = ebt_target_mark_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index 6b0d216..cf81aa3 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -41,7 +41,7 @@ static int ebt_mark_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_mark =
{
- .name = EBT_MARK_MATCH,
+ .name = "mark_m",
.match = ebt_filter_mark,
.check = ebt_mark_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index 4fffd70..07a3d1d 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -38,7 +38,7 @@ static int ebt_pkttype_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_pkttype =
{
- .name = EBT_PKTTYPE_MATCH,
+ .name = "pkttype",
.match = ebt_filter_pkttype,
.check = ebt_pkttype_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index 422cb83..ce561c6 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -53,7 +53,7 @@ static int ebt_target_redirect_check(const char *tablename, unsigned int hookmas
static struct ebt_target redirect_target =
{
- .name = EBT_REDIRECT_TARGET,
+ .name = "redirect",
.target = ebt_target_redirect,
.check = ebt_target_redirect_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index 425ac92..5980a4c 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -69,7 +69,7 @@ static int ebt_target_snat_check(const char *tablename, unsigned int hookmask,
static struct ebt_target snat =
{
- .name = EBT_SNAT_TARGET,
+ .name = "snat",
.target = ebt_target_snat,
.check = ebt_target_snat_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 31b7736..8655c84 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -174,7 +174,7 @@ static int ebt_stp_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_stp =
{
- .name = EBT_STP_MATCH,
+ .name = "stp",
.match = ebt_filter_stp,
.check = ebt_stp_check,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index b73ba28..ce92b2c 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -273,14 +273,14 @@ static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
}
static struct ebt_watcher ulog = {
- .name = EBT_ULOG_WATCHER,
+ .name = "ulog",
.watcher = ebt_ulog,
.check = ebt_ulog_check,
.me = THIS_MODULE,
};
static const struct nf_logger ebt_ulog_logger = {
- .name = EBT_ULOG_WATCHER,
+ .name = "ulog",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
};
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
index 0ddf749..488cc94 100644
--- a/net/bridge/netfilter/ebt_vlan.c
+++ b/net/bridge/netfilter/ebt_vlan.c
@@ -170,7 +170,7 @@ ebt_check_vlan(const char *tablename,
}
static struct ebt_match filter_vlan = {
- .name = EBT_VLAN_MATCH,
+ .name = "vlan",
.match = ebt_filter_vlan,
.check = ebt_check_vlan,
.me = THIS_MODULE,
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts
2008-01-17 20:10 [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Jan Engelhardt
@ 2008-01-17 20:10 ` Jan Engelhardt
2008-01-20 14:52 ` Patrick McHardy
2008-01-17 20:11 ` [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly Jan Engelhardt
` (2 subsequent siblings)
3 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-17 20:10 UTC (permalink / raw)
To: kaber; +Cc: Netfilter Developer Mailing List
commit cae15d95db223db34c6ac39953061e7aa8ebc7b1
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Thu Jan 17 19:40:51 2008 +0100
[NETFILTER]: ebtables: remove casts, use consts
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/include/net/arp.h b/include/net/arp.h
index 752eb47..c236270 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -13,15 +13,17 @@ extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
extern void arp_send(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
- unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
+ const unsigned char *dest_hw,
+ const unsigned char *src_hw, const unsigned char *th);
extern int arp_bind_neighbour(struct dst_entry *dst);
extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
extern void arp_ifdown(struct net_device *dev);
extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
- unsigned char *dest_hw, unsigned char *src_hw,
- unsigned char *target_hw);
+ const unsigned char *dest_hw,
+ const unsigned char *src_hw,
+ const unsigned char *target_hw);
extern void arp_xmit(struct sk_buff *skb);
extern struct neigh_ops arp_broken_ops;
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 2e8d994..2311ce0 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -15,8 +15,8 @@
static int ebt_filter_802_3(const struct sk_buff *skb, const struct net_device *in,
const struct net_device *out, const void *data, unsigned int datalen)
{
- struct ebt_802_3_info *info = (struct ebt_802_3_info *)data;
- struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb);
+ const struct ebt_802_3_info *info = data;
+ const struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb);
__be16 type = hdr->llc.ui.ctrl & IS_UI ? hdr->llc.ui.type : hdr->llc.ni.type;
if (info->bitmask & EBT_802_3_SAP) {
@@ -40,7 +40,7 @@ static struct ebt_match filter_802_3;
static int ebt_802_3_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_802_3_info *info = (struct ebt_802_3_info *)data;
+ const struct ebt_802_3_info *info = data;
if (datalen < sizeof(struct ebt_802_3_info))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c
index 3fb9ed4..56502e6 100644
--- a/net/bridge/netfilter/ebt_among.c
+++ b/net/bridge/netfilter/ebt_among.c
@@ -25,7 +25,7 @@ static int ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
const struct ebt_mac_wormhash_tuple *p;
int start, limit, i;
uint32_t cmp[2] = { 0, 0 };
- int key = (const unsigned char) mac[5];
+ int key = ((const unsigned char *)mac)[5];
memcpy(((char *) cmp) + 2, mac, 6);
start = wh->table[key];
@@ -73,15 +73,18 @@ static int ebt_mac_wormhash_check_integrity(const struct ebt_mac_wormhash
static int get_ip_dst(const struct sk_buff *skb, __be32 *addr)
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
- struct iphdr _iph, *ih;
+ const struct iphdr *ih;
+ struct iphdr _iph;
ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
if (ih == NULL)
return -1;
*addr = ih->daddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
- struct arphdr _arph, *ah;
- __be32 buf, *bp;
+ const struct arphdr *ah;
+ struct arphdr _arph;
+ const __be32 *bp;
+ __be32 buf;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
@@ -101,15 +104,18 @@ static int get_ip_dst(const struct sk_buff *skb, __be32 *addr)
static int get_ip_src(const struct sk_buff *skb, __be32 *addr)
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
- struct iphdr _iph, *ih;
+ const struct iphdr *ih;
+ struct iphdr _iph;
ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
if (ih == NULL)
return -1;
*addr = ih->saddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
- struct arphdr _arph, *ah;
- __be32 buf, *bp;
+ const struct arphdr *ah;
+ struct arphdr _arph;
+ const __be32 *bp;
+ __be32 buf;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
@@ -130,7 +136,7 @@ static int ebt_filter_among(const struct sk_buff *skb,
const struct net_device *out, const void *data,
unsigned int datalen)
{
- struct ebt_among_info *info = (struct ebt_among_info *) data;
+ const struct ebt_among_info *info = data;
const char *dmac, *smac;
const struct ebt_mac_wormhash *wh_dst, *wh_src;
__be32 dip = 0, sip = 0;
@@ -175,7 +181,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data,
unsigned int datalen)
{
- struct ebt_among_info *info = (struct ebt_among_info *) data;
+ const struct ebt_among_info *info = data;
int expected_length = sizeof(struct ebt_among_info);
const struct ebt_mac_wormhash *wh_dst, *wh_src;
int err;
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 039faf4..2260626 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -18,8 +18,9 @@
static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in,
const struct net_device *out, const void *data, unsigned int datalen)
{
- struct ebt_arp_info *info = (struct ebt_arp_info *)data;
- struct arphdr _arph, *ah;
+ const struct ebt_arp_info *info = data;
+ const struct arphdr *ah;
+ struct arphdr _arph;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL)
@@ -35,7 +36,8 @@ static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in
return EBT_NOMATCH;
if (info->bitmask & (EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_GRAT)) {
- __be32 saddr, daddr, *sap, *dap;
+ const __be32 *sap, *dap;
+ __be32 saddr, daddr;
if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP))
return EBT_NOMATCH;
@@ -61,7 +63,8 @@ static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in
}
if (info->bitmask & (EBT_ARP_SRC_MAC | EBT_ARP_DST_MAC)) {
- unsigned char _mac[ETH_ALEN], *mp;
+ const unsigned char *mp;
+ unsigned char _mac[ETH_ALEN];
uint8_t verdict, i;
if (ah->ar_hln != ETH_ALEN || ah->ar_hrd != htons(ARPHRD_ETHER))
@@ -100,7 +103,7 @@ static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in
static int ebt_arp_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_arp_info *info = (struct ebt_arp_info *)data;
+ const struct ebt_arp_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_arp_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 90dfa68..10f9811 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -19,10 +19,13 @@ static int ebt_target_reply(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data;
- __be32 _sip, *siptr, _dip, *diptr;
- struct arphdr _ah, *ap;
- unsigned char _sha[ETH_ALEN], *shp;
+ struct ebt_arpreply_info *info = (void *)data;
+ const __be32 *siptr, *diptr;
+ __be32 _sip, _dip;
+ const struct arphdr *ap;
+ struct arphdr _ah;
+ const unsigned char *shp;
+ unsigned char _sha[ETH_ALEN];
ap = skb_header_pointer(skb, 0, sizeof(_ah), &_ah);
if (ap == NULL)
@@ -58,7 +61,7 @@ static int ebt_target_reply(struct sk_buff *skb, unsigned int hooknr,
static int ebt_target_reply_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data;
+ const struct ebt_arpreply_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_arpreply_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index 7ebbaaf..7696fb6 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -18,7 +18,7 @@ static int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_nat_info *info = (struct ebt_nat_info *)data;
+ const struct ebt_nat_info *info = data;
if (skb_make_writable(skb, 0))
return NF_DROP;
@@ -30,7 +30,7 @@ static int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
static int ebt_target_dnat_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_nat_info *info = (struct ebt_nat_info *)data;
+ const struct ebt_nat_info *info = data;
if (BASE_CHAIN && info->target == EBT_RETURN)
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
index 272e9ff..4470a63 100644
--- a/net/bridge/netfilter/ebt_ip.c
+++ b/net/bridge/netfilter/ebt_ip.c
@@ -28,9 +28,11 @@ static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in,
const struct net_device *out, const void *data,
unsigned int datalen)
{
- struct ebt_ip_info *info = (struct ebt_ip_info *)data;
- struct iphdr _iph, *ih;
- struct tcpudphdr _ports, *pptr;
+ const struct ebt_ip_info *info = data;
+ const struct iphdr *ih;
+ struct iphdr _iph;
+ const struct tcpudphdr *pptr;
+ struct tcpudphdr _ports;
ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
if (ih == NULL)
@@ -79,7 +81,7 @@ static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in,
static int ebt_ip_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_ip_info *info = (struct ebt_ip_info *)data;
+ const struct ebt_ip_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_ip_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index fcf3151..d90062d 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -69,7 +69,7 @@ user2credits(u_int32_t user)
static int ebt_limit_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_limit_info *info = (struct ebt_limit_info *)data;
+ struct ebt_limit_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_limit_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 97db468..f4659f9 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -24,7 +24,7 @@ static DEFINE_SPINLOCK(ebt_log_lock);
static int ebt_log_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_log_info *info = (struct ebt_log_info *)data;
+ struct ebt_log_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_log_info)))
return -EINVAL;
@@ -50,7 +50,7 @@ struct arppayload
unsigned char ip_dst[4];
};
-static void print_MAC(unsigned char *p)
+static void print_MAC(const unsigned char *p)
{
int i;
@@ -84,7 +84,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
htons(ETH_P_IP)){
- struct iphdr _iph, *ih;
+ const struct iphdr *ih;
+ struct iphdr _iph;
ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
if (ih == NULL) {
@@ -99,7 +100,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
ih->protocol == IPPROTO_UDPLITE ||
ih->protocol == IPPROTO_SCTP ||
ih->protocol == IPPROTO_DCCP) {
- struct tcpudphdr _ports, *pptr;
+ const struct tcpudphdr *pptr;
+ struct tcpudphdr _ports;
pptr = skb_header_pointer(skb, ih->ihl*4,
sizeof(_ports), &_ports);
@@ -116,7 +118,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
if ((bitmask & EBT_LOG_ARP) &&
((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) ||
(eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) {
- struct arphdr _arph, *ah;
+ const struct arphdr *ah;
+ struct arphdr _arph;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL) {
@@ -132,7 +135,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
if (ah->ar_hrd == htons(1) &&
ah->ar_hln == ETH_ALEN &&
ah->ar_pln == sizeof(__be32)) {
- struct arppayload _arpp, *ap;
+ const struct arppayload *ap;
+ struct arppayload _arpp;
ap = skb_header_pointer(skb, sizeof(_arph),
sizeof(_arpp), &_arpp);
@@ -160,7 +164,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_log_info *info = (struct ebt_log_info *)data;
+ const struct ebt_log_info *info = data;
struct nf_loginfo li;
li.type = NF_LOG_TYPE_LOG;
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 0b44fec..64a816c 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -21,7 +21,7 @@ static int ebt_target_mark(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_mark_t_info *info = (struct ebt_mark_t_info *)data;
+ const struct ebt_mark_t_info *info = data;
int action = info->target & -16;
if (action == MARK_SET_VALUE)
@@ -39,7 +39,7 @@ static int ebt_target_mark(struct sk_buff *skb, unsigned int hooknr,
static int ebt_target_mark_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_mark_t_info *info = (struct ebt_mark_t_info *)data;
+ const struct ebt_mark_t_info *info = data;
int tmp;
if (datalen != EBT_ALIGN(sizeof(struct ebt_mark_t_info)))
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index cf81aa3..5b86f4f 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -16,7 +16,7 @@ static int ebt_filter_mark(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *out, const void *data,
unsigned int datalen)
{
- struct ebt_mark_m_info *info = (struct ebt_mark_m_info *) data;
+ const struct ebt_mark_m_info *info = data;
if (info->bitmask & EBT_MARK_OR)
return !(!!(skb->mark & info->mask) ^ info->invert);
@@ -26,7 +26,7 @@ static int ebt_filter_mark(const struct sk_buff *skb,
static int ebt_mark_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_mark_m_info *info = (struct ebt_mark_m_info *) data;
+ const struct ebt_mark_m_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_mark_m_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index 07a3d1d..3f4f03a 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -18,7 +18,7 @@ static int ebt_filter_pkttype(const struct sk_buff *skb,
const void *data,
unsigned int datalen)
{
- struct ebt_pkttype_info *info = (struct ebt_pkttype_info *)data;
+ const struct ebt_pkttype_info *info = data;
return (skb->pkt_type != info->pkt_type) ^ info->invert;
}
@@ -26,7 +26,7 @@ static int ebt_filter_pkttype(const struct sk_buff *skb,
static int ebt_pkttype_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_pkttype_info *info = (struct ebt_pkttype_info *)data;
+ const struct ebt_pkttype_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_pkttype_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index ce561c6..e08f7fd 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -19,7 +19,7 @@ static int ebt_target_redirect(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_redirect_info *info = (struct ebt_redirect_info *)data;
+ const struct ebt_redirect_info *info = data;
if (skb_make_writable(skb, 0))
return NF_DROP;
@@ -36,7 +36,7 @@ static int ebt_target_redirect(struct sk_buff *skb, unsigned int hooknr,
static int ebt_target_redirect_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_redirect_info *info = (struct ebt_redirect_info *)data;
+ const struct ebt_redirect_info *info = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_redirect_info)))
return -EINVAL;
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index 5980a4c..f393525 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -20,7 +20,7 @@ static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_nat_info *info = (struct ebt_nat_info *) data;
+ const struct ebt_nat_info *info = data;
if (skb_make_writable(skb, 0))
return NF_DROP;
@@ -28,7 +28,8 @@ static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
memcpy(eth_hdr(skb)->h_source, info->mac, ETH_ALEN);
if (!(info->target & NAT_ARP_BIT) &&
eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
- struct arphdr _ah, *ap;
+ const struct arphdr *ap;
+ struct arphdr _ah;
ap = skb_header_pointer(skb, 0, sizeof(_ah), &_ah);
if (ap == NULL)
@@ -45,7 +46,7 @@ out:
static int ebt_target_snat_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_nat_info *info = (struct ebt_nat_info *) data;
+ const struct ebt_nat_info *info = data;
int tmp;
if (datalen != EBT_ALIGN(sizeof(struct ebt_nat_info)))
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 8655c84..56be580 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -40,10 +40,10 @@ struct stp_config_pdu {
#define NR16(p) (p[0] << 8 | p[1])
#define NR32(p) ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3])
-static int ebt_filter_config(struct ebt_stp_info *info,
- struct stp_config_pdu *stpc)
+static int ebt_filter_config(const struct ebt_stp_info *info,
+ const struct stp_config_pdu *stpc)
{
- struct ebt_stp_config_info *c;
+ const struct ebt_stp_config_info *c;
uint16_t v16;
uint32_t v32;
int verdict, i;
@@ -122,9 +122,10 @@ static int ebt_filter_config(struct ebt_stp_info *info,
static int ebt_filter_stp(const struct sk_buff *skb, const struct net_device *in,
const struct net_device *out, const void *data, unsigned int datalen)
{
- struct ebt_stp_info *info = (struct ebt_stp_info *)data;
- struct stp_header _stph, *sp;
- uint8_t header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
+ const struct ebt_stp_info *info = data;
+ const struct stp_header *sp;
+ struct stp_header _stph;
+ const uint8_t header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
sp = skb_header_pointer(skb, 0, sizeof(_stph), &_stph);
if (sp == NULL)
@@ -140,7 +141,8 @@ static int ebt_filter_stp(const struct sk_buff *skb, const struct net_device *in
if (sp->type == BPDU_TYPE_CONFIG &&
info->bitmask & EBT_STP_CONFIG_MASK) {
- struct stp_config_pdu _stpc, *st;
+ const struct stp_config_pdu *st;
+ struct stp_config_pdu _stpc;
st = skb_header_pointer(skb, sizeof(_stph),
sizeof(_stpc), &_stpc);
@@ -154,10 +156,10 @@ static int ebt_filter_stp(const struct sk_buff *skb, const struct net_device *in
static int ebt_stp_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_stp_info *info = (struct ebt_stp_info *)data;
- int len = EBT_ALIGN(sizeof(struct ebt_stp_info));
- uint8_t bridge_ula[6] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
- uint8_t msk[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+ const struct ebt_stp_info *info = data;
+ const unsigned int len = EBT_ALIGN(sizeof(struct ebt_stp_info));
+ const uint8_t bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
+ const uint8_t msk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
if (info->bitmask & ~EBT_STP_MASK || info->invflags & ~EBT_STP_MASK ||
!(info->bitmask & EBT_STP_MASK))
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index ce92b2c..d053522 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -249,7 +249,7 @@ static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+ const struct ebt_ulog_info *uloginfo = data;
ebt_ulog_packet(hooknr, skb, in, out, uloginfo, NULL);
}
@@ -258,7 +258,7 @@ static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+ struct ebt_ulog_info *uloginfo = data;
if (datalen != EBT_ALIGN(sizeof(struct ebt_ulog_info)) ||
uloginfo->nlgroup > 31)
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
index 488cc94..ecb4f3d 100644
--- a/net/bridge/netfilter/ebt_vlan.c
+++ b/net/bridge/netfilter/ebt_vlan.c
@@ -46,8 +46,9 @@ ebt_filter_vlan(const struct sk_buff *skb,
const struct net_device *out,
const void *data, unsigned int datalen)
{
- struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
- struct vlan_hdr _frame, *fp;
+ const struct ebt_vlan_info *info = data;
+ const struct vlan_hdr *fp;
+ struct vlan_hdr _frame;
unsigned short TCI; /* Whole TCI, given from parsed frame */
unsigned short id; /* VLAN ID, given from frame TCI */
@@ -91,7 +92,7 @@ ebt_check_vlan(const char *tablename,
unsigned int hooknr,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
- struct ebt_vlan_info *info = (struct ebt_vlan_info *) data;
+ struct ebt_vlan_info *info = data;
/* Parameters buffer overflow check */
if (datalen != EBT_ALIGN(sizeof(struct ebt_vlan_info))) {
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index a44ff1a..abda952 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -558,8 +558,9 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt)
*/
struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
- unsigned char *dest_hw, unsigned char *src_hw,
- unsigned char *target_hw)
+ const unsigned char *dest_hw,
+ const unsigned char *src_hw,
+ const unsigned char *target_hw)
{
struct sk_buff *skb;
struct arphdr *arp;
@@ -672,8 +673,8 @@ void arp_xmit(struct sk_buff *skb)
*/
void arp_send(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
- unsigned char *dest_hw, unsigned char *src_hw,
- unsigned char *target_hw)
+ const unsigned char *dest_hw, const unsigned char *src_hw,
+ const unsigned char *target_hw)
{
struct sk_buff *skb;
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
2008-01-17 20:10 [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Jan Engelhardt
2008-01-17 20:10 ` [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts Jan Engelhardt
@ 2008-01-17 20:11 ` Jan Engelhardt
2008-01-20 14:52 ` Patrick McHardy
2008-01-22 17:02 ` Patrick McHardy
2008-01-17 20:11 ` [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions Jan Engelhardt
2008-01-20 13:02 ` [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Patrick McHardy
3 siblings, 2 replies; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-17 20:11 UTC (permalink / raw)
To: kaber; +Cc: Netfilter Developer Mailing List
commit 110d4caa32e46b7dd78e6b59518e0137fc02a6e4
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Thu Jan 17 20:12:15 2008 +0100
[NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
Reference to previous related commit:
9f15c5302de4e8b0aac7ca24c36bf26a7fe1a513.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 2311ce0..66b9c07 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -50,8 +50,7 @@ static int ebt_802_3_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_802_3 =
-{
+static struct ebt_match filter_802_3 __read_mostly = {
.name = "802_3",
.match = ebt_filter_802_3,
.check = ebt_802_3_check,
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c
index 56502e6..f67b96d 100644
--- a/net/bridge/netfilter/ebt_among.c
+++ b/net/bridge/netfilter/ebt_among.c
@@ -212,7 +212,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_among = {
+static struct ebt_match filter_among __read_mostly = {
.name = "among",
.match = ebt_filter_among,
.check = ebt_among_check,
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 2260626..7279513 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -116,8 +116,7 @@ static int ebt_arp_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_arp =
-{
+static struct ebt_match filter_arp __read_mostly = {
.name = "arp",
.match = ebt_filter_arp,
.check = ebt_arp_check,
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 10f9811..a1559ca 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -76,8 +76,7 @@ static int ebt_target_reply_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target reply_target =
-{
+static struct ebt_target reply_target __read_mostly = {
.name = "arpreply",
.target = ebt_target_reply,
.check = ebt_target_reply_check,
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index 7696fb6..5df87dd 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -46,8 +46,7 @@ static int ebt_target_dnat_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target dnat =
-{
+static struct ebt_target dnat __read_mostly = {
.name = "dnat",
.target = ebt_target_dnat,
.check = ebt_target_dnat_check,
diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
index 4470a63..5b9134a 100644
--- a/net/bridge/netfilter/ebt_ip.c
+++ b/net/bridge/netfilter/ebt_ip.c
@@ -107,8 +107,7 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_ip =
-{
+static struct ebt_match filter_ip __read_mostly = {
.name = "ip",
.match = ebt_filter_ip,
.check = ebt_ip_check,
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index d90062d..beb47c3 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -90,8 +90,7 @@ static int ebt_limit_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match ebt_limit_reg =
-{
+static struct ebt_match ebt_limit_reg __read_mostly = {
.name = "limit",
.match = ebt_limit_match,
.check = ebt_limit_check,
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index f4659f9..3f6de4e 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -179,15 +179,14 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
info->prefix);
}
-static struct ebt_watcher log =
-{
+static struct ebt_watcher log __read_mostly = {
.name = "log",
.watcher = ebt_log,
.check = ebt_log_check,
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_log_logger = {
+static const struct nf_logger ebt_log_logger __read_mostly = {
.name = "ebt_log",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 64a816c..70c8b8f 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -57,8 +57,7 @@ static int ebt_target_mark_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target mark_target =
-{
+static struct ebt_target mark_target __read_mostly = {
.name = "mark",
.target = ebt_target_mark,
.check = ebt_target_mark_check,
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index 5b86f4f..e2cb1e6 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -39,8 +39,7 @@ static int ebt_mark_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_mark =
-{
+static struct ebt_match filter_mark __read_mostly = {
.name = "mark_m",
.match = ebt_filter_mark,
.check = ebt_mark_check,
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index 3f4f03a..ce104df 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -36,8 +36,7 @@ static int ebt_pkttype_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_pkttype =
-{
+static struct ebt_match filter_pkttype __read_mostly = {
.name = "pkttype",
.match = ebt_filter_pkttype,
.check = ebt_pkttype_check,
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index e08f7fd..3e035a9 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -51,8 +51,7 @@ static int ebt_target_redirect_check(const char *tablename, unsigned int hookmas
return 0;
}
-static struct ebt_target redirect_target =
-{
+static struct ebt_target redirect_target __read_mostly = {
.name = "redirect",
.target = ebt_target_redirect,
.check = ebt_target_redirect_check,
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index f393525..22158ab 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -68,8 +68,7 @@ static int ebt_target_snat_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target snat =
-{
+static struct ebt_target snat __read_mostly = {
.name = "snat",
.target = ebt_target_snat,
.check = ebt_target_snat_check,
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 56be580..370726c 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -174,8 +174,7 @@ static int ebt_stp_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_stp =
-{
+static struct ebt_match filter_stp __read_mostly = {
.name = "stp",
.match = ebt_filter_stp,
.check = ebt_stp_check,
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index d053522..3a56afe 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -272,14 +272,14 @@ static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_watcher ulog = {
+static struct ebt_watcher ulog __read_mostly = {
.name = "ulog",
.watcher = ebt_ulog,
.check = ebt_ulog_check,
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_ulog_logger = {
+static const struct nf_logger ebt_ulog_logger __read_mostly = {
.name = "ulog",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
index ecb4f3d..6fadc52 100644
--- a/net/bridge/netfilter/ebt_vlan.c
+++ b/net/bridge/netfilter/ebt_vlan.c
@@ -170,7 +170,7 @@ ebt_check_vlan(const char *tablename,
return 0;
}
-static struct ebt_match filter_vlan = {
+static struct ebt_match filter_vlan __read_mostly = {
.name = "vlan",
.match = ebt_filter_vlan,
.check = ebt_check_vlan,
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions
2008-01-17 20:10 [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Jan Engelhardt
2008-01-17 20:10 ` [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts Jan Engelhardt
2008-01-17 20:11 ` [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly Jan Engelhardt
@ 2008-01-17 20:11 ` Jan Engelhardt
2008-01-20 14:54 ` Patrick McHardy
2008-01-20 13:02 ` [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Patrick McHardy
3 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-17 20:11 UTC (permalink / raw)
To: kaber; +Cc: Netfilter Developer Mailing List
commit 4ad299b1644579e5c9aae025bf81f6aff1cbdc77
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Thu Jan 17 20:12:15 2008 +0100
[NETFILTER]: ebtables: Update modules' descriptions
Update the MODULES_DESCRIPTION() tags for all Ebtables modules.
Reference to previous related commit:
3e53176b24b94f660ba61bfab5bcaf5c135bbcf2.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 66b9c07..089511a 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -69,4 +69,5 @@ static void __exit ebt_802_3_fini(void)
module_init(ebt_802_3_init);
module_exit(ebt_802_3_fini);
+MODULE_DESCRIPTION("Ebtables: DSAP/SSAP field and SNAP type matching");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c
index f67b96d..da6b3d9 100644
--- a/net/bridge/netfilter/ebt_among.c
+++ b/net/bridge/netfilter/ebt_among.c
@@ -231,4 +231,5 @@ static void __exit ebt_among_fini(void)
module_init(ebt_among_init);
module_exit(ebt_among_fini);
+MODULE_DESCRIPTION("Ebtables: Combined MAC/IP address list matching");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 7279513..e512327 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -135,4 +135,5 @@ static void __exit ebt_arp_fini(void)
module_init(ebt_arp_init);
module_exit(ebt_arp_fini);
+MODULE_DESCRIPTION("Ebtables: ARP protocol packet match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index a1559ca..3ce1de7 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -95,4 +95,5 @@ static void __exit ebt_arpreply_fini(void)
module_init(ebt_arpreply_init);
module_exit(ebt_arpreply_fini);
+MODULE_DESCRIPTION("Ebtables: ARP reply target");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index 5df87dd..5119d92 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -65,4 +65,5 @@ static void __exit ebt_dnat_fini(void)
module_init(ebt_dnat_init);
module_exit(ebt_dnat_fini);
+MODULE_DESCRIPTION("Ebtables: Destination MAC address translation");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
index 5b9134a..594353d 100644
--- a/net/bridge/netfilter/ebt_ip.c
+++ b/net/bridge/netfilter/ebt_ip.c
@@ -126,4 +126,5 @@ static void __exit ebt_ip_fini(void)
module_init(ebt_ip_init);
module_exit(ebt_ip_fini);
+MODULE_DESCRIPTION("Ebtables: IPv4 protocol packet match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index beb47c3..0384d98 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -109,4 +109,5 @@ static void __exit ebt_limit_fini(void)
module_init(ebt_limit_init);
module_exit(ebt_limit_fini);
+MODULE_DESCRIPTION("Ebtables: rate-limit match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 3f6de4e..a7edf2e 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -211,4 +211,5 @@ static void __exit ebt_log_fini(void)
module_init(ebt_log_init);
module_exit(ebt_log_fini);
+MODULE_DESCRIPTION("Ebtables: Packet logging to syslog");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 70c8b8f..32c1b53 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -76,4 +76,5 @@ static void __exit ebt_mark_fini(void)
module_init(ebt_mark_init);
module_exit(ebt_mark_fini);
+MODULE_DESCRIPTION("Ebtables: packet mark modification");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index e2cb1e6..cd12628 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -58,4 +58,5 @@ static void __exit ebt_mark_m_fini(void)
module_init(ebt_mark_m_init);
module_exit(ebt_mark_m_fini);
+MODULE_DESCRIPTION("Ebtables: packet mark match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index ce104df..e8f7f2c 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -55,4 +55,5 @@ static void __exit ebt_pkttype_fini(void)
module_init(ebt_pkttype_init);
module_exit(ebt_pkttype_fini);
+MODULE_DESCRIPTION("Ebtables: link layer packet type match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index 3e035a9..38a7bf8 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -70,4 +70,5 @@ static void __exit ebt_redirect_fini(void)
module_init(ebt_redirect_init);
module_exit(ebt_redirect_fini);
+MODULE_DESCRIPTION("Ebtables: Packet redirection to localhost");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index 22158ab..a798dcd 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -87,4 +87,5 @@ static void __exit ebt_snat_fini(void)
module_init(ebt_snat_init);
module_exit(ebt_snat_fini);
+MODULE_DESCRIPTION("Ebtables: Source MAC address translation");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 370726c..ea23804 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -193,4 +193,5 @@ static void __exit ebt_stp_fini(void)
module_init(ebt_stp_init);
module_exit(ebt_stp_fini);
+MODULE_DESCRIPTION("Ebtables: Spanning Tree Protocol packet match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 3a56afe..628d716 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -340,5 +340,4 @@ module_init(ebt_ulog_init);
module_exit(ebt_ulog_fini);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
-MODULE_DESCRIPTION("ebtables userspace logging module for bridged Ethernet"
- " frames");
+MODULE_DESCRIPTION("Ebtables: packet logging to netlink using ULOG");
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
index 6fadc52..545d97b 100644
--- a/net/bridge/netfilter/ebt_vlan.c
+++ b/net/bridge/netfilter/ebt_vlan.c
@@ -31,8 +31,7 @@ static int debug;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "debug=1 is turn on debug messages");
MODULE_AUTHOR("Nick Fedchik <nick@fedchik.org.ua>");
-MODULE_DESCRIPTION("802.1Q match module (ebtables extension), v"
- MODULE_VERS);
+MODULE_DESCRIPTION("Ebtables: 802.1Q VLAN tag match");
MODULE_LICENSE("GPL");
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-17 20:10 [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Jan Engelhardt
` (2 preceding siblings ...)
2008-01-17 20:11 ` [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions Jan Engelhardt
@ 2008-01-20 13:02 ` Patrick McHardy
2008-01-20 13:09 ` Jan Engelhardt
3 siblings, 1 reply; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 13:02 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> commit a6c73fee39cedc87ef2562f84d5b1f68a315a79b
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Thu Jan 17 18:58:05 2008 +0100
>
> [NETFILTER]: ebtables: expand/remove unneeded macros
>
> The EBT_*_{MATCH,TARGET,WATCHER} macros are only used within the
> accompanying .c source file, so they can be moved to it. And since
> they are only used once, we can just as well expand them.
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Your patches all look fine, but please CC Bart on ebtables patches,
I think its impolite to bypass him when he's stated as maintainer.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 13:02 ` [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Patrick McHardy
@ 2008-01-20 13:09 ` Jan Engelhardt
2008-01-20 13:17 ` Patrick McHardy
0 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-20 13:09 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Netfilter Developer Mailing List, bdschuym
On Jan 20 2008 14:02, Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> commit a6c73fee39cedc87ef2562f84d5b1f68a315a79b
>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>> Date: Thu Jan 17 18:58:05 2008 +0100
>>
>> [NETFILTER]: ebtables: expand/remove unneeded macros
>>
>> The EBT_*_{MATCH,TARGET,WATCHER} macros are only used within the
>> accompanying .c source file, so they can be moved to it. And since
>> they are only used once, we can just as well expand them.
>>
>> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
>
>
> Your patches all look fine, but please CC Bart on ebtables patches,
> I think its impolite to bypass him when he's stated as maintainer.
>
>
Sorry for the inconvenience! Links are:
[1] marc missed that one(!?)
[2] http://marc.info/?l=netfilter-devel&m=120060092423718&w=2
[3] http://marc.info/?l=netfilter-devel&m=120060092523724&w=2
[4] http://marc.info/?l=netfilter-devel&m=120060075523444&w=2
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 13:09 ` Jan Engelhardt
@ 2008-01-20 13:17 ` Patrick McHardy
2008-01-20 14:26 ` Bart De Schuymer
0 siblings, 1 reply; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 13:17 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List, bdschuym
Jan Engelhardt wrote:
> On Jan 20 2008 14:02, Patrick McHardy wrote:
>> Jan Engelhardt wrote:
>>> commit a6c73fee39cedc87ef2562f84d5b1f68a315a79b
>>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>>> Date: Thu Jan 17 18:58:05 2008 +0100
>>>
>>> [NETFILTER]: ebtables: expand/remove unneeded macros
>>>
>>> The EBT_*_{MATCH,TARGET,WATCHER} macros are only used within the
>>> accompanying .c source file, so they can be moved to it. And since
>>> they are only used once, we can just as well expand them.
>>>
>>> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
>>
>> Your patches all look fine, but please CC Bart on ebtables patches,
>> I think its impolite to bypass him when he's stated as maintainer.
>>
>>
> Sorry for the inconvenience! Links are:
>
> [1] marc missed that one(!?)
> [2] http://marc.info/?l=netfilter-devel&m=120060092423718&w=2
> [3] http://marc.info/?l=netfilter-devel&m=120060092523724&w=2
> [4] http://marc.info/?l=netfilter-devel&m=120060075523444&w=2
Thanks. Bart, please let me know if you have any objections or
want to add a Signed-off-by: line.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 13:17 ` Patrick McHardy
@ 2008-01-20 14:26 ` Bart De Schuymer
2008-01-20 14:45 ` Patrick McHardy
0 siblings, 1 reply; 21+ messages in thread
From: Bart De Schuymer @ 2008-01-20 14:26 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Jan Engelhardt, Netfilter Developer Mailing List
Op zo, 20-01-2008 te 14:17 +0100, schreef Patrick McHardy:
> Jan Engelhardt wrote:
> > On Jan 20 2008 14:02, Patrick McHardy wrote:
> >> Jan Engelhardt wrote:
> >>> commit a6c73fee39cedc87ef2562f84d5b1f68a315a79b
> >>> Author: Jan Engelhardt <jengelh@computergmbh.de>
> >>> Date: Thu Jan 17 18:58:05 2008 +0100
> >>>
> >>> [NETFILTER]: ebtables: expand/remove unneeded macros
> >>>
> >>> The EBT_*_{MATCH,TARGET,WATCHER} macros are only used within the
> >>> accompanying .c source file, so they can be moved to it. And since
> >>> they are only used once, we can just as well expand them.
> >>>
> >>> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> >>
> >> Your patches all look fine, but please CC Bart on ebtables patches,
> >> I think its impolite to bypass him when he's stated as maintainer.
> >>
> >>
> > Sorry for the inconvenience! Links are:
> >
> > [1] marc missed that one(!?)
> > [2] http://marc.info/?l=netfilter-devel&m=120060092423718&w=2
> > [3] http://marc.info/?l=netfilter-devel&m=120060092523724&w=2
> > [4] http://marc.info/?l=netfilter-devel&m=120060075523444&w=2
>
>
> Thanks. Bart, please let me know if you have any objections or
> want to add a Signed-off-by: line.
Hi, thanks for putting me in CC. If you remove the EBT_*_ macros from
ebtables.h this will break the ebtables userspace compilation. For the
other patches I have no objection except that the MODULE_DESCRIPTION
isn't consistent with using upper case after 'Ebtables: ', but I guess
that's nitpicking :) Anyway, thanks Jan.
Btw, Patrick, I'm sure you've noticed I'm not very active in ebtables
development anymore. It has come to the point that I no longer find
pleasure in investing my spare time and energy in serious ebtables
development: most interesting ebtables things have been done for me. I'm
still around for bugfixing or commenting on patches, though (I tend to
only read things on ebtables-devel and stuff I'm CC'ed in). So if there
would ever arrive an active developer who has some serious ebtables
contributions (like getting access to the xt_ matches) and a long-term
commitment, I'm willing to step down as maintainer ((s)he'd have to take
over the responsibility for the userspace tool too). Anyway, no need to
worry that I'll suddenly abandon my project :) I think for bridge-nf
you're already the true maintainer, though you can always CC me for my
opinion (feel free to update the header of br_netfilter.c).
cheers,
Bart
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 14:26 ` Bart De Schuymer
@ 2008-01-20 14:45 ` Patrick McHardy
2008-01-20 17:34 ` Jan Engelhardt
0 siblings, 1 reply; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 14:45 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Jan Engelhardt, Netfilter Developer Mailing List
Bart De Schuymer wrote:
> Op zo, 20-01-2008 te 14:17 +0100, schreef Patrick McHardy:
>
>> Thanks. Bart, please let me know if you have any objections or
>> want to add a Signed-off-by: line.
>
> Hi, thanks for putting me in CC. If you remove the EBT_*_ macros from
> ebtables.h this will break the ebtables userspace compilation. For the
> other patches I have no objection except that the MODULE_DESCRIPTION
> isn't consistent with using upper case after 'Ebtables: ', but I guess
> that's nitpicking :) Anyway, thanks Jan.
I'll drop the first patch then and apply the others, thanks.
> Btw, Patrick, I'm sure you've noticed I'm not very active in ebtables
> development anymore. It has come to the point that I no longer find
> pleasure in investing my spare time and energy in serious ebtables
> development: most interesting ebtables things have been done for me. I'm
> still around for bugfixing or commenting on patches, though (I tend to
> only read things on ebtables-devel and stuff I'm CC'ed in). So if there
> would ever arrive an active developer who has some serious ebtables
> contributions (like getting access to the xt_ matches) and a long-term
> commitment, I'm willing to step down as maintainer ((s)he'd have to take
> over the responsibility for the userspace tool too). Anyway, no need to
> worry that I'll suddenly abandon my project :) I think for bridge-nf
> you're already the true maintainer, though you can always CC me for my
> opinion (feel free to update the header of br_netfilter.c).
Yes, for br_netfilter.c this makes sense I guess. For ebtables I'm
not sure - I have no problem reviewing and applying kernel patches,
but I'm lacking the time for taking care of userspace as well, at
least for doing it alone. But since ebtables, arptables and iptables
are pretty similar, perhaps it would be possible to merge ebtables
and arptables support with iptables. It would certainly make sense,
but I expect it to be quite a lot of work. Well, anyways, for now
I guess we'll just have to continue as usual :)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts
2008-01-17 20:10 ` [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts Jan Engelhardt
@ 2008-01-20 14:52 ` Patrick McHardy
0 siblings, 0 replies; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 14:52 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> commit cae15d95db223db34c6ac39953061e7aa8ebc7b1
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Thu Jan 17 19:40:51 2008 +0100
>
> [NETFILTER]: ebtables: remove casts, use consts
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Applied, thanks.
> diff --git a/include/net/arp.h b/include/net/arp.h
> index 752eb47..c236270 100644
> --- a/include/net/arp.h
> +++ b/include/net/arp.h
> @@ -13,15 +13,17 @@ extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
> extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
> extern void arp_send(int type, int ptype, __be32 dest_ip,
> struct net_device *dev, __be32 src_ip,
> - unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
> + const unsigned char *dest_hw,
> + const unsigned char *src_hw, const unsigned char *th);
> extern int arp_bind_neighbour(struct dst_entry *dst);
> extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
> extern void arp_ifdown(struct net_device *dev);
This would have been better in a seperate patch though.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
2008-01-17 20:11 ` [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly Jan Engelhardt
@ 2008-01-20 14:52 ` Patrick McHardy
2008-01-20 18:07 ` Jan Engelhardt
2008-01-22 17:02 ` Patrick McHardy
1 sibling, 1 reply; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 14:52 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> commit 110d4caa32e46b7dd78e6b59518e0137fc02a6e4
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Thu Jan 17 20:12:15 2008 +0100
>
> [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
This doesn't apply without the first patch.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions
2008-01-17 20:11 ` [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions Jan Engelhardt
@ 2008-01-20 14:54 ` Patrick McHardy
0 siblings, 0 replies; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 14:54 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> commit 4ad299b1644579e5c9aae025bf81f6aff1cbdc77
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Thu Jan 17 20:12:15 2008 +0100
>
> [NETFILTER]: ebtables: Update modules' descriptions
>
> Update the MODULES_DESCRIPTION() tags for all Ebtables modules.
>
> Reference to previous related commit:
> 3e53176b24b94f660ba61bfab5bcaf5c135bbcf2.
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 14:45 ` Patrick McHardy
@ 2008-01-20 17:34 ` Jan Engelhardt
2008-01-20 18:07 ` Bart De Schuymer
0 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-20 17:34 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Bart De Schuymer, Netfilter Developer Mailing List
On Jan 20 2008 15:45, Patrick McHardy wrote:
> Bart De Schuymer wrote:
>> Op zo, 20-01-2008 te 14:17 +0100, schreef Patrick McHardy:
>>
>> > Thanks. Bart, please let me know if you have any objections or
>> > want to add a Signed-off-by: line.
>>
>> Hi, thanks for putting me in CC. If you remove the EBT_*_ macros from
>> ebtables.h this will break the ebtables userspace compilation.
"Ugh." I do not think ebtables(8) should depend on such macros.
iptables(8) does not do that either.
What good would those macros be for? It is not like the module names
would be changing anyway (one purpose of macros - to reduce the number
of places where you have to change things iff things change).
>> For the
>> other patches I have no objection except that the MODULE_DESCRIPTION
>> isn't consistent with using upper case after 'Ebtables: ', but I guess
>> that's nitpicking :) Anyway, thanks Jan.
It is consistent...
18:17 ichi:~/Coding/linux_nosov > git log -p
4ad299b1644579e5c9aae025bf81f6aff1cbdc77^..4ad299b1644579e5c9aae025bf81f6aff1cbdc77
| grep MODULE_DESC | grep ^+
+MODULE_DESCRIPTION("Ebtables: DSAP/SSAP field and SNAP type matching");
+MODULE_DESCRIPTION("Ebtables: Combined MAC/IP address list matching");
+MODULE_DESCRIPTION("Ebtables: ARP protocol packet match");
+MODULE_DESCRIPTION("Ebtables: ARP reply target");
+MODULE_DESCRIPTION("Ebtables: Destination MAC address translation");
+MODULE_DESCRIPTION("Ebtables: IPv4 protocol packet match");
+MODULE_DESCRIPTION("Ebtables: rate-limit match");
+MODULE_DESCRIPTION("Ebtables: Packet logging to syslog");
+MODULE_DESCRIPTION("Ebtables: packet mark modification");
+MODULE_DESCRIPTION("Ebtables: packet mark match");
+MODULE_DESCRIPTION("Ebtables: link layer packet type match");
+MODULE_DESCRIPTION("Ebtables: Packet redirection to localhost");
+MODULE_DESCRIPTION("Ebtables: Source MAC address translation");
+MODULE_DESCRIPTION("Ebtables: Spanning Tree Protocol packet match");
+MODULE_DESCRIPTION("Ebtables: packet logging to netlink using ULOG");
+MODULE_DESCRIPTION("Ebtables: 802.1Q VLAN tag match");
Did I miss something?
> Yes, for br_netfilter.c this makes sense I guess. For ebtables I'm
> not sure - I have no problem reviewing and applying kernel patches,
> but I'm lacking the time for taking care of userspace as well, at
> least for doing it alone.
/noticing that I do most userspace stuff ATM ;-D
> But since ebtables, arptables and iptables
> are pretty similar, perhaps it would be possible to merge ebtables
> and arptables support with iptables.
Before you attempt that, try merging ip- with ip6tables first.
> It would certainly make sense,
> but I expect it to be quite a lot of work. Well, anyways, for now
> I guess we'll just have to continue as usual :)
>
Continue as usual. Statistically, developers show up every now and
then and over time, enough 'small' patches will have accumulated so
that the merger is just one more 'small' operation away.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 17:34 ` Jan Engelhardt
@ 2008-01-20 18:07 ` Bart De Schuymer
2008-01-20 18:30 ` Jan Engelhardt
0 siblings, 1 reply; 21+ messages in thread
From: Bart De Schuymer @ 2008-01-20 18:07 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Patrick McHardy, Netfilter Developer Mailing List
Op zo, 20-01-2008 te 18:34 +0100, schreef Jan Engelhardt:
> "Ugh." I do not think ebtables(8) should depend on such macros.
> iptables(8) does not do that either.
> What good would those macros be for? It is not like the module names
> would be changing anyway (one purpose of macros - to reduce the number
> of places where you have to change things iff things change).
We are talking about EBT_ENTRY_ITERATE and the like, right?
I didn't see your patch, but even the kernel code uses the ITERATE
macros more than once.
> >> For the
> >> other patches I have no objection except that the MODULE_DESCRIPTION
> >> isn't consistent with using upper case after 'Ebtables: ', but I guess
> >> that's nitpicking :) Anyway, thanks Jan.
>
> It is consistent...
>
> 18:17 ichi:~/Coding/linux_nosov > git log -p
> 4ad299b1644579e5c9aae025bf81f6aff1cbdc77^..4ad299b1644579e5c9aae025bf81f6aff1cbdc77
> | grep MODULE_DESC | grep ^+
>
> +MODULE_DESCRIPTION("Ebtables: DSAP/SSAP field and SNAP type matching");
> +MODULE_DESCRIPTION("Ebtables: Combined MAC/IP address list matching");
> +MODULE_DESCRIPTION("Ebtables: ARP protocol packet match");
> +MODULE_DESCRIPTION("Ebtables: ARP reply target");
> +MODULE_DESCRIPTION("Ebtables: Destination MAC address translation");
> +MODULE_DESCRIPTION("Ebtables: IPv4 protocol packet match");
> +MODULE_DESCRIPTION("Ebtables: rate-limit match");
> +MODULE_DESCRIPTION("Ebtables: Packet logging to syslog");
> +MODULE_DESCRIPTION("Ebtables: packet mark modification");
packet vs Packet, rate vs Packet, ... But this is not worth the
bandwidth at all, I should just shut up :)
> > But since ebtables, arptables and iptables
> > are pretty similar, perhaps it would be possible to merge ebtables
> > and arptables support with iptables.
>
> Before you attempt that, try merging ip- with ip6tables first.
And arptables before ebtables :)
For ebtables it's probably best to drop binary compatibility with older
ebtables userspace binaries, it's gonna be a mess if you don't.
cheers,
Bart
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
2008-01-20 14:52 ` Patrick McHardy
@ 2008-01-20 18:07 ` Jan Engelhardt
2008-01-20 18:21 ` Patrick McHardy
0 siblings, 1 reply; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-20 18:07 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Netfilter Developer Mailing List
On Jan 20 2008 15:52, Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> commit 110d4caa32e46b7dd78e6b59518e0137fc02a6e4
>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>> Date: Thu Jan 17 20:12:15 2008 +0100
>>
>> [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
>
>
> This doesn't apply without the first patch.
>
Please use this one while 1/4 is sorted out..
===
commit 18497df6a7a37ddaf7d2c604246f585c5f247958
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Thu Jan 17 20:12:15 2008 +0100
[NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
Reference to previous related commit:
9f15c5302de4e8b0aac7ca24c36bf26a7fe1a513.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 41a7807..1404b11 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -50,8 +50,7 @@ static int ebt_802_3_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_802_3 =
-{
+static struct ebt_match filter_802_3 __read_mostly = {
.name = EBT_802_3_MATCH,
.match = ebt_filter_802_3,
.check = ebt_802_3_check,
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c
index 6436d30..24c51e0 100644
--- a/net/bridge/netfilter/ebt_among.c
+++ b/net/bridge/netfilter/ebt_among.c
@@ -206,7 +206,7 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_among = {
+static struct ebt_match filter_among __read_mostly = {
.name = EBT_AMONG_MATCH,
.match = ebt_filter_among,
.check = ebt_among_check,
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 1814139..7805e1c 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -113,8 +113,7 @@ static int ebt_arp_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_arp =
-{
+static struct ebt_match filter_arp __read_mostly = {
.name = EBT_ARP_MATCH,
.match = ebt_filter_arp,
.check = ebt_arp_check,
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 48a80e4..d846bdb 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -73,8 +73,7 @@ static int ebt_target_reply_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target reply_target =
-{
+static struct ebt_target reply_target __read_mostly = {
.name = EBT_ARPREPLY_TARGET,
.target = ebt_target_reply,
.check = ebt_target_reply_check,
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index 74262e9..ed25828 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -46,8 +46,7 @@ static int ebt_target_dnat_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target dnat =
-{
+static struct ebt_target dnat __read_mostly = {
.name = EBT_DNAT_TARGET,
.target = ebt_target_dnat,
.check = ebt_target_dnat_check,
diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
index 69f7f0a..223aa4b 100644
--- a/net/bridge/netfilter/ebt_ip.c
+++ b/net/bridge/netfilter/ebt_ip.c
@@ -105,8 +105,7 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_ip =
-{
+static struct ebt_match filter_ip __read_mostly = {
.name = EBT_IP_MATCH,
.match = ebt_filter_ip,
.check = ebt_ip_check,
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index d48fa5c..f6c63a4 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -90,8 +90,7 @@ static int ebt_limit_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match ebt_limit_reg =
-{
+static struct ebt_match ebt_limit_reg __read_mostly = {
.name = EBT_LIMIT_MATCH,
.match = ebt_limit_match,
.check = ebt_limit_check,
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 3be9e98..2d57bba 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -183,7 +183,7 @@ static struct ebt_watcher log =
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_log_logger = {
+static const struct nf_logger ebt_log_logger __read_mostly = {
.name = "ebt_log",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 6cba543..ac6c6da 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -57,8 +57,7 @@ static int ebt_target_mark_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target mark_target =
-{
+static struct ebt_target mark_target __read_mostly = {
.name = EBT_MARK_TARGET,
.target = ebt_target_mark,
.check = ebt_target_mark_check,
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index 6b0d216..9e5413f 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -39,8 +39,7 @@ static int ebt_mark_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_mark =
-{
+static struct ebt_match filter_mark __read_mostly = {
.name = EBT_MARK_MATCH,
.match = ebt_filter_mark,
.check = ebt_mark_check,
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index 4fffd70..6fe9885 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -36,8 +36,7 @@ static int ebt_pkttype_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_pkttype =
-{
+static struct ebt_match filter_pkttype __read_mostly = {
.name = EBT_PKTTYPE_MATCH,
.match = ebt_filter_pkttype,
.check = ebt_pkttype_check,
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index 422cb83..a9a9442 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -51,8 +51,7 @@ static int ebt_target_redirect_check(const char *tablename, unsigned int hookmas
return 0;
}
-static struct ebt_target redirect_target =
-{
+static struct ebt_target redirect_target __read_mostly = {
.name = EBT_REDIRECT_TARGET,
.target = ebt_target_redirect,
.check = ebt_target_redirect_check,
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index 425ac92..1361c83 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -67,8 +67,7 @@ static int ebt_target_snat_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_target snat =
-{
+static struct ebt_target snat __read_mostly = {
.name = EBT_SNAT_TARGET,
.target = ebt_target_snat,
.check = ebt_target_snat_check,
diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 31b7736..3a5d166 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -172,8 +172,7 @@ static int ebt_stp_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_match filter_stp =
-{
+static struct ebt_match filter_stp __read_mostly = {
.name = EBT_STP_MATCH,
.match = ebt_filter_stp,
.check = ebt_stp_check,
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index b73ba28..0d6f5fe 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -272,14 +272,14 @@ static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
return 0;
}
-static struct ebt_watcher ulog = {
+static struct ebt_watcher ulog __read_mostly = {
.name = EBT_ULOG_WATCHER,
.watcher = ebt_ulog,
.check = ebt_ulog_check,
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_ulog_logger = {
+static const struct nf_logger ebt_ulog_logger __read_mostly = {
.name = EBT_ULOG_WATCHER,
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
index 0ddf749..ff44129 100644
--- a/net/bridge/netfilter/ebt_vlan.c
+++ b/net/bridge/netfilter/ebt_vlan.c
@@ -169,7 +169,7 @@ ebt_check_vlan(const char *tablename,
return 0;
}
-static struct ebt_match filter_vlan = {
+static struct ebt_match filter_vlan __read_mostly = {
.name = EBT_VLAN_MATCH,
.match = ebt_filter_vlan,
.check = ebt_check_vlan,
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
2008-01-20 18:07 ` Jan Engelhardt
@ 2008-01-20 18:21 ` Patrick McHardy
0 siblings, 0 replies; 21+ messages in thread
From: Patrick McHardy @ 2008-01-20 18:21 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> On Jan 20 2008 15:52, Patrick McHardy wrote:
>> Jan Engelhardt wrote:
>>> commit 110d4caa32e46b7dd78e6b59518e0137fc02a6e4
>>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>>> Date: Thu Jan 17 20:12:15 2008 +0100
>>>
>>> [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
>>
>> This doesn't apply without the first patch.
>>
>
> Please use this one while 1/4 is sorted out..
Applied, thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 18:07 ` Bart De Schuymer
@ 2008-01-20 18:30 ` Jan Engelhardt
2008-01-20 18:57 ` Bart De Schuymer
2008-01-24 8:05 ` Patrick McHardy
0 siblings, 2 replies; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-20 18:30 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Patrick McHardy, Netfilter Developer Mailing List
On Jan 20 2008 19:07, Bart De Schuymer wrote:
>Op zo, 20-01-2008 te 18:34 +0100, schreef Jan Engelhardt:
>> "Ugh." I do not think ebtables(8) should depend on such macros.
>> iptables(8) does not do that either.
>> What good would those macros be for? It is not like the module names
>> would be changing anyway (one purpose of macros - to reduce the number
>> of places where you have to change things iff things change).
>
>We are talking about EBT_ENTRY_ITERATE and the like, right?
>I didn't see your patch, but even the kernel code uses the ITERATE
>macros more than once.
>
No, just the name macros:
(shortened)
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h
index a11b0c2..11421ca 100644
--- a/include/linux/netfilter_bridge/ebt_802_3.h
+++ b/include/linux/netfilter_bridge/ebt_802_3.h
@@ -4,8 +4,6 @@
#define EBT_802_3_SAP 0x01
#define EBT_802_3_TYPE 0x02
-#define EBT_802_3_MATCH "802_3"
-
/*
* If frame has DSAP/SSAP value 0xaa you must check the SNAP type
* to discover what kind of packet we're carrying.
diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
index 41a7807..2e8d994 100644
--- a/net/bridge/netfilter/ebt_802_3.c
+++ b/net/bridge/netfilter/ebt_802_3.c
@@ -52,7 +52,7 @@ static int ebt_802_3_check(const char *tablename, unsigned int hookmask,
static struct ebt_match filter_802_3 =
{
- .name = EBT_802_3_MATCH,
+ .name = "802_3",
.match = ebt_filter_802_3,
.check = ebt_802_3_check,
.me = THIS_MODULE,
>> >> For the
>> >> other patches I have no objection except that the MODULE_DESCRIPTION
>> >> isn't consistent with using upper case after 'Ebtables: ', but I guess
>> >> that's nitpicking :) Anyway, thanks Jan.
>>
>> It is consistent...
>>
>> 18:17 ichi:~/Coding/linux_nosov > git log -p
>> 4ad299b1644579e5c9aae025bf81f6aff1cbdc77^..4ad299b1644579e5c9aae025bf81f6aff1cbdc77
>> | grep MODULE_DESC | grep ^+
>>
>> +MODULE_DESCRIPTION("Ebtables: DSAP/SSAP field and SNAP type matching");
>> +MODULE_DESCRIPTION("Ebtables: Combined MAC/IP address list matching");
>> +MODULE_DESCRIPTION("Ebtables: ARP protocol packet match");
>> +MODULE_DESCRIPTION("Ebtables: ARP reply target");
>> +MODULE_DESCRIPTION("Ebtables: Destination MAC address translation");
>> +MODULE_DESCRIPTION("Ebtables: IPv4 protocol packet match");
>> +MODULE_DESCRIPTION("Ebtables: rate-limit match");
>> +MODULE_DESCRIPTION("Ebtables: Packet logging to syslog");
>> +MODULE_DESCRIPTION("Ebtables: packet mark modification");
>
>packet vs Packet, rate vs Packet, ... But this is not worth the
>bandwidth at all, I should just shut up :)
I need to pay more attention. I was kinda missing out on "after
Ebtables".
Well, here you go.
===
commit 22f2242ce892107edb3900a39a626a41c1d95ba7
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Sun Jan 20 19:29:09 2008 +0100
[NETFILTER]: Update modules' descriptions
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c
index 9e1ce0e..8cbdc01 100644
--- a/net/bridge/netfilter/ebt_limit.c
+++ b/net/bridge/netfilter/ebt_limit.c
@@ -109,5 +109,5 @@ static void __exit ebt_limit_fini(void)
module_init(ebt_limit_init);
module_exit(ebt_limit_fini);
-MODULE_DESCRIPTION("Ebtables: rate-limit match");
+MODULE_DESCRIPTION("Ebtables: Rate-limit match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 3ce077f..36723f4 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -76,5 +76,5 @@ static void __exit ebt_mark_fini(void)
module_init(ebt_mark_init);
module_exit(ebt_mark_fini);
-MODULE_DESCRIPTION("Ebtables: packet mark modification");
+MODULE_DESCRIPTION("Ebtables: Packet mark modification");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_mark_m.c b/net/bridge/netfilter/ebt_mark_m.c
index a47e0d6..9b0a454 100644
--- a/net/bridge/netfilter/ebt_mark_m.c
+++ b/net/bridge/netfilter/ebt_mark_m.c
@@ -58,5 +58,5 @@ static void __exit ebt_mark_m_fini(void)
module_init(ebt_mark_m_init);
module_exit(ebt_mark_m_fini);
-MODULE_DESCRIPTION("Ebtables: packet mark match");
+MODULE_DESCRIPTION("Ebtables: Packet mark match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_pkttype.c b/net/bridge/netfilter/ebt_pkttype.c
index 6d8a730..676db32 100644
--- a/net/bridge/netfilter/ebt_pkttype.c
+++ b/net/bridge/netfilter/ebt_pkttype.c
@@ -55,5 +55,5 @@ static void __exit ebt_pkttype_fini(void)
module_init(ebt_pkttype_init);
module_exit(ebt_pkttype_fini);
-MODULE_DESCRIPTION("Ebtables: link layer packet type match");
+MODULE_DESCRIPTION("Ebtables: Link layer packet type match");
MODULE_LICENSE("GPL");
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 0a0a56d..01327f0 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -340,4 +340,4 @@ module_init(ebt_ulog_init);
module_exit(ebt_ulog_fini);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
-MODULE_DESCRIPTION("Ebtables: packet logging to netlink using ULOG");
+MODULE_DESCRIPTION("Ebtables: Packet logging to netlink using ULOG");
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index d80fee8..984ea81 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -25,7 +25,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
-MODULE_DESCRIPTION("Xtables: automatic-address SNAT");
+MODULE_DESCRIPTION("Xtables: Automatic-address SNAT");
/* Lock protects masq region inside conntrack */
static DEFINE_RWLOCK(masq_lock);
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 22606e2..2171e78 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -29,7 +29,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
-MODULE_DESCRIPTION("Xtables: packet \"rejection\" target for IPv4");
+MODULE_DESCRIPTION("Xtables: Packet \"rejection\" target for IPv4");
/* Send RST reply */
static void send_reset(struct sk_buff *oldskb, int hook)
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index fa24efa..d03a1a3 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -50,7 +50,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
-MODULE_DESCRIPTION("Xtables: packet logging to netlink using ULOG");
+MODULE_DESCRIPTION("Xtables: Packet logging to netlink using ULOG");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_NFLOG);
#define ULOG_NL_EVENT 111 /* Harald's favorite number */
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c
index 49587a4..e84402c 100644
--- a/net/ipv4/netfilter/ipt_addrtype.c
+++ b/net/ipv4/netfilter/ipt_addrtype.c
@@ -21,7 +21,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
-MODULE_DESCRIPTION("Xtables: address type match for IPv4");
+MODULE_DESCRIPTION("Xtables: Address type match for IPv4");
static inline bool match_type(const struct net_device *dev, __be32 addr,
u_int16_t mask)
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index b23baa6..b4b77df 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -31,7 +31,7 @@
#include <linux/netfilter_ipv6/ip6t_REJECT.h>
MODULE_AUTHOR("Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>");
-MODULE_DESCRIPTION("Xtables: packet \"rejection\" target for IPv6");
+MODULE_DESCRIPTION("Xtables: Packet \"rejection\" target for IPv6");
MODULE_LICENSE("GPL");
/* Send RST reply */
diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c
index 5fecfb4..aa4491c 100644
--- a/net/netfilter/xt_CONNMARK.c
+++ b/net/netfilter/xt_CONNMARK.c
@@ -26,7 +26,7 @@
#include <net/checksum.h>
MODULE_AUTHOR("Henrik Nordstrom <hno@marasystems.com>");
-MODULE_DESCRIPTION("Xtables: connection mark modification");
+MODULE_DESCRIPTION("Xtables: Connection mark modification");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_CONNMARK");
MODULE_ALIAS("ip6t_CONNMARK");
diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c
index 1faa913..045a9ed 100644
--- a/net/netfilter/xt_CONNSECMARK.c
+++ b/net/netfilter/xt_CONNSECMARK.c
@@ -26,7 +26,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("James Morris <jmorris@redhat.com>");
-MODULE_DESCRIPTION("Xtables: target for copying between connection and security mark");
+MODULE_DESCRIPTION("Xtables: Target for copying between connection and security mark");
MODULE_ALIAS("ipt_CONNSECMARK");
MODULE_ALIAS("ip6t_CONNSECMARK");
diff --git a/net/netfilter/xt_MARK.c b/net/netfilter/xt_MARK.c
index f9ce20b..5cac532 100644
--- a/net/netfilter/xt_MARK.c
+++ b/net/netfilter/xt_MARK.c
@@ -20,7 +20,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>");
-MODULE_DESCRIPTION("Xtables: packet mark modification");
+MODULE_DESCRIPTION("Xtables: Packet mark modification");
MODULE_ALIAS("ipt_MARK");
MODULE_ALIAS("ip6t_MARK");
diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c
index 19ae8ef..00d4911 100644
--- a/net/netfilter/xt_NFLOG.c
+++ b/net/netfilter/xt_NFLOG.c
@@ -15,7 +15,7 @@
#include <net/netfilter/nf_log.h>
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
-MODULE_DESCRIPTION("Xtables: packet logging to netlink using NFLOG");
+MODULE_DESCRIPTION("Xtables: Packet logging to netlink using NFLOG");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_NFLOG");
MODULE_ALIAS("ip6t_NFLOG");
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
index beb24d1..c3da3d2 100644
--- a/net/netfilter/xt_NFQUEUE.c
+++ b/net/netfilter/xt_NFQUEUE.c
@@ -17,7 +17,7 @@
#include <linux/netfilter/xt_NFQUEUE.h>
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
-MODULE_DESCRIPTION("Xtables: packet forwarding to netlink");
+MODULE_DESCRIPTION("Xtables: Packet forwarding to netlink");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_NFQUEUE");
MODULE_ALIAS("ip6t_NFQUEUE");
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c
index c5ba525..b6ca699 100644
--- a/net/netfilter/xt_RATEEST.c
+++ b/net/netfilter/xt_RATEEST.c
@@ -197,7 +197,7 @@ static void __exit xt_rateest_tg_fini(void)
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Xtables: packet rate estimator");
+MODULE_DESCRIPTION("Xtables: Packet rate estimator");
MODULE_ALIAS("ipt_RATEEST");
MODULE_ALIAS("ip6t_RATEEST");
module_init(xt_rateest_tg_init);
diff --git a/net/netfilter/xt_SECMARK.c b/net/netfilter/xt_SECMARK.c
index b11b3ec..e3abc75 100644
--- a/net/netfilter/xt_SECMARK.c
+++ b/net/netfilter/xt_SECMARK.c
@@ -20,7 +20,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("James Morris <jmorris@redhat.com>");
-MODULE_DESCRIPTION("Xtables: packet security mark modification");
+MODULE_DESCRIPTION("Xtables: Packet security mark modification");
MODULE_ALIAS("ipt_SECMARK");
MODULE_ALIAS("ip6t_SECMARK");
diff --git a/net/netfilter/xt_TRACE.c b/net/netfilter/xt_TRACE.c
index 30dab79..336a55e 100644
--- a/net/netfilter/xt_TRACE.c
+++ b/net/netfilter/xt_TRACE.c
@@ -5,7 +5,7 @@
#include <linux/netfilter/x_tables.h>
-MODULE_DESCRIPTION("Xtables: packet flow tracing");
+MODULE_DESCRIPTION("Xtables: Packet flow tracing");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_TRACE");
MODULE_ALIAS("ip6t_TRACE");
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c
index aaa1b96..dcb315b 100644
--- a/net/netfilter/xt_connmark.c
+++ b/net/netfilter/xt_connmark.c
@@ -28,7 +28,7 @@
#include <linux/netfilter/xt_connmark.h>
MODULE_AUTHOR("Henrik Nordstrom <hno@marasystems.com>");
-MODULE_DESCRIPTION("Xtables: connection mark match");
+MODULE_DESCRIPTION("Xtables: Connection mark match");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_connmark");
MODULE_ALIAS("ip6t_connmark");
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c
index 851cba6..51670b1 100644
--- a/net/netfilter/xt_conntrack.c
+++ b/net/netfilter/xt_conntrack.c
@@ -20,7 +20,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>");
-MODULE_DESCRIPTION("Xtables: connection tracking state match");
+MODULE_DESCRIPTION("Xtables: Connection tracking state match");
MODULE_ALIAS("ipt_conntrack");
MODULE_ALIAS("ip6t_conntrack");
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index d479ca9..9dd1073 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -35,7 +35,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
-MODULE_DESCRIPTION("Xtables: per hash-bucket rate-limit match");
+MODULE_DESCRIPTION("Xtables: Per-hashbucket rate-limit match");
MODULE_ALIAS("ipt_hashlimit");
MODULE_ALIAS("ip6t_hashlimit");
diff --git a/net/netfilter/xt_iprange.c b/net/netfilter/xt_iprange.c
index dbea0e0..6ca90e0 100644
--- a/net/netfilter/xt_iprange.c
+++ b/net/netfilter/xt_iprange.c
@@ -177,4 +177,4 @@ module_init(iprange_mt_init);
module_exit(iprange_mt_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>, Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("Xtables: arbitrary IPv4 range matching");
+MODULE_DESCRIPTION("Xtables: Arbitrary IPv4 range matching");
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c
index aad9ab8..4f2987f 100644
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -16,7 +16,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Herve Eychenne <rv@wallfire.org>");
-MODULE_DESCRIPTION("Xtables: rate-limit match");
+MODULE_DESCRIPTION("Xtables: Rate-limit match");
MODULE_ALIAS("ipt_limit");
MODULE_ALIAS("ip6t_limit");
diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c
index 9f78f61..746079a 100644
--- a/net/netfilter/xt_mark.c
+++ b/net/netfilter/xt_mark.c
@@ -18,7 +18,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>");
-MODULE_DESCRIPTION("Xtables: packet mark match");
+MODULE_DESCRIPTION("Xtables: Packet mark match");
MODULE_ALIAS("ipt_mark");
MODULE_ALIAS("ip6t_mark");
diff --git a/net/netfilter/xt_multiport.c b/net/netfilter/xt_multiport.c
index 31daa81..b4ba955 100644
--- a/net/netfilter/xt_multiport.c
+++ b/net/netfilter/xt_multiport.c
@@ -22,7 +22,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
-MODULE_DESCRIPTION("Xtables: multiple port matching for TCP, UDP, UDP-Lite, SCTP and DCCP");
+MODULE_DESCRIPTION("Xtables: Multiple port matching for TCP, UDP, UDP-Lite, SCTP and DCCP");
MODULE_ALIAS("ipt_multiport");
MODULE_ALIAS("ip6t_multiport");
diff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c
index d382f9c..fea7eed 100644
--- a/net/netfilter/xt_owner.c
+++ b/net/netfilter/xt_owner.c
@@ -205,7 +205,7 @@ static void __exit owner_mt_exit(void)
module_init(owner_mt_init);
module_exit(owner_mt_exit);
MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("Xtables: socket owner matching");
+MODULE_DESCRIPTION("Xtables: Socket owner matching");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_owner");
MODULE_ALIAS("ip6t_owner");
diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c
index 7936f7e..7f3adfe 100644
--- a/net/netfilter/xt_pkttype.c
+++ b/net/netfilter/xt_pkttype.c
@@ -18,7 +18,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Michal Ludvig <michal@logix.cz>");
-MODULE_DESCRIPTION("Xtables: link layer packet type match");
+MODULE_DESCRIPTION("Xtables: Link layer packet type match");
MODULE_ALIAS("ipt_pkttype");
MODULE_ALIAS("ip6t_pkttype");
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index 3b021d0..333ce9c 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -11,7 +11,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sam Johnston <samj@samj.net>");
-MODULE_DESCRIPTION("Xtables: countdown quota match");
+MODULE_DESCRIPTION("Xtables: Countdown quota match");
MODULE_ALIAS("ipt_quota");
MODULE_ALIAS("ip6t_quota");
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c
index 4313308..5db4334 100644
--- a/net/netfilter/xt_statistic.c
+++ b/net/netfilter/xt_statistic.c
@@ -18,7 +18,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
-MODULE_DESCRIPTION("Xtables: statistics-based matching (\"Nth\", random)");
+MODULE_DESCRIPTION("Xtables: Statistics-based matching (\"Nth\", random)");
MODULE_ALIAS("ipt_statistic");
MODULE_ALIAS("ip6t_statistic");
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c
index 72f694d..aaff1bf 100644
--- a/net/netfilter/xt_string.c
+++ b/net/netfilter/xt_string.c
@@ -16,7 +16,7 @@
#include <linux/textsearch.h>
MODULE_AUTHOR("Pablo Neira Ayuso <pablo@eurodev.net>");
-MODULE_DESCRIPTION("Xtables: string-based matching");
+MODULE_DESCRIPTION("Xtables: String-based matching");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_string");
MODULE_ALIAS("ip6t_string");
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index e9a8794..fcba9bc 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -264,7 +264,7 @@ static void __exit time_mt_exit(void)
module_init(time_mt_init);
module_exit(time_mt_exit);
MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("Xtables: time-based matching");
+MODULE_DESCRIPTION("Xtables: Time-based matching");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_time");
MODULE_ALIAS("ip6t_time");
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index 9b8ed39..6acf9e0 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -130,7 +130,7 @@ static void __exit u32_mt_exit(void)
module_init(u32_mt_init);
module_exit(u32_mt_exit);
MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("Xtables: arbitrary byte matching");
+MODULE_DESCRIPTION("Xtables: Arbitrary byte matching");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_u32");
MODULE_ALIAS("ip6t_u32");
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 18:30 ` Jan Engelhardt
@ 2008-01-20 18:57 ` Bart De Schuymer
2008-01-20 19:03 ` Jan Engelhardt
2008-01-24 8:05 ` Patrick McHardy
1 sibling, 1 reply; 21+ messages in thread
From: Bart De Schuymer @ 2008-01-20 18:57 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Patrick McHardy, Netfilter Developer Mailing List
Op zo, 20-01-2008 te 19:30 +0100, schreef Jan Engelhardt:
> On Jan 20 2008 19:07, Bart De Schuymer wrote:
> >Op zo, 20-01-2008 te 18:34 +0100, schreef Jan Engelhardt:
> >> "Ugh." I do not think ebtables(8) should depend on such macros.
> >> iptables(8) does not do that either.
> >> What good would those macros be for? It is not like the module names
> >> would be changing anyway (one purpose of macros - to reduce the number
> >> of places where you have to change things iff things change).
> >
> >We are talking about EBT_ENTRY_ITERATE and the like, right?
> >I didn't see your patch, but even the kernel code uses the ITERATE
> >macros more than once.
> >
> No, just the name macros:
I see, well they are used in the userspace tool. The point is not that
the value can change, the point is that the value is part of the
interface between userspace and kernel and it prevents using "magical
strings" (as in magical numbers): information that a programmer cannot
know by just looking at the header files (the interface). Of course this
is completely academic, but my taste made me make that choice.
> >packet vs Packet, rate vs Packet, ... But this is not worth the
> >bandwidth at all, I should just shut up :)
>
> I need to pay more attention. I was kinda missing out on "after
> Ebtables".
>
> Well, here you go.
Thanks,
Bart
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 18:57 ` Bart De Schuymer
@ 2008-01-20 19:03 ` Jan Engelhardt
0 siblings, 0 replies; 21+ messages in thread
From: Jan Engelhardt @ 2008-01-20 19:03 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Patrick McHardy, Netfilter Developer Mailing List
On Jan 20 2008 19:57, Bart De Schuymer wrote:
>
>I see, well they are used in the userspace tool. The point is not that
>the value can change, the point is that the value is part of the
>interface between userspace and kernel and it prevents using "magical
>strings" (as in magical numbers): information that a programmer cannot
>know by just looking at the header files (the interface). Of course this
>is completely academic, but my taste made me make that choice.
>
May I reverse your academic stance with a bunch of patches? :)
>> >packet vs Packet, rate vs Packet, ... But this is not worth the
>> >bandwidth at all, I should just shut up :)
>>
>> I need to pay more attention. I was kinda missing out on "after
>> Ebtables".
>>
>> Well, here you go.
>
>Thanks,
>Bart
Contains both net/{ipv4/netfilter,ipv6/netfilter,netfilter} and ebtables
bits, so well, just merge.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
2008-01-17 20:11 ` [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly Jan Engelhardt
2008-01-20 14:52 ` Patrick McHardy
@ 2008-01-22 17:02 ` Patrick McHardy
1 sibling, 0 replies; 21+ messages in thread
From: Patrick McHardy @ 2008-01-22 17:02 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> commit 110d4caa32e46b7dd78e6b59518e0137fc02a6e4
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Thu Jan 17 20:12:15 2008 +0100
>
> [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly
>
> +static const struct nf_logger ebt_ulog_logger __read_mostly = {
This breaks compilation. I've removed this and the similar ebt_log
change. Just for the future: const and __read_mostly don't mix.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros
2008-01-20 18:30 ` Jan Engelhardt
2008-01-20 18:57 ` Bart De Schuymer
@ 2008-01-24 8:05 ` Patrick McHardy
1 sibling, 0 replies; 21+ messages in thread
From: Patrick McHardy @ 2008-01-24 8:05 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Bart De Schuymer, Netfilter Developer Mailing List
Jan Engelhardt wrote:
> On Jan 20 2008 19:07, Bart De Schuymer wrote:
>> Op zo, 20-01-2008 te 18:34 +0100, schreef Jan Engelhardt:
>>> "Ugh." I do not think ebtables(8) should depend on such macros.
>>> iptables(8) does not do that either.
>>> What good would those macros be for? It is not like the module names
>>> would be changing anyway (one purpose of macros - to reduce the number
>>> of places where you have to change things iff things change).
>> We are talking about EBT_ENTRY_ITERATE and the like, right?
>> I didn't see your patch, but even the kernel code uses the ITERATE
>> macros more than once.
>>
> No, just the name macros:
>
>
> (shortened)
> diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h
> index a11b0c2..11421ca 100644
> --- a/include/linux/netfilter_bridge/ebt_802_3.h
> +++ b/include/linux/netfilter_bridge/ebt_802_3.h
> @@ -4,8 +4,6 @@
> #define EBT_802_3_SAP 0x01
> #define EBT_802_3_TYPE 0x02
>
> -#define EBT_802_3_MATCH "802_3"
I've folded the ebtables MODULES_DESCRIPTION part without
this change and the {ip,ip6,x}_tables parts into your
first patch to update the descriptions. Frankly, I don't
care much about packet vs. Packet, but if you want to
change the other descriptions again, please send that
part seperately.
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2008-01-24 8:06 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 20:10 [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Jan Engelhardt
2008-01-17 20:10 ` [PATCH 2/4] [NETFILTER]: ebtables: remove casts, use consts Jan Engelhardt
2008-01-20 14:52 ` Patrick McHardy
2008-01-17 20:11 ` [PATCH 3/4] [NETFILTER]: ebtables: mark matches, targets and watchers __read_mostly Jan Engelhardt
2008-01-20 14:52 ` Patrick McHardy
2008-01-20 18:07 ` Jan Engelhardt
2008-01-20 18:21 ` Patrick McHardy
2008-01-22 17:02 ` Patrick McHardy
2008-01-17 20:11 ` [PATCH 4/4] [NETFILTER]: ebtables: Update modules' descriptions Jan Engelhardt
2008-01-20 14:54 ` Patrick McHardy
2008-01-20 13:02 ` [PATCH 1/4] [NETFILTER]: ebtables: expand/remove unneeded macros Patrick McHardy
2008-01-20 13:09 ` Jan Engelhardt
2008-01-20 13:17 ` Patrick McHardy
2008-01-20 14:26 ` Bart De Schuymer
2008-01-20 14:45 ` Patrick McHardy
2008-01-20 17:34 ` Jan Engelhardt
2008-01-20 18:07 ` Bart De Schuymer
2008-01-20 18:30 ` Jan Engelhardt
2008-01-20 18:57 ` Bart De Schuymer
2008-01-20 19:03 ` Jan Engelhardt
2008-01-24 8:05 ` Patrick McHardy
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).