Home
last modified time | relevance | path

Searched refs:ipvs (Results 1 – 25 of 25) sorted by relevance

/Linux-v4.19/net/netfilter/ipvs/
Dip_vs_ctl.c97 static void update_defense_level(struct netns_ipvs *ipvs) in update_defense_level() argument
113 nomem = (availmem < ipvs->sysctl_amemthresh); in update_defense_level()
118 spin_lock(&ipvs->dropentry_lock); in update_defense_level()
119 switch (ipvs->sysctl_drop_entry) { in update_defense_level()
121 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
125 atomic_set(&ipvs->dropentry, 1); in update_defense_level()
126 ipvs->sysctl_drop_entry = 2; in update_defense_level()
128 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
133 atomic_set(&ipvs->dropentry, 1); in update_defense_level()
135 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
[all …]
Dip_vs_sync.c198 struct netns_ipvs *ipvs; member
306 sb_dequeue(struct netns_ipvs *ipvs, struct ipvs_master_sync_state *ms) in sb_dequeue() argument
310 spin_lock_bh(&ipvs->sync_lock); in sb_dequeue()
322 spin_unlock_bh(&ipvs->sync_lock); in sb_dequeue()
331 ip_vs_sync_buff_create(struct netns_ipvs *ipvs, unsigned int len) in ip_vs_sync_buff_create() argument
339 ipvs->mcfg.sync_maxlen); in ip_vs_sync_buff_create()
347 sb->mesg->syncid = ipvs->mcfg.syncid; in ip_vs_sync_buff_create()
364 static inline void sb_queue_tail(struct netns_ipvs *ipvs, in sb_queue_tail() argument
369 spin_lock(&ipvs->sync_lock); in sb_queue_tail()
370 if (ipvs->sync_state & IP_VS_STATE_MASTER && in sb_queue_tail()
[all …]
Dip_vs_core.c116 struct netns_ipvs *ipvs = cp->ipvs; in ip_vs_in_stats() local
137 s = this_cpu_ptr(ipvs->tot_stats.cpustats); in ip_vs_in_stats()
152 struct netns_ipvs *ipvs = cp->ipvs; in ip_vs_out_stats() local
173 s = this_cpu_ptr(ipvs->tot_stats.cpustats); in ip_vs_out_stats()
187 struct netns_ipvs *ipvs = svc->ipvs; in ip_vs_conn_stats() local
202 s = this_cpu_ptr(ipvs->tot_stats.cpustats); in ip_vs_conn_stats()
227 ip_vs_conn_fill_param(svc->ipvs, svc->af, protocol, caddr, cport, vaddr, in ip_vs_conn_fill_param_persist()
388 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, src_addr, in ip_vs_sched_persist()
481 cp = pp->conn_in_get(svc->ipvs, svc->af, skb, iph); in ip_vs_schedule()
536 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, in ip_vs_schedule()
[all …]
Dip_vs_est.c105 struct netns_ipvs *ipvs = from_timer(ipvs, t, est_timer); in estimation_timer() local
107 spin_lock(&ipvs->est_lock); in estimation_timer()
108 list_for_each_entry(e, &ipvs->est_list, list) { in estimation_timer()
137 spin_unlock(&ipvs->est_lock); in estimation_timer()
138 mod_timer(&ipvs->est_timer, jiffies + 2*HZ); in estimation_timer()
141 void ip_vs_start_estimator(struct netns_ipvs *ipvs, struct ip_vs_stats *stats) in ip_vs_start_estimator() argument
147 spin_lock_bh(&ipvs->est_lock); in ip_vs_start_estimator()
148 list_add(&est->list, &ipvs->est_list); in ip_vs_start_estimator()
149 spin_unlock_bh(&ipvs->est_lock); in ip_vs_start_estimator()
152 void ip_vs_stop_estimator(struct netns_ipvs *ipvs, struct ip_vs_stats *stats) in ip_vs_stop_estimator() argument
[all …]
Dip_vs_app.c78 ip_vs_app_inc_new(struct netns_ipvs *ipvs, struct ip_vs_app *app, __u16 proto, in ip_vs_app_inc_new() argument
110 ret = pp->register_app(ipvs, inc); in ip_vs_app_inc_new()
130 ip_vs_app_inc_release(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in ip_vs_app_inc_release() argument
138 pp->unregister_app(ipvs, inc); in ip_vs_app_inc_release()
178 register_ip_vs_app_inc(struct netns_ipvs *ipvs, struct ip_vs_app *app, __u16 proto, in register_ip_vs_app_inc() argument
185 result = ip_vs_app_inc_new(ipvs, app, proto, port); in register_ip_vs_app_inc()
194 struct ip_vs_app *register_ip_vs_app(struct netns_ipvs *ipvs, struct ip_vs_app *app) in register_ip_vs_app() argument
201 list_for_each_entry(a, &ipvs->app_list, a_list) { in register_ip_vs_app()
213 list_add(&a->a_list, &ipvs->app_list); in register_ip_vs_app()
229 void unregister_ip_vs_app(struct netns_ipvs *ipvs, struct ip_vs_app *app) in unregister_ip_vs_app() argument
[all …]
Dip_vs_conn.c112 static unsigned int ip_vs_conn_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_conn_hashkey() argument
120 ((size_t)ipvs>>8)) & ip_vs_conn_tab_mask; in ip_vs_conn_hashkey()
124 ((size_t)ipvs>>8)) & ip_vs_conn_tab_mask; in ip_vs_conn_hashkey()
145 return ip_vs_conn_hashkey(p->ipvs, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param()
152 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn()
284 cp->ipvs == p->ipvs) { in __ip_vs_conn_in_get()
319 ip_vs_conn_fill_param_proto(struct netns_ipvs *ipvs, in ip_vs_conn_fill_param_proto() argument
331 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->saddr, in ip_vs_conn_fill_param_proto()
334 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->daddr, in ip_vs_conn_fill_param_proto()
340 ip_vs_conn_in_get_proto(struct netns_ipvs *ipvs, int af, in ip_vs_conn_in_get_proto() argument
[all …]
Dip_vs_proto.c71 register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp) in register_ip_vs_proto_netns() argument
81 pd->next = ipvs->proto_data_table[hash]; in register_ip_vs_proto_netns()
82 ipvs->proto_data_table[hash] = pd; in register_ip_vs_proto_netns()
86 int ret = pp->init_netns(ipvs, pd); in register_ip_vs_proto_netns()
89 ipvs->proto_data_table[hash] = pd->next; in register_ip_vs_proto_netns()
123 unregister_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd) in unregister_ip_vs_proto_netns() argument
128 pd_p = &ipvs->proto_data_table[hash]; in unregister_ip_vs_proto_netns()
133 pd->pp->exit_netns(ipvs, pd); in unregister_ip_vs_proto_netns()
163 ip_vs_proto_data_get(struct netns_ipvs *ipvs, unsigned short proto) in ip_vs_proto_data_get() argument
168 for (pd = ipvs->proto_data_table[hash]; pd; pd = pd->next) { in ip_vs_proto_data_get()
[all …]
Dip_vs_proto_ah_esp.c44 ah_esp_conn_fill_param_proto(struct netns_ipvs *ipvs, int af, in ah_esp_conn_fill_param_proto() argument
49 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
53 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
59 ah_esp_conn_in_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb, in ah_esp_conn_in_get() argument
65 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_in_get()
85 ah_esp_conn_out_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb, in ah_esp_conn_out_get() argument
91 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_out_get()
107 ah_esp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in ah_esp_conn_schedule() argument
Dip_vs_lblc.c255 return svc->ipvs->sysctl_lblc_expiration; in sysctl_lblc_expiration()
557 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_lblc_init() local
559 if (!ipvs) in __ip_vs_lblc_init()
563 ipvs->lblc_ctl_table = kmemdup(vs_vars_table, in __ip_vs_lblc_init()
566 if (ipvs->lblc_ctl_table == NULL) in __ip_vs_lblc_init()
571 ipvs->lblc_ctl_table[0].procname = NULL; in __ip_vs_lblc_init()
574 ipvs->lblc_ctl_table = vs_vars_table; in __ip_vs_lblc_init()
575 ipvs->sysctl_lblc_expiration = DEFAULT_EXPIRATION; in __ip_vs_lblc_init()
576 ipvs->lblc_ctl_table[0].data = &ipvs->sysctl_lblc_expiration; in __ip_vs_lblc_init()
578 ipvs->lblc_ctl_header = in __ip_vs_lblc_init()
[all …]
Dip_vs_proto_udp.c32 udp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in udp_conn_schedule() argument
57 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
60 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
66 if (ip_vs_todrop(ipvs)) { in udp_conn_schedule()
362 static int udp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in udp_register_app() argument
368 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_UDP); in udp_register_app()
372 list_for_each_entry(i, &ipvs->udp_apps[hash], p_list) { in udp_register_app()
378 list_add_rcu(&inc->p_list, &ipvs->udp_apps[hash]); in udp_register_app()
387 udp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in udp_unregister_app() argument
389 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_UDP); in udp_unregister_app()
[all …]
Dip_vs_lblcr.c420 return svc->ipvs->sysctl_lblcr_expiration; in sysctl_lblcr_expiration()
743 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_lblcr_init() local
745 if (!ipvs) in __ip_vs_lblcr_init()
749 ipvs->lblcr_ctl_table = kmemdup(vs_vars_table, in __ip_vs_lblcr_init()
752 if (ipvs->lblcr_ctl_table == NULL) in __ip_vs_lblcr_init()
757 ipvs->lblcr_ctl_table[0].procname = NULL; in __ip_vs_lblcr_init()
759 ipvs->lblcr_ctl_table = vs_vars_table; in __ip_vs_lblcr_init()
760 ipvs->sysctl_lblcr_expiration = DEFAULT_EXPIRATION; in __ip_vs_lblcr_init()
761 ipvs->lblcr_ctl_table[0].data = &ipvs->sysctl_lblcr_expiration; in __ip_vs_lblcr_init()
763 ipvs->lblcr_ctl_header = in __ip_vs_lblcr_init()
[all …]
Dip_vs_xmit.c215 static inline bool ensure_mtu_is_adequate(struct netns_ipvs *ipvs, int skb_af, in ensure_mtu_is_adequate() argument
222 struct net *net = ipvs->net; in ensure_mtu_is_adequate()
240 if ((rt_mode & IP_VS_RT_MODE_TUNNEL) && !sysctl_pmtu_disc(ipvs)) in ensure_mtu_is_adequate()
257 static inline bool decrement_ttl(struct netns_ipvs *ipvs, in decrement_ttl() argument
261 struct net *net = ipvs->net; in decrement_ttl()
308 __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb, in __ip_vs_get_out_rt() argument
313 struct net *net = ipvs->net; in __ip_vs_get_out_rt()
378 if (!decrement_ttl(ipvs, skb_af, skb)) in __ip_vs_get_out_rt()
392 if (!ensure_mtu_is_adequate(ipvs, skb_af, rt_mode, ipvsh, skb, mtu)) in __ip_vs_get_out_rt()
458 __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb, in __ip_vs_get_out_rt_v6() argument
[all …]
Dip_vs_proto_sctp.c13 sctp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in sctp_conn_schedule() argument
30 !(sysctl_sloppy_sctp(ipvs) || in sctp_conn_schedule()
47 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
50 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
55 if (ip_vs_todrop(ipvs)) { in sctp_conn_schedule()
488 static int sctp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in sctp_register_app() argument
494 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_SCTP); in sctp_register_app()
498 list_for_each_entry(i, &ipvs->sctp_apps[hash], p_list) { in sctp_register_app()
504 list_add_rcu(&inc->p_list, &ipvs->sctp_apps[hash]); in sctp_register_app()
511 static void sctp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in sctp_unregister_app() argument
[all …]
Dip_vs_proto_tcp.c35 tcp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in tcp_conn_schedule() argument
51 if (th->rst || !(sysctl_sloppy_tcp(ipvs) || th->syn)) in tcp_conn_schedule()
68 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule()
71 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule()
77 if (ip_vs_todrop(ipvs)) { in tcp_conn_schedule()
614 static int tcp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in tcp_register_app() argument
620 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_TCP); in tcp_register_app()
624 list_for_each_entry(i, &ipvs->tcp_apps[hash], p_list) { in tcp_register_app()
630 list_add_rcu(&inc->p_list, &ipvs->tcp_apps[hash]); in tcp_register_app()
639 tcp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in tcp_unregister_app() argument
[all …]
Dip_vs_ftp.c326 ip_vs_conn_fill_param(cp->ipvs, cp->af, in ip_vs_ftp_out()
334 ip_vs_conn_fill_param(cp->ipvs, in ip_vs_ftp_out()
537 ip_vs_conn_fill_param(cp->ipvs, cp->af, in ip_vs_ftp_in()
585 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_ftp_init() local
587 if (!ipvs) in __ip_vs_ftp_init()
590 app = register_ip_vs_app(ipvs, &ip_vs_ftp); in __ip_vs_ftp_init()
597 ret = register_ip_vs_app_inc(ipvs, app, app->protocol, ports[i]); in __ip_vs_ftp_init()
606 unregister_ip_vs_app(ipvs, &ip_vs_ftp); in __ip_vs_ftp_init()
614 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_ftp_exit() local
616 if (!ipvs) in __ip_vs_ftp_exit()
[all …]
Dip_vs_nfct.c278 h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple); in ip_vs_conn_drop_conntrack()
/Linux-v4.19/include/net/
Dip_vs.h41 return net->ipvs; in net_ipvs()
428 int (*init_netns)(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd);
430 void (*exit_netns)(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd);
432 int (*conn_schedule)(struct netns_ipvs *ipvs,
439 (*conn_in_get)(struct netns_ipvs *ipvs,
445 (*conn_out_get)(struct netns_ipvs *ipvs,
465 int (*register_app)(struct netns_ipvs *ipvs, struct ip_vs_app *inc);
467 void (*unregister_app)(struct netns_ipvs *ipvs, struct ip_vs_app *inc);
489 struct ip_vs_proto_data *ip_vs_proto_data_get(struct netns_ipvs *ipvs,
493 struct netns_ipvs *ipvs; member
[all …]
Dnet_namespace.h153 struct netns_ipvs *ipvs; member
/Linux-v4.19/net/netfilter/
Dxt_ipvs.c51 struct netns_ipvs *ipvs = net_ipvs(xt_net(par)); in ipvs_mt() local
89 cp = pp->conn_out_get(ipvs, family, skb, &iph); in ipvs_mt()
DMakefile210 obj-$(CONFIG_IP_VS) += ipvs/
DKconfig1322 tristate '"ipvs" match support'
1603 source "net/netfilter/ipvs/Kconfig"
/Linux-v4.19/Documentation/networking/
Dipvs-sysctl.txt28 Controls how ipvs will deal with connections that are detected
164 If set, ipvs will set the ipvs_property on all packets which are of
167 packets that have been tunneled to the ipvs host (i.e. to prevent
168 ipvs routing loops when ipvs is also acting as a real server).
D00-INDEX117 ipvs-sysctl.txt
/Linux-v4.19/Documentation/sysctl/
Dnet.txt296 Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for
/Linux-v4.19/
DMAINTAINERS7671 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git
7672 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git
7673 F: Documentation/networking/ipvs-sysctl.txt
7676 F: net/netfilter/ipvs/