diff options
author | Patrick McHardy <kaber@trash.net> | 2007-12-18 01:42:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:59:05 -0500 |
commit | 1e796fda00f06bac584f0e4ad8750ab9430d79d3 (patch) | |
tree | c397d3c84060a0a3dcc83f4bdbb3a470cfd8db06 /net | |
parent | 90a9ba8dd90bcffe279d3272545bccba6dcc8d7c (diff) |
[NETFILTER]: constify nf_afinfo
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter.c | 2 | ||||
-rw-r--r-- | net/netfilter/core.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_h323_main.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_queue.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index 7bf5e4a199f0..4011f8f987c0 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c | |||
@@ -190,7 +190,7 @@ static int nf_ip_route(struct dst_entry **dst, struct flowi *fl) | |||
190 | return ip_route_output_key((struct rtable **)dst, fl); | 190 | return ip_route_output_key((struct rtable **)dst, fl); |
191 | } | 191 | } |
192 | 192 | ||
193 | static struct nf_afinfo nf_ip_afinfo = { | 193 | static const struct nf_afinfo nf_ip_afinfo = { |
194 | .family = AF_INET, | 194 | .family = AF_INET, |
195 | .checksum = nf_ip_checksum, | 195 | .checksum = nf_ip_checksum, |
196 | .route = nf_ip_route, | 196 | .route = nf_ip_route, |
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 945e6ae19569..2e06724dc348 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
@@ -124,7 +124,7 @@ __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | |||
124 | 124 | ||
125 | EXPORT_SYMBOL(nf_ip6_checksum); | 125 | EXPORT_SYMBOL(nf_ip6_checksum); |
126 | 126 | ||
127 | static struct nf_afinfo nf_ip6_afinfo = { | 127 | static const struct nf_afinfo nf_ip6_afinfo = { |
128 | .family = AF_INET6, | 128 | .family = AF_INET6, |
129 | .checksum = nf_ip6_checksum, | 129 | .checksum = nf_ip6_checksum, |
130 | .route = nf_ip6_route, | 130 | .route = nf_ip6_route, |
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 95e18635ce7a..e0263445484a 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -26,10 +26,10 @@ | |||
26 | 26 | ||
27 | static DEFINE_MUTEX(afinfo_mutex); | 27 | static DEFINE_MUTEX(afinfo_mutex); |
28 | 28 | ||
29 | struct nf_afinfo *nf_afinfo[NPROTO] __read_mostly; | 29 | const struct nf_afinfo *nf_afinfo[NPROTO] __read_mostly; |
30 | EXPORT_SYMBOL(nf_afinfo); | 30 | EXPORT_SYMBOL(nf_afinfo); |
31 | 31 | ||
32 | int nf_register_afinfo(struct nf_afinfo *afinfo) | 32 | int nf_register_afinfo(const struct nf_afinfo *afinfo) |
33 | { | 33 | { |
34 | int err; | 34 | int err; |
35 | 35 | ||
@@ -42,7 +42,7 @@ int nf_register_afinfo(struct nf_afinfo *afinfo) | |||
42 | } | 42 | } |
43 | EXPORT_SYMBOL_GPL(nf_register_afinfo); | 43 | EXPORT_SYMBOL_GPL(nf_register_afinfo); |
44 | 44 | ||
45 | void nf_unregister_afinfo(struct nf_afinfo *afinfo) | 45 | void nf_unregister_afinfo(const struct nf_afinfo *afinfo) |
46 | { | 46 | { |
47 | mutex_lock(&afinfo_mutex); | 47 | mutex_lock(&afinfo_mutex); |
48 | rcu_assign_pointer(nf_afinfo[afinfo->family], NULL); | 48 | rcu_assign_pointer(nf_afinfo[afinfo->family], NULL); |
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c index c550257b5462..b636ca60a770 100644 --- a/net/netfilter/nf_conntrack_h323_main.c +++ b/net/netfilter/nf_conntrack_h323_main.c | |||
@@ -708,7 +708,7 @@ static int callforward_do_filter(union nf_conntrack_address *src, | |||
708 | union nf_conntrack_address *dst, | 708 | union nf_conntrack_address *dst, |
709 | int family) | 709 | int family) |
710 | { | 710 | { |
711 | struct nf_afinfo *afinfo; | 711 | const struct nf_afinfo *afinfo; |
712 | struct flowi fl1, fl2; | 712 | struct flowi fl1, fl2; |
713 | int ret = 0; | 713 | int ret = 0; |
714 | 714 | ||
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 77965114b091..bfc2928c1912 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -119,7 +119,7 @@ static int __nf_queue(struct sk_buff *skb, | |||
119 | struct net_device *physindev; | 119 | struct net_device *physindev; |
120 | struct net_device *physoutdev; | 120 | struct net_device *physoutdev; |
121 | #endif | 121 | #endif |
122 | struct nf_afinfo *afinfo; | 122 | const struct nf_afinfo *afinfo; |
123 | const struct nf_queue_handler *qh; | 123 | const struct nf_queue_handler *qh; |
124 | 124 | ||
125 | /* QUEUE == DROP if noone is waiting, to be safe. */ | 125 | /* QUEUE == DROP if noone is waiting, to be safe. */ |
@@ -233,7 +233,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict) | |||
233 | { | 233 | { |
234 | struct sk_buff *skb = entry->skb; | 234 | struct sk_buff *skb = entry->skb; |
235 | struct list_head *elem = &entry->elem->list; | 235 | struct list_head *elem = &entry->elem->list; |
236 | struct nf_afinfo *afinfo; | 236 | const struct nf_afinfo *afinfo; |
237 | 237 | ||
238 | rcu_read_lock(); | 238 | rcu_read_lock(); |
239 | 239 | ||