Home
last modified time | relevance | path

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

/linux/net/netfilter/ipvs/
H A Dip_vs_est.c75 static void ip_vs_est_calc_phase(struct netns_ipvs *ipvs);
76 static void ip_vs_est_drain_temp_list(struct netns_ipvs *ipvs);
172 struct netns_ipvs *ipvs = kd->ipvs; in ip_vs_estimation_kthread() local
179 if (!ipvs->est_chain_max) in ip_vs_estimation_kthread()
182 if (!ipvs->est_chain_max) { in ip_vs_estimation_kthread()
183 ipvs->est_calc_phase = 1; in ip_vs_estimation_kthread()
189 if (ipvs->est_calc_phase) in ip_vs_estimation_kthread()
190 ip_vs_est_calc_phase(ipvs); in ip_vs_estimation_kthread()
194 if (!id && !hlist_empty(&ipvs->est_temp_list)) in ip_vs_estimation_kthread()
195 ip_vs_est_drain_temp_list(ipvs); in ip_vs_estimation_kthread()
[all …]
H A Dip_vs_ctl.c92 static void update_defense_level(struct netns_ipvs *ipvs) in update_defense_level() argument
108 amemthresh = max(READ_ONCE(ipvs->sysctl_amemthresh), 0); in update_defense_level()
114 spin_lock(&ipvs->dropentry_lock); in update_defense_level()
115 switch (ipvs->sysctl_drop_entry) { in update_defense_level()
117 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
121 atomic_set(&ipvs->dropentry, 1); in update_defense_level()
122 ipvs->sysctl_drop_entry = 2; in update_defense_level()
124 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
129 atomic_set(&ipvs->dropentry, 1); in update_defense_level()
131 atomic_set(&ipvs->dropentry, 0); in update_defense_level()
[all …]
H A Dip_vs_sync.c198 struct netns_ipvs *ipvs; member
303 sb_dequeue(struct netns_ipvs *ipvs, struct ipvs_master_sync_state *ms) in sb_dequeue() argument
307 spin_lock_bh(&ipvs->sync_lock); in sb_dequeue()
319 spin_unlock_bh(&ipvs->sync_lock); in sb_dequeue()
328 ip_vs_sync_buff_create(struct netns_ipvs *ipvs, unsigned int len) in ip_vs_sync_buff_create() argument
336 ipvs->mcfg.sync_maxlen); in ip_vs_sync_buff_create()
344 sb->mesg->syncid = ipvs->mcfg.syncid; in ip_vs_sync_buff_create()
361 static inline void sb_queue_tail(struct netns_ipvs *ipvs, in sb_queue_tail() argument
366 spin_lock(&ipvs->sync_lock); in sb_queue_tail()
367 if (ipvs->sync_state & IP_VS_STATE_MASTER && in sb_queue_tail()
[all …]
H A Dip_vs_conn.c106 static unsigned int ip_vs_conn_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_conn_hashkey() argument
114 ((size_t)ipvs>>8)) & ip_vs_conn_tab_mask; in ip_vs_conn_hashkey()
118 ((size_t)ipvs>>8)) & ip_vs_conn_tab_mask; in ip_vs_conn_hashkey()
139 return ip_vs_conn_hashkey(p->ipvs, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param()
146 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn()
278 cp->ipvs == p->ipvs) { in __ip_vs_conn_in_get()
313 ip_vs_conn_fill_param_proto(struct netns_ipvs *ipvs, in ip_vs_conn_fill_param_proto() argument
325 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->saddr, in ip_vs_conn_fill_param_proto()
328 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->daddr, in ip_vs_conn_fill_param_proto()
334 ip_vs_conn_in_get_proto(struct netns_ipvs *ipvs, int af, in ip_vs_conn_in_get_proto() argument
[all …]
H A Dip_vs_app.c72 ip_vs_app_inc_new(struct netns_ipvs *ipvs, struct ip_vs_app *app, __u16 proto,
104 ret = pp->register_app(ipvs, inc); in ip_vs_app_inc_new()
124 ip_vs_app_inc_release(struct netns_ipvs *ipvs, struct ip_vs_app *inc)
132 pp->unregister_app(ipvs, inc); in ip_vs_app_inc_release()
172 register_ip_vs_app_inc(struct netns_ipvs *ipvs, struct ip_vs_app *app, __u16 proto,
179 result = ip_vs_app_inc_new(ipvs, app, proto, port); in register_ip_vs_app_inc()
188 struct ip_vs_app *register_ip_vs_app(struct netns_ipvs *ipvs, struct ip_vs_app *app)
201 list_for_each_entry(a, &ipvs->app_list, a_list) { in register_ip_vs_app()
217 list_add(&a->a_list, &ipvs->app_list); in register_ip_vs_app()
231 void unregister_ip_vs_app(struct netns_ipvs *ipvs, struc
73 ip_vs_app_inc_new(struct netns_ipvs * ipvs,struct ip_vs_app * app,__u16 proto,__u16 port) ip_vs_app_inc_new() argument
125 ip_vs_app_inc_release(struct netns_ipvs * ipvs,struct ip_vs_app * inc) ip_vs_app_inc_release() argument
173 register_ip_vs_app_inc(struct netns_ipvs * ipvs,struct ip_vs_app * app,__u16 proto,__u16 port) register_ip_vs_app_inc() argument
189 register_ip_vs_app(struct netns_ipvs * ipvs,struct ip_vs_app * app) register_ip_vs_app() argument
232 unregister_ip_vs_app(struct netns_ipvs * ipvs,struct ip_vs_app * app) unregister_ip_vs_app() argument
519 ip_vs_app_idx(struct netns_ipvs * ipvs,loff_t pos) ip_vs_app_idx() argument
536 struct netns_ipvs *ipvs = net_ipvs(net); ip_vs_app_seq_start() local
548 struct netns_ipvs *ipvs = net_ipvs(net); ip_vs_app_seq_next() local
599 ip_vs_app_net_init(struct netns_ipvs * ipvs) ip_vs_app_net_init() argument
611 ip_vs_app_net_cleanup(struct netns_ipvs * ipvs) ip_vs_app_net_cleanup() argument
[all...]
H A Dip_vs_proto.c65 register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp) in register_ip_vs_proto_netns() argument
75 pd->next = ipvs->proto_data_table[hash]; in register_ip_vs_proto_netns()
76 ipvs->proto_data_table[hash] = pd; in register_ip_vs_proto_netns()
80 int ret = pp->init_netns(ipvs, pd); in register_ip_vs_proto_netns()
83 ipvs->proto_data_table[hash] = pd->next; in register_ip_vs_proto_netns()
117 unregister_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd) in unregister_ip_vs_proto_netns() argument
122 pd_p = &ipvs->proto_data_table[hash]; in unregister_ip_vs_proto_netns()
127 pd->pp->exit_netns(ipvs, pd); in unregister_ip_vs_proto_netns()
157 ip_vs_proto_data_get(struct netns_ipvs *ipvs, unsigned short proto) in ip_vs_proto_data_get() argument
162 for (pd = ipvs->proto_data_table[hash]; pd; pd = pd->next) { in ip_vs_proto_data_get()
[all …]
H A Dip_vs_proto_ah_esp.c39 ah_esp_conn_fill_param_proto(struct netns_ipvs *ipvs, int af,
44 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
48 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
54 ah_esp_conn_in_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb,
60 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_in_get()
80 ah_esp_conn_out_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb,
86 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_out_get()
102 ah_esp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb,
40 ah_esp_conn_fill_param_proto(struct netns_ipvs * ipvs,int af,const struct ip_vs_iphdr * iph,struct ip_vs_conn_param * p) ah_esp_conn_fill_param_proto() argument
55 ah_esp_conn_in_get(struct netns_ipvs * ipvs,int af,const struct sk_buff * skb,const struct ip_vs_iphdr * iph) ah_esp_conn_in_get() argument
81 ah_esp_conn_out_get(struct netns_ipvs * ipvs,int af,const struct sk_buff * skb,const struct ip_vs_iphdr * iph) ah_esp_conn_out_get() argument
103 ah_esp_conn_schedule(struct netns_ipvs * ipvs,int af,struct sk_buff * skb,struct ip_vs_proto_data * pd,int * verdict,struct ip_vs_conn ** cpp,struct ip_vs_iphdr * iph) ah_esp_conn_schedule() argument
H A Dip_vs_lblc.c248 return svc->ipvs->sysctl_lblc_expiration; in sysctl_lblc_expiration()
551 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_lblc_init() local
554 if (!ipvs) in __ip_vs_lblc_init()
558 ipvs->lblc_ctl_table = kmemdup(vs_vars_table, in __ip_vs_lblc_init()
561 if (ipvs->lblc_ctl_table == NULL) in __ip_vs_lblc_init()
569 ipvs->lblc_ctl_table = vs_vars_table; in __ip_vs_lblc_init()
570 ipvs->sysctl_lblc_expiration = DEFAULT_EXPIRATION; in __ip_vs_lblc_init()
571 ipvs->lblc_ctl_table[0].data = &ipvs->sysctl_lblc_expiration; in __ip_vs_lblc_init()
573 ipvs->lblc_ctl_header = register_net_sysctl_sz(net, "net/ipv4/vs", in __ip_vs_lblc_init()
574 ipvs->lblc_ctl_table, in __ip_vs_lblc_init()
[all …]
H A Dip_vs_proto_udp.c31 udp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in udp_conn_schedule() argument
56 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
59 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
65 if (ip_vs_todrop(ipvs)) { in udp_conn_schedule()
354 static int udp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in udp_register_app() argument
360 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_UDP); in udp_register_app()
364 list_for_each_entry(i, &ipvs->udp_apps[hash], p_list) { in udp_register_app()
370 list_add_rcu(&inc->p_list, &ipvs->udp_apps[hash]); in udp_register_app()
379 udp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in udp_unregister_app() argument
381 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_UDP); in udp_unregister_app()
[all …]
H A Dip_vs_lblcr.c413 return svc->ipvs->sysctl_lblcr_expiration; in sysctl_lblcr_expiration()
737 struct netns_ipvs *ipvs = net_ipvs(net); in __ip_vs_lblcr_init() local
740 if (!ipvs) in __ip_vs_lblcr_init()
744 ipvs->lblcr_ctl_table = kmemdup(vs_vars_table, in __ip_vs_lblcr_init()
747 if (ipvs->lblcr_ctl_table == NULL) in __ip_vs_lblcr_init()
754 ipvs->lblcr_ctl_table = vs_vars_table; in __ip_vs_lblcr_init()
755 ipvs->sysctl_lblcr_expiration = DEFAULT_EXPIRATION; in __ip_vs_lblcr_init()
756 ipvs->lblcr_ctl_table[0].data = &ipvs->sysctl_lblcr_expiration; in __ip_vs_lblcr_init()
758 ipvs->lblcr_ctl_header = register_net_sysctl_sz(net, "net/ipv4/vs", in __ip_vs_lblcr_init()
759 ipvs->lblcr_ctl_table, in __ip_vs_lblcr_init()
[all …]
H A Dip_vs_proto_sctp.c17 sctp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in sctp_conn_schedule() argument
34 !(sysctl_sloppy_sctp(ipvs) || in sctp_conn_schedule()
51 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
54 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
59 if (ip_vs_todrop(ipvs)) { in sctp_conn_schedule()
484 static int sctp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in sctp_register_app() argument
490 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_SCTP); in sctp_register_app()
494 list_for_each_entry(i, &ipvs->sctp_apps[hash], p_list) { in sctp_register_app()
500 list_add_rcu(&inc->p_list, &ipvs->sctp_apps[hash]); in sctp_register_app()
507 static void sctp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in sctp_unregister_app() argument
[all …]
H A 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()
608 static int tcp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in tcp_register_app() argument
614 struct ip_vs_proto_data *pd = ip_vs_proto_data_get(ipvs, IPPROTO_TCP); in tcp_register_app()
618 list_for_each_entry(i, &ipvs->tcp_apps[hash], p_list) { in tcp_register_app()
624 list_add_rcu(&inc->p_list, &ipvs->tcp_apps[hash]); in tcp_register_app()
633 tcp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc) in tcp_unregister_app() argument
[all …]
H A Dip_vs_xmit.c206 static inline bool ensure_mtu_is_adequate(struct netns_ipvs *ipvs, int skb_af, in ensure_mtu_is_adequate() argument
213 struct net *net = ipvs->net; in ensure_mtu_is_adequate()
231 if ((rt_mode & IP_VS_RT_MODE_TUNNEL) && !sysctl_pmtu_disc(ipvs)) in ensure_mtu_is_adequate()
248 static inline bool decrement_ttl(struct netns_ipvs *ipvs, in decrement_ttl() argument
252 struct net *net = ipvs->net; in decrement_ttl()
305 __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb, in __ip_vs_get_out_rt() argument
310 struct net *net = ipvs->net; in __ip_vs_get_out_rt()
381 if (!decrement_ttl(ipvs, skb_af, skb)) in __ip_vs_get_out_rt()
410 if (!ensure_mtu_is_adequate(ipvs, skb_af, rt_mode, ipvsh, skb, mtu)) in __ip_vs_get_out_rt()
476 __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 …]
H A Dip_vs_nfct.c14 * Hannes Eder <heder@google.com> Extend NFCT support for FTP, ipvs match
261 h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple); in ip_vs_conn_drop_conntrack()
/linux/include/net/
H A Dip_vs.h40 return net->ipvs; in net_ipvs()
453 struct netns_ipvs *ipvs; member
487 int (*init_netns)(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd);
489 void (*exit_netns)(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd);
491 int (*conn_schedule)(struct netns_ipvs *ipvs,
498 (*conn_in_get)(struct netns_ipvs *ipvs,
504 (*conn_out_get)(struct netns_ipvs *ipvs,
521 int (*register_app)(struct netns_ipvs *ipvs, struct ip_vs_app *inc);
523 void (*unregister_app)(struct netns_ipvs *ipvs, struct ip_vs_app *inc);
545 struct ip_vs_proto_data *ip_vs_proto_data_get(struct netns_ipvs *ipvs,
[all …]
H A Dnet_namespace.h176 struct netns_ipvs *ipvs;
174 struct netns_ipvs *ipvs; global() member
/linux/net/netfilter/
H A Dxt_ipvs.c52 struct netns_ipvs *ipvs = net_ipvs(xt_net(par)); in ipvs_mt() local
90 cp = pp->conn_out_get(ipvs, family, skb, &iph); in ipvs_mt()
H A DMakefile239 obj-$(CONFIG_IP_VS) += ipvs/
H A DKconfig1393 tristate '"ipvs" match support'
1674 source "net/netfilter/ipvs/Kconfig"
/linux/Documentation/networking/
H A Dipvs-sysctl.rst35 Controls how ipvs will deal with connections that are detected
190 If set, ipvs will set the ipvs_property on all packets which are of
193 packets that have been tunneled to the ipvs host (i.e. to prevent
194 ipvs routing loops when ipvs is also acting as a real server).
/linux/tools/testing/selftests/net/netfilter/
H A DMakefile22 ipvs.sh \
/linux/Documentation/translations/zh_CN/networking/
H A Dindex.rst93 * ipvs-sysctl
/linux/
H A DMAINTAINERS13475 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git
13476 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git
13477 F: Documentation/networking/ipvs-sysctl.rst
13480 F: net/netfilter/ipvs/