Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78549
b: refs/heads/master
c: 1e796fd
h: refs/heads/master
i:
  78547: a486a3e
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent c8f4c5b commit 895ef24
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90a9ba8dd90bcffe279d3272545bccba6dcc8d7c
refs/heads/master: 1e796fda00f06bac584f0e4ad8750ab9430d79d3
10 changes: 5 additions & 5 deletions trunk/include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ struct nf_afinfo {
int route_key_size;
};

extern struct nf_afinfo *nf_afinfo[];
static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
extern const struct nf_afinfo *nf_afinfo[NPROTO];
static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family)
{
return rcu_dereference(nf_afinfo[family]);
}
Expand All @@ -236,7 +236,7 @@ static inline __sum16
nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
u_int8_t protocol, unsigned short family)
{
struct nf_afinfo *afinfo;
const struct nf_afinfo *afinfo;
__sum16 csum = 0;

rcu_read_lock();
Expand All @@ -247,8 +247,8 @@ nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
return csum;
}

extern int nf_register_afinfo(struct nf_afinfo *afinfo);
extern void nf_unregister_afinfo(struct nf_afinfo *afinfo);
extern int nf_register_afinfo(const struct nf_afinfo *afinfo);
extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo);

#include <net/flow.h>
extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static int nf_ip_route(struct dst_entry **dst, struct flowi *fl)
return ip_route_output_key((struct rtable **)dst, fl);
}

static struct nf_afinfo nf_ip_afinfo = {
static const struct nf_afinfo nf_ip_afinfo = {
.family = AF_INET,
.checksum = nf_ip_checksum,
.route = nf_ip_route,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,

EXPORT_SYMBOL(nf_ip6_checksum);

static struct nf_afinfo nf_ip6_afinfo = {
static const struct nf_afinfo nf_ip6_afinfo = {
.family = AF_INET6,
.checksum = nf_ip6_checksum,
.route = nf_ip6_route,
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/netfilter/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

static DEFINE_MUTEX(afinfo_mutex);

struct nf_afinfo *nf_afinfo[NPROTO] __read_mostly;
const struct nf_afinfo *nf_afinfo[NPROTO] __read_mostly;
EXPORT_SYMBOL(nf_afinfo);

int nf_register_afinfo(struct nf_afinfo *afinfo)
int nf_register_afinfo(const struct nf_afinfo *afinfo)
{
int err;

Expand All @@ -42,7 +42,7 @@ int nf_register_afinfo(struct nf_afinfo *afinfo)
}
EXPORT_SYMBOL_GPL(nf_register_afinfo);

void nf_unregister_afinfo(struct nf_afinfo *afinfo)
void nf_unregister_afinfo(const struct nf_afinfo *afinfo)
{
mutex_lock(&afinfo_mutex);
rcu_assign_pointer(nf_afinfo[afinfo->family], NULL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netfilter/nf_conntrack_h323_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static int callforward_do_filter(union nf_conntrack_address *src,
union nf_conntrack_address *dst,
int family)
{
struct nf_afinfo *afinfo;
const struct nf_afinfo *afinfo;
struct flowi fl1, fl2;
int ret = 0;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int __nf_queue(struct sk_buff *skb,
struct net_device *physindev;
struct net_device *physoutdev;
#endif
struct nf_afinfo *afinfo;
const struct nf_afinfo *afinfo;
const struct nf_queue_handler *qh;

/* QUEUE == DROP if noone is waiting, to be safe. */
Expand Down Expand Up @@ -233,7 +233,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
{
struct sk_buff *skb = entry->skb;
struct list_head *elem = &entry->elem->list;
struct nf_afinfo *afinfo;
const struct nf_afinfo *afinfo;

rcu_read_lock();

Expand Down

0 comments on commit 895ef24

Please sign in to comment.