Loading net/ipv4/netfilter/ipt_CLUSTERIP.c +15 −7 Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,6 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, struct net_device *dev) struct net_device *dev) { { struct clusterip_config *c; struct clusterip_config *c; char buffer[16]; c = kzalloc(sizeof(*c), GFP_ATOMIC); c = kzalloc(sizeof(*c), GFP_ATOMIC); if (!c) if (!c) Loading @@ -184,13 +183,18 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, atomic_set(&c->entries, 1); atomic_set(&c->entries, 1); #ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS { char buffer[16]; /* create proc dir entry */ /* create proc dir entry */ sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir); c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir); if (!c->pde) { if (!c->pde) { kfree(c); kfree(c); return NULL; return NULL; } } } c->pde->proc_fops = &clusterip_proc_fops; c->pde->proc_fops = &clusterip_proc_fops; c->pde->data = c; c->pde->data = c; #endif #endif Loading @@ -202,6 +206,7 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, return c; return c; } } #ifdef CONFIG_PROC_FS static int static int clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) { { Loading Loading @@ -229,6 +234,7 @@ clusterip_del_node(struct clusterip_config *c, u_int16_t nodenum) return 1; return 1; } } #endif static inline u_int32_t static inline u_int32_t clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) Loading Loading @@ -734,8 +740,10 @@ static int __init ipt_clusterip_init(void) CLUSTERIP_VERSION); CLUSTERIP_VERSION); return 0; return 0; #ifdef CONFIG_PROC_FS cleanup_hook: cleanup_hook: nf_unregister_hook(&cip_arp_ops); nf_unregister_hook(&cip_arp_ops); #endif /* CONFIG_PROC_FS */ cleanup_target: cleanup_target: ipt_unregister_target(&clusterip_tgt); ipt_unregister_target(&clusterip_tgt); return ret; return ret; Loading net/ipv6/netfilter/ip6_queue.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -620,6 +620,7 @@ static ctl_table ipq_root_table[] = { { .ctl_name = 0 } { .ctl_name = 0 } }; }; #ifdef CONFIG_PROC_FS static int static int ipq_get_info(char *buffer, char **start, off_t offset, int length) ipq_get_info(char *buffer, char **start, off_t offset, int length) { { Loading Loading @@ -653,6 +654,7 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length) len = 0; len = 0; return len; return len; } } #endif /* CONFIG_PROC_FS */ static struct nf_queue_handler nfqh = { static struct nf_queue_handler nfqh = { .name = "ip6_queue", .name = "ip6_queue", Loading Loading
net/ipv4/netfilter/ipt_CLUSTERIP.c +15 −7 Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,6 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, struct net_device *dev) struct net_device *dev) { { struct clusterip_config *c; struct clusterip_config *c; char buffer[16]; c = kzalloc(sizeof(*c), GFP_ATOMIC); c = kzalloc(sizeof(*c), GFP_ATOMIC); if (!c) if (!c) Loading @@ -184,13 +183,18 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, atomic_set(&c->entries, 1); atomic_set(&c->entries, 1); #ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS { char buffer[16]; /* create proc dir entry */ /* create proc dir entry */ sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir); c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir); if (!c->pde) { if (!c->pde) { kfree(c); kfree(c); return NULL; return NULL; } } } c->pde->proc_fops = &clusterip_proc_fops; c->pde->proc_fops = &clusterip_proc_fops; c->pde->data = c; c->pde->data = c; #endif #endif Loading @@ -202,6 +206,7 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, return c; return c; } } #ifdef CONFIG_PROC_FS static int static int clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) { { Loading Loading @@ -229,6 +234,7 @@ clusterip_del_node(struct clusterip_config *c, u_int16_t nodenum) return 1; return 1; } } #endif static inline u_int32_t static inline u_int32_t clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) Loading Loading @@ -734,8 +740,10 @@ static int __init ipt_clusterip_init(void) CLUSTERIP_VERSION); CLUSTERIP_VERSION); return 0; return 0; #ifdef CONFIG_PROC_FS cleanup_hook: cleanup_hook: nf_unregister_hook(&cip_arp_ops); nf_unregister_hook(&cip_arp_ops); #endif /* CONFIG_PROC_FS */ cleanup_target: cleanup_target: ipt_unregister_target(&clusterip_tgt); ipt_unregister_target(&clusterip_tgt); return ret; return ret; Loading
net/ipv6/netfilter/ip6_queue.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -620,6 +620,7 @@ static ctl_table ipq_root_table[] = { { .ctl_name = 0 } { .ctl_name = 0 } }; }; #ifdef CONFIG_PROC_FS static int static int ipq_get_info(char *buffer, char **start, off_t offset, int length) ipq_get_info(char *buffer, char **start, off_t offset, int length) { { Loading Loading @@ -653,6 +654,7 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length) len = 0; len = 0; return len; return len; } } #endif /* CONFIG_PROC_FS */ static struct nf_queue_handler nfqh = { static struct nf_queue_handler nfqh = { .name = "ip6_queue", .name = "ip6_queue", Loading