aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
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/ipv6
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/ipv6')
-rw-r--r--net/ipv6/netfilter.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index d750cfc019dc..f514a0113b9f 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -54,7 +54,7 @@ struct ip6_rt_info {
54 struct in6_addr saddr; 54 struct in6_addr saddr;
55}; 55};
56 56
57static void save(const struct sk_buff *skb, struct nf_info *info) 57static void nf_ip6_saveroute(const struct sk_buff *skb, struct nf_info *info)
58{ 58{
59 struct ip6_rt_info *rt_info = nf_info_reroute(info); 59 struct ip6_rt_info *rt_info = nf_info_reroute(info);
60 60
@@ -66,7 +66,7 @@ static void save(const struct sk_buff *skb, struct nf_info *info)
66 } 66 }
67} 67}
68 68
69static int reroute(struct sk_buff **pskb, const struct nf_info *info) 69static int nf_ip6_reroute(struct sk_buff **pskb, const struct nf_info *info)
70{ 70{
71 struct ip6_rt_info *rt_info = nf_info_reroute(info); 71 struct ip6_rt_info *rt_info = nf_info_reroute(info);
72 72
@@ -79,15 +79,16 @@ static int reroute(struct sk_buff **pskb, const struct nf_info *info)
79 return 0; 79 return 0;
80} 80}
81 81
82static struct nf_queue_rerouter ip6_reroute = { 82static struct nf_afinfo nf_ip6_afinfo = {
83 .rer_size = sizeof(struct ip6_rt_info), 83 .family = AF_INET6,
84 .save = &save, 84 .saveroute = nf_ip6_saveroute,
85 .reroute = &reroute, 85 .reroute = nf_ip6_reroute,
86 .route_key_size = sizeof(struct ip6_rt_info),
86}; 87};
87 88
88int __init ipv6_netfilter_init(void) 89int __init ipv6_netfilter_init(void)
89{ 90{
90 return nf_register_queue_rerouter(PF_INET6, &ip6_reroute); 91 return nf_register_afinfo(&nf_ip6_afinfo);
91} 92}
92 93
93/* This can be called from inet6_init() on errors, so it cannot 94/* This can be called from inet6_init() on errors, so it cannot
@@ -95,5 +96,5 @@ int __init ipv6_netfilter_init(void)
95 */ 96 */
96void ipv6_netfilter_fini(void) 97void ipv6_netfilter_fini(void)
97{ 98{
98 nf_unregister_queue_rerouter(PF_INET6); 99 nf_unregister_afinfo(&nf_ip6_afinfo);
99} 100}