Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41941
b: refs/heads/master
c: 7659258
h: refs/heads/master
i:
  41939: aef3cc1
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Dec 3, 2006
1 parent b9dce9c commit 35bc3b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 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: 65195686ff2f088a73c1764f4d30be5c7e0eb089
refs/heads/master: 76592584be7828cd314bc8d5dc7773ff1692fb99
22 changes: 15 additions & 7 deletions trunk/net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip,
struct net_device *dev)
{
struct clusterip_config *c;
char buffer[16];

c = kzalloc(sizeof(*c), GFP_ATOMIC);
if (!c)
Expand All @@ -184,12 +183,17 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip,
atomic_set(&c->entries, 1);

#ifdef CONFIG_PROC_FS
/* create proc dir entry */
sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip));
c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir);
if (!c->pde) {
kfree(c);
return NULL;
{
char buffer[16];

/* create proc dir entry */
sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip));
c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR,
clusterip_procdir);
if (!c->pde) {
kfree(c);
return NULL;
}
}
c->pde->proc_fops = &clusterip_proc_fops;
c->pde->data = c;
Expand All @@ -202,6 +206,7 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip,
return c;
}

#ifdef CONFIG_PROC_FS
static int
clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum)
{
Expand Down Expand Up @@ -229,6 +234,7 @@ clusterip_del_node(struct clusterip_config *c, u_int16_t nodenum)

return 1;
}
#endif

static inline u_int32_t
clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config)
Expand Down Expand Up @@ -734,8 +740,10 @@ static int __init ipt_clusterip_init(void)
CLUSTERIP_VERSION);
return 0;

#ifdef CONFIG_PROC_FS
cleanup_hook:
nf_unregister_hook(&cip_arp_ops);
#endif /* CONFIG_PROC_FS */
cleanup_target:
ipt_unregister_target(&clusterip_tgt);
return ret;
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ static ctl_table ipq_root_table[] = {
{ .ctl_name = 0 }
};

#ifdef CONFIG_PROC_FS
static int
ipq_get_info(char *buffer, char **start, off_t offset, int length)
{
Expand Down Expand Up @@ -653,6 +654,7 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length)
len = 0;
return len;
}
#endif /* CONFIG_PROC_FS */

static struct nf_queue_handler nfqh = {
.name = "ip6_queue",
Expand Down

0 comments on commit 35bc3b1

Please sign in to comment.