diff options
-rw-r--r-- | include/linux/netfilter.h | 10 | ||||
-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 |
6 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index bd4a2dd54233..0947424d01d6 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -226,8 +226,8 @@ struct nf_afinfo { | |||
226 | int route_key_size; | 226 | int route_key_size; |
227 | }; | 227 | }; |
228 | 228 | ||
229 | extern struct nf_afinfo *nf_afinfo[]; | 229 | extern const struct nf_afinfo *nf_afinfo[NPROTO]; |
230 | static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) | 230 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) |
231 | { | 231 | { |
232 | return rcu_dereference(nf_afinfo[family]); | 232 | return rcu_dereference(nf_afinfo[family]); |
233 | } | 233 | } |
@@ -236,7 +236,7 @@ static inline __sum16 | |||
236 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | 236 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, |
237 | u_int8_t protocol, unsigned short family) | 237 | u_int8_t protocol, unsigned short family) |
238 | { | 238 | { |
239 | struct nf_afinfo *afinfo; | 239 | const struct nf_afinfo *afinfo; |
240 | __sum16 csum = 0; | 240 | __sum16 csum = 0; |
241 | 241 | ||
242 | rcu_read_lock(); | 242 | rcu_read_lock(); |
@@ -247,8 +247,8 @@ nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | |||
247 | return csum; | 247 | return csum; |
248 | } | 248 | } |
249 | 249 | ||
250 | extern int nf_register_afinfo(struct nf_afinfo *afinfo); | 250 | extern int nf_register_afinfo(const struct nf_afinfo *afinfo); |
251 | extern void nf_unregister_afinfo(struct nf_afinfo *afinfo); | 251 | extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo); |
252 | 252 | ||
253 | #include <net/flow.h> | 253 | #include <net/flow.h> |
254 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | 254 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); |
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 | ||