aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-04-06 17:18:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-04-10 01:25:40 -0400
commitbce8032ef3cc58170ab3550e9e271dba7b4c4764 (patch)
tree13dbdf12a6c567c3292daad4604eb55f7abd167e /net/ipv4
parenta0aed49bdb2bbb4234789f241cffb607fd2e213d (diff)
[NETFILTER]: Introduce infrastructure for address family specific operations
Change the queue rerouter intrastructure to a generic usable infrastructure for address family specific operations as a base for some cleanups. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index b5ad9ac2fbcc..b25339c11ea0 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -133,7 +133,7 @@ struct ip_rt_info {
133 u_int8_t tos; 133 u_int8_t tos;
134}; 134};
135 135
136static void queue_save(const struct sk_buff *skb, struct nf_info *info) 136static void nf_ip_saveroute(const struct sk_buff *skb, struct nf_info *info)
137{ 137{
138 struct ip_rt_info *rt_info = nf_info_reroute(info); 138 struct ip_rt_info *rt_info = nf_info_reroute(info);
139 139
@@ -146,7 +146,7 @@ static void queue_save(const struct sk_buff *skb, struct nf_info *info)
146 } 146 }
147} 147}
148 148
149static int queue_reroute(struct sk_buff **pskb, const struct nf_info *info) 149static int nf_ip_reroute(struct sk_buff **pskb, const struct nf_info *info)
150{ 150{
151 const struct ip_rt_info *rt_info = nf_info_reroute(info); 151 const struct ip_rt_info *rt_info = nf_info_reroute(info);
152 152
@@ -161,20 +161,21 @@ static int queue_reroute(struct sk_buff **pskb, const struct nf_info *info)
161 return 0; 161 return 0;
162} 162}
163 163
164static struct nf_queue_rerouter ip_reroute = { 164static struct nf_afinfo nf_ip_afinfo = {
165 .rer_size = sizeof(struct ip_rt_info), 165 .family = AF_INET,
166 .save = queue_save, 166 .saveroute = nf_ip_saveroute,
167 .reroute = queue_reroute, 167 .reroute = nf_ip_reroute,
168 .route_key_size = sizeof(struct ip_rt_info),
168}; 169};
169 170
170static int ipv4_netfilter_init(void) 171static int ipv4_netfilter_init(void)
171{ 172{
172 return nf_register_queue_rerouter(PF_INET, &ip_reroute); 173 return nf_register_afinfo(&nf_ip_afinfo);
173} 174}
174 175
175static void ipv4_netfilter_fini(void) 176static void ipv4_netfilter_fini(void)
176{ 177{
177 nf_unregister_queue_rerouter(PF_INET); 178 nf_unregister_afinfo(&nf_ip_afinfo);
178} 179}
179 180
180module_init(ipv4_netfilter_init); 181module_init(ipv4_netfilter_init);