diff options
| author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-06-16 13:01:26 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2011-06-16 13:01:26 -0400 |
| commit | 15b4d93f0316caec44e07255c1d73bde4fac12e4 (patch) | |
| tree | ce8c77384599a933ff1c2f552b748ea5725df779 /net | |
| parent | e385357a2f214e4d4e79c6118f1bede2572e0701 (diff) | |
netfilter: ipset: whitespace and coding fixes detected by checkpatch.pl
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/netfilter/ipset/ip_set_bitmap_ipmac.c | 3 | ||||
| -rw-r--r-- | net/netfilter/ipset/ip_set_core.c | 4 | ||||
| -rw-r--r-- | net/netfilter/ipset/ip_set_hash_net.c | 4 | ||||
| -rw-r--r-- | net/netfilter/ipset/ip_set_hash_netiface.c | 26 | ||||
| -rw-r--r-- | net/netfilter/ipset/ip_set_hash_netport.c | 2 | ||||
| -rw-r--r-- | net/netfilter/ipset/pfxlen.c | 2 | ||||
| -rw-r--r-- | net/netfilter/xt_set.c | 2 |
7 files changed, 22 insertions, 21 deletions
diff --git a/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/net/netfilter/ipset/ip_set_bitmap_ipmac.c index 51ab66435a0a..56096f544978 100644 --- a/net/netfilter/ipset/ip_set_bitmap_ipmac.c +++ b/net/netfilter/ipset/ip_set_bitmap_ipmac.c | |||
| @@ -635,7 +635,8 @@ static struct ip_set_type bitmap_ipmac_type = { | |||
| 635 | }, | 635 | }, |
| 636 | .adt_policy = { | 636 | .adt_policy = { |
| 637 | [IPSET_ATTR_IP] = { .type = NLA_NESTED }, | 637 | [IPSET_ATTR_IP] = { .type = NLA_NESTED }, |
| 638 | [IPSET_ATTR_ETHER] = { .type = NLA_BINARY, .len = ETH_ALEN }, | 638 | [IPSET_ATTR_ETHER] = { .type = NLA_BINARY, |
| 639 | .len = ETH_ALEN }, | ||
| 639 | [IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 }, | 640 | [IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 }, |
| 640 | [IPSET_ATTR_LINENO] = { .type = NLA_U32 }, | 641 | [IPSET_ATTR_LINENO] = { .type = NLA_U32 }, |
| 641 | }, | 642 | }, |
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 80a1262104bf..c012985a5a26 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c | |||
| @@ -683,8 +683,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, | |||
| 683 | if (attr[IPSET_ATTR_DATA] && | 683 | if (attr[IPSET_ATTR_DATA] && |
| 684 | nla_parse_nested(tb, IPSET_ATTR_CREATE_MAX, attr[IPSET_ATTR_DATA], | 684 | nla_parse_nested(tb, IPSET_ATTR_CREATE_MAX, attr[IPSET_ATTR_DATA], |
| 685 | set->type->create_policy)) { | 685 | set->type->create_policy)) { |
| 686 | ret = -IPSET_ERR_PROTOCOL; | 686 | ret = -IPSET_ERR_PROTOCOL; |
| 687 | goto put_out; | 687 | goto put_out; |
| 688 | } | 688 | } |
| 689 | 689 | ||
| 690 | ret = set->type->create(set, tb, flags); | 690 | ret = set->type->create(set, tb, flags); |
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c index 050163fb6094..2d4b1f48e8c9 100644 --- a/net/netfilter/ipset/ip_set_hash_net.c +++ b/net/netfilter/ipset/ip_set_hash_net.c | |||
| @@ -187,7 +187,7 @@ hash_net4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 187 | return -IPSET_ERR_TIMEOUT; | 187 | return -IPSET_ERR_TIMEOUT; |
| 188 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); | 188 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | if (adt == IPSET_TEST || !tb[IPSET_ATTR_IP_TO]) { | 191 | if (adt == IPSET_TEST || !tb[IPSET_ATTR_IP_TO]) { |
| 192 | data.ip = htonl(ip & ip_set_hostmask(data.cidr)); | 192 | data.ip = htonl(ip & ip_set_hostmask(data.cidr)); |
| 193 | ret = adtfn(set, &data, timeout, flags); | 193 | ret = adtfn(set, &data, timeout, flags); |
| @@ -205,7 +205,7 @@ hash_net4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 205 | return -IPSET_ERR_HASH_RANGE; | 205 | return -IPSET_ERR_HASH_RANGE; |
| 206 | } | 206 | } |
| 207 | if (retried) | 207 | if (retried) |
| 208 | ip = h->next.ip; | 208 | ip = h->next.ip; |
| 209 | while (!after(ip, ip_to)) { | 209 | while (!after(ip, ip_to)) { |
| 210 | data.ip = htonl(ip); | 210 | data.ip = htonl(ip); |
| 211 | last = ip_set_range_to_cidr(ip, ip_to, &data.cidr); | 211 | last = ip_set_range_to_cidr(ip, ip_to, &data.cidr); |
diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c index 51e5df12bd00..3d6c53b6211a 100644 --- a/net/netfilter/ipset/ip_set_hash_netiface.c +++ b/net/netfilter/ipset/ip_set_hash_netiface.c | |||
| @@ -100,7 +100,7 @@ iface_test(struct rb_root *root, const char **iface) | |||
| 100 | while (n) { | 100 | while (n) { |
| 101 | const char *d = iface_data(n); | 101 | const char *d = iface_data(n); |
| 102 | int res = ifname_compare(*iface, d); | 102 | int res = ifname_compare(*iface, d); |
| 103 | 103 | ||
| 104 | if (res < 0) | 104 | if (res < 0) |
| 105 | n = n->rb_left; | 105 | n = n->rb_left; |
| 106 | else if (res > 0) | 106 | else if (res > 0) |
| @@ -118,7 +118,7 @@ iface_add(struct rb_root *root, const char **iface) | |||
| 118 | { | 118 | { |
| 119 | struct rb_node **n = &(root->rb_node), *p = NULL; | 119 | struct rb_node **n = &(root->rb_node), *p = NULL; |
| 120 | struct iface_node *d; | 120 | struct iface_node *d; |
| 121 | 121 | ||
| 122 | while (*n) { | 122 | while (*n) { |
| 123 | char *ifname = iface_data(*n); | 123 | char *ifname = iface_data(*n); |
| 124 | int res = ifname_compare(*iface, ifname); | 124 | int res = ifname_compare(*iface, ifname); |
| @@ -296,10 +296,10 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
| 296 | if (opt->cmdflags & IPSET_FLAG_PHYSDEV) { | 296 | if (opt->cmdflags & IPSET_FLAG_PHYSDEV) { |
| 297 | #ifdef CONFIG_BRIDGE_NETFILTER | 297 | #ifdef CONFIG_BRIDGE_NETFILTER |
| 298 | const struct nf_bridge_info *nf_bridge = skb->nf_bridge; | 298 | const struct nf_bridge_info *nf_bridge = skb->nf_bridge; |
| 299 | 299 | ||
| 300 | if (!nf_bridge) | 300 | if (!nf_bridge) |
| 301 | return -EINVAL; | 301 | return -EINVAL; |
| 302 | data.iface = SRCDIR ? PHYSDEV(physindev): PHYSDEV(physoutdev); | 302 | data.iface = SRCDIR ? PHYSDEV(physindev) : PHYSDEV(physoutdev); |
| 303 | data.physdev = 1; | 303 | data.physdev = 1; |
| 304 | #else | 304 | #else |
| 305 | data.iface = NULL; | 305 | data.iface = NULL; |
| @@ -350,7 +350,7 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 350 | if (tb[IPSET_ATTR_CIDR]) { | 350 | if (tb[IPSET_ATTR_CIDR]) { |
| 351 | data.cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); | 351 | data.cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); |
| 352 | if (!data.cidr) | 352 | if (!data.cidr) |
| 353 | return -IPSET_ERR_INVALID_CIDR; | 353 | return -IPSET_ERR_INVALID_CIDR; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | if (tb[IPSET_ATTR_TIMEOUT]) { | 356 | if (tb[IPSET_ATTR_TIMEOUT]) { |
| @@ -359,7 +359,7 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 359 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); | 359 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | strcpy(iface, nla_data(tb[IPSET_ATTR_IFACE])); | 362 | strcpy(iface, nla_data(tb[IPSET_ATTR_IFACE])); |
| 363 | data.iface = iface; | 363 | data.iface = iface; |
| 364 | ret = iface_test(&h->rbtree, &data.iface); | 364 | ret = iface_test(&h->rbtree, &data.iface); |
| 365 | if (adt == IPSET_ADD) { | 365 | if (adt == IPSET_ADD) { |
| @@ -372,8 +372,8 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 372 | return ret; | 372 | return ret; |
| 373 | 373 | ||
| 374 | if (tb[IPSET_ATTR_CADT_FLAGS]) { | 374 | if (tb[IPSET_ATTR_CADT_FLAGS]) { |
| 375 | u32 flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]); | 375 | u32 cadt_flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]); |
| 376 | if (flags & IPSET_FLAG_PHYSDEV) | 376 | if (cadt_flags & IPSET_FLAG_PHYSDEV) |
| 377 | data.physdev = 1; | 377 | data.physdev = 1; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| @@ -559,10 +559,10 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
| 559 | if (opt->cmdflags & IPSET_FLAG_PHYSDEV) { | 559 | if (opt->cmdflags & IPSET_FLAG_PHYSDEV) { |
| 560 | #ifdef CONFIG_BRIDGE_NETFILTER | 560 | #ifdef CONFIG_BRIDGE_NETFILTER |
| 561 | const struct nf_bridge_info *nf_bridge = skb->nf_bridge; | 561 | const struct nf_bridge_info *nf_bridge = skb->nf_bridge; |
| 562 | 562 | ||
| 563 | if (!nf_bridge) | 563 | if (!nf_bridge) |
| 564 | return -EINVAL; | 564 | return -EINVAL; |
| 565 | data.iface = SRCDIR ? PHYSDEV(physindev): PHYSDEV(physoutdev); | 565 | data.iface = SRCDIR ? PHYSDEV(physindev) : PHYSDEV(physoutdev); |
| 566 | data.physdev = 1; | 566 | data.physdev = 1; |
| 567 | #else | 567 | #else |
| 568 | data.iface = NULL; | 568 | data.iface = NULL; |
| @@ -623,7 +623,7 @@ hash_netiface6_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 623 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); | 623 | timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | strcpy(iface, nla_data(tb[IPSET_ATTR_IFACE])); | 626 | strcpy(iface, nla_data(tb[IPSET_ATTR_IFACE])); |
| 627 | data.iface = iface; | 627 | data.iface = iface; |
| 628 | ret = iface_test(&h->rbtree, &data.iface); | 628 | ret = iface_test(&h->rbtree, &data.iface); |
| 629 | if (adt == IPSET_ADD) { | 629 | if (adt == IPSET_ADD) { |
| @@ -636,8 +636,8 @@ hash_netiface6_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 636 | return ret; | 636 | return ret; |
| 637 | 637 | ||
| 638 | if (tb[IPSET_ATTR_CADT_FLAGS]) { | 638 | if (tb[IPSET_ATTR_CADT_FLAGS]) { |
| 639 | u32 flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]); | 639 | u32 cadt_flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]); |
| 640 | if (flags & IPSET_FLAG_PHYSDEV) | 640 | if (cadt_flags & IPSET_FLAG_PHYSDEV) |
| 641 | data.physdev = 1; | 641 | data.physdev = 1; |
| 642 | } | 642 | } |
| 643 | 643 | ||
diff --git a/net/netfilter/ipset/ip_set_hash_netport.c b/net/netfilter/ipset/ip_set_hash_netport.c index d7710a9fb7c7..fe203d12f56b 100644 --- a/net/netfilter/ipset/ip_set_hash_netport.c +++ b/net/netfilter/ipset/ip_set_hash_netport.c | |||
| @@ -199,7 +199,7 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 199 | if (tb[IPSET_ATTR_CIDR]) { | 199 | if (tb[IPSET_ATTR_CIDR]) { |
| 200 | data.cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); | 200 | data.cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); |
| 201 | if (!data.cidr) | 201 | if (!data.cidr) |
| 202 | return -IPSET_ERR_INVALID_CIDR; | 202 | return -IPSET_ERR_INVALID_CIDR; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | if (tb[IPSET_ATTR_PORT]) | 205 | if (tb[IPSET_ATTR_PORT]) |
diff --git a/net/netfilter/ipset/pfxlen.c b/net/netfilter/ipset/pfxlen.c index b57a85673de7..bd13d66220f1 100644 --- a/net/netfilter/ipset/pfxlen.c +++ b/net/netfilter/ipset/pfxlen.c | |||
| @@ -148,7 +148,7 @@ const union nf_inet_addr ip_set_netmask_map[] = { | |||
| 148 | EXPORT_SYMBOL_GPL(ip_set_netmask_map); | 148 | EXPORT_SYMBOL_GPL(ip_set_netmask_map); |
| 149 | 149 | ||
| 150 | #undef E | 150 | #undef E |
| 151 | #define E(a, b, c, d) \ | 151 | #define E(a, b, c, d) \ |
| 152 | {.ip6 = { (__force __be32) a, (__force __be32) b, \ | 152 | {.ip6 = { (__force __be32) a, (__force __be32) b, \ |
| 153 | (__force __be32) c, (__force __be32) d, \ | 153 | (__force __be32) c, (__force __be32) d, \ |
| 154 | } } | 154 | } } |
diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c index 453847f293d3..19461c462dbd 100644 --- a/net/netfilter/xt_set.c +++ b/net/netfilter/xt_set.c | |||
| @@ -37,7 +37,7 @@ match_set(ip_set_id_t index, const struct sk_buff *skb, | |||
| 37 | return inv; | 37 | return inv; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | #define ADT_OPT(n, f, d, fs, cfs, t) \ | 40 | #define ADT_OPT(n, f, d, fs, cfs, t) \ |
| 41 | const struct ip_set_adt_opt n = { \ | 41 | const struct ip_set_adt_opt n = { \ |
| 42 | .family = f, \ | 42 | .family = f, \ |
| 43 | .dim = d, \ | 43 | .dim = d, \ |
