diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-12-20 11:54:26 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-12-20 11:54:35 +0100 |
commit | 57d871ad46bfaed44e556cb872f4bfab1004d9e1 (patch) | |
tree | 05aba4c451f5d6a7025db633d22c556f55d9f351 /kernel/ip_set_list_set.c | |
parent | 06366c172c487b3038b52e8fe640747b4092a544 (diff) | |
parent | 95b9dfb393232f384ccfc671971a0a9387e138d4 (diff) |
Merge branch 'master' of git://dev.medozas.de/ipset into ipset-5
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'kernel/ip_set_list_set.c')
-rw-r--r-- | kernel/ip_set_list_set.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/kernel/ip_set_list_set.c b/kernel/ip_set_list_set.c index fe4b410..8c3e9b3 100644 --- a/kernel/ip_set_list_set.c +++ b/kernel/ip_set_list_set.c @@ -112,8 +112,7 @@ list_set_kadt(struct ip_set *set, const struct sk_buff *skb, return -EINVAL; } -static const struct nla_policy -list_set_adt_policy[IPSET_ATTR_ADT_MAX+1] __read_mostly = { +static const struct nla_policy list_set_adt_policy[IPSET_ATTR_ADT_MAX+1] = { [IPSET_ATTR_NAME] = { .type = NLA_STRING, .len = IPSET_MAXNAMELEN }, [IPSET_ATTR_NAMEREF] = { .type = NLA_STRING, @@ -170,7 +169,7 @@ static int list_set_add(struct list_set *map, u32 i, ip_set_id_t id, unsigned long timeout) { - struct set_elem *e = list_set_elem(map, i); + const struct set_elem *e = list_set_elem(map, i); if (i == map->size - 1 && e->id != IPSET_INVALID_ID) /* Last element replaced: e.g. add new,before,last */ @@ -215,7 +214,7 @@ list_set_uadt(struct ip_set *set, struct nlattr *head, int len, int before = 0; u32 timeout = map->timeout; ip_set_id_t id, refid = IPSET_INVALID_ID; - struct set_elem *elem; + const struct set_elem *elem; struct ip_set *s; u32 i; int ret = 0; @@ -396,7 +395,7 @@ nla_put_failure: } static int -list_set_list(struct ip_set *set, +list_set_list(const struct ip_set *set, struct sk_buff *skb, struct netlink_callback *cb) { const struct list_set *map = set->data; @@ -447,14 +446,14 @@ nla_put_failure: static bool list_set_same_set(const struct ip_set *a, const struct ip_set *b) { - struct list_set *x = a->data; - struct list_set *y = b->data; + const struct list_set *x = a->data; + const struct list_set *y = b->data; return x->size == y->size && x->timeout == y->timeout; } -static const struct ip_set_type_variant list_set __read_mostly = { +static const struct ip_set_type_variant list_set = { .kadt = list_set_kadt, .uadt = list_set_uadt, .destroy = list_set_destroy, @@ -502,7 +501,7 @@ list_set_gc_init(struct ip_set *set) /* Create list:set type of sets */ static const struct nla_policy -list_set_create_policy[IPSET_ATTR_CREATE_MAX+1] __read_mostly = { +list_set_create_policy[IPSET_ATTR_CREATE_MAX+1] = { [IPSET_ATTR_SIZE] = { .type = NLA_U32 }, [IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 }, }; @@ -563,7 +562,7 @@ list_set_create(struct ip_set *set, struct nlattr *head, int len, return 0; } -static struct ip_set_type list_set_type = { +static struct ip_set_type list_set_type __read_mostly = { .name = "list:set", .protocol = IPSET_PROTOCOL, .features = IPSET_TYPE_NAME | IPSET_DUMP_LAST, |