X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv4%2Fipvs%2Fip_vs_lblc.c;h=b843a11d7cf7c33ae187a8879841516e33927e31;hb=464c4f184ac671c6206d502a67034f9bfe9fe25c;hp=a4385a2180ee6d3f890411927d3056fafbc48c34;hpb=e9ccb79927225d8cd8d022a7c09bfb2fad935b89;p=linux-2.6 diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c index a4385a2180..b843a11d7c 100644 --- a/net/ipv4/ipvs/ip_vs_lblc.c +++ b/net/ipv4/ipvs/ip_vs_lblc.c @@ -114,11 +114,10 @@ struct ip_vs_lblc_table { static ctl_table vs_vars_table[] = { { - .ctl_name = NET_IPV4_VS_LBLC_EXPIRE, .procname = "lblc_expiration", .data = &sysctl_ip_vs_lblc_expiration, .maxlen = sizeof(int), - .mode = 0644, + .mode = 0644, .proc_handler = &proc_dointvec_jiffies, }, { .ctl_name = 0 } @@ -126,9 +125,8 @@ static ctl_table vs_vars_table[] = { static ctl_table vs_table[] = { { - .ctl_name = NET_IPV4_VS, .procname = "vs", - .mode = 0555, + .mode = 0555, .child = vs_vars_table }, { .ctl_name = 0 } @@ -137,7 +135,7 @@ static ctl_table vs_table[] = { static ctl_table ipvs_ipv4_table[] = { { .ctl_name = NET_IPV4, - .procname = "ipv4", + .procname = "ipv4", .mode = 0555, .child = vs_table }, @@ -147,8 +145,8 @@ static ctl_table ipvs_ipv4_table[] = { static ctl_table lblc_root_table[] = { { .ctl_name = CTL_NET, - .procname = "net", - .mode = 0555, + .procname = "net", + .mode = 0555, .child = ipvs_ipv4_table }, { .ctl_name = 0 } @@ -288,7 +286,7 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_lblc_table *tbl) write_lock(&tbl->lock); list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { - if (time_before(now, + if (time_before(now, en->lastuse + sysctl_ip_vs_lblc_expiration)) continue; @@ -521,7 +519,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) struct ip_vs_dest *dest; struct ip_vs_lblc_table *tbl; struct ip_vs_lblc_entry *en; - struct iphdr *iph = skb->nh.iph; + struct iphdr *iph = ip_hdr(skb); IP_VS_DBG(6, "ip_vs_lblc_schedule(): Scheduling...\n"); @@ -583,7 +581,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = static int __init ip_vs_lblc_init(void) { INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list); - sysctl_header = register_sysctl_table(lblc_root_table, 0); + sysctl_header = register_sysctl_table(lblc_root_table); return register_ip_vs_scheduler(&ip_vs_lblc_scheduler); }