/net/netfilter/ |
D | x_tables.c | 74 u_int8_t af = target->family; in xt_register_target() local 76 mutex_lock(&xt[af].mutex); in xt_register_target() 77 list_add(&target->list, &xt[af].target); in xt_register_target() 78 mutex_unlock(&xt[af].mutex); in xt_register_target() 86 u_int8_t af = target->family; in xt_unregister_target() local 88 mutex_lock(&xt[af].mutex); in xt_unregister_target() 90 mutex_unlock(&xt[af].mutex); in xt_unregister_target() 124 u_int8_t af = match->family; in xt_register_match() local 126 mutex_lock(&xt[af].mutex); in xt_register_match() 127 list_add(&match->list, &xt[af].match); in xt_register_match() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_proto_ah_esp.c | 44 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() 76 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_in_get() 77 IP_VS_DBG_ADDR(af, &iph->daddr)); 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() 98 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_out_get() [all …]
|
D | ip_vs_proto_udp.c | 32 udp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in udp_conn_schedule() argument 58 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule() 61 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule() 98 udp_fast_csum_update(int af, struct udphdr *uhdr, in udp_fast_csum_update() argument 104 if (af == AF_INET6) in udp_fast_csum_update() 120 udp_partial_csum_update(int af, struct udphdr *uhdr, in udp_partial_csum_update() argument 126 if (af == AF_INET6) in udp_partial_csum_update() 150 if (cp->af == AF_INET6 && iph->fragoffs) in udp_snat_handler() 163 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) in udp_snat_handler() 185 udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, in udp_snat_handler() [all …]
|
D | ip_vs_conn.c | 112 static unsigned int ip_vs_conn_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_conn_hashkey() argument 117 if (af == AF_INET6) 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() 278 cp->af == p->af && in __ip_vs_conn_in_get() 279 ip_vs_addr_equal(p->af, p->caddr, &cp->caddr) && in __ip_vs_conn_in_get() 280 ip_vs_addr_equal(p->af, p->vaddr, &cp->vaddr) && in __ip_vs_conn_in_get() 310 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_in_get() 311 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_in_get() 319 int af, const struct sk_buff *skb, in ip_vs_conn_fill_param_proto() argument [all …]
|
D | ip_vs_core.c | 219 ip_vs_conn_fill_param(svc->ipvs, svc->af, protocol, caddr, cport, vaddr, in ip_vs_conn_fill_param_persist() 262 if (svc->af == AF_INET6) in ip_vs_sched_persist() 271 IP_VS_DBG_ADDR(svc->af, src_addr), ntohs(src_port), in ip_vs_sched_persist() 272 IP_VS_DBG_ADDR(svc->af, dst_addr), ntohs(dst_port), in ip_vs_sched_persist() 273 IP_VS_DBG_ADDR(svc->af, &snet)); in ip_vs_sched_persist() 354 ct = ip_vs_conn_new(¶m, dest->af, &dest->addr, dport, in ip_vs_sched_persist() 380 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, src_addr, in ip_vs_sched_persist() 383 cp = ip_vs_conn_new(¶m, dest->af, &dest->addr, dport, flags, dest, in ip_vs_sched_persist() 463 IP_VS_DBG_PKT(12, svc->af, pp, skb, iph->off, in ip_vs_schedule() 473 cp = pp->conn_in_get(svc->ipvs, svc->af, skb, iph); in ip_vs_schedule() [all …]
|
D | ip_vs_lblc.c | 94 int af; /* address family */ member 153 ip_vs_lblc_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_lblc_hashkey() argument 158 if (af == AF_INET6) in ip_vs_lblc_hashkey() 173 unsigned int hash = ip_vs_lblc_hashkey(en->af, &en->addr); in ip_vs_lblc_hash() 182 ip_vs_lblc_get(int af, struct ip_vs_lblc_table *tbl, in ip_vs_lblc_get() argument 185 unsigned int hash = ip_vs_lblc_hashkey(af, addr); in ip_vs_lblc_get() 189 if (ip_vs_addr_equal(af, &en->addr, addr)) in ip_vs_lblc_get() 202 u16 af, struct ip_vs_dest *dest) in ip_vs_lblc_new() argument 206 en = ip_vs_lblc_get(af, tbl, daddr); in ip_vs_lblc_new() 216 en->af = af; in ip_vs_lblc_new() [all …]
|
D | ip_vs_proto_tcp.c | 35 tcp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in tcp_conn_schedule() argument 69 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule() 72 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule() 109 tcp_fast_csum_update(int af, struct tcphdr *tcph, in tcp_fast_csum_update() argument 115 if (af == AF_INET6) in tcp_fast_csum_update() 130 tcp_partial_csum_update(int af, struct tcphdr *tcph, in tcp_partial_csum_update() argument 136 if (af == AF_INET6) in tcp_partial_csum_update() 160 if (cp->af == AF_INET6 && iph->fragoffs) in tcp_snat_handler() 173 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) in tcp_snat_handler() 191 tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, in tcp_snat_handler() [all …]
|
D | ip_vs_ctl.c | 266 ip_vs_svc_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_svc_hashkey() argument 274 if (af == AF_INET6) in ip_vs_svc_hashkey() 312 hash = ip_vs_svc_hashkey(svc->ipvs, svc->af, svc->protocol, in ip_vs_svc_hash() 360 __ip_vs_service_find(struct netns_ipvs *ipvs, int af, __u16 protocol, in __ip_vs_service_find() argument 367 hash = ip_vs_svc_hashkey(ipvs, af, protocol, vaddr, vport); in __ip_vs_service_find() 370 if ((svc->af == af) in __ip_vs_service_find() 371 && ip_vs_addr_equal(af, &svc->addr, vaddr) in __ip_vs_service_find() 388 __ip_vs_svc_fwm_find(struct netns_ipvs *ipvs, int af, __u32 fwmark) in __ip_vs_svc_fwm_find() argument 397 if (svc->fwmark == fwmark && svc->af == af in __ip_vs_svc_fwm_find() 409 ip_vs_service_find(struct netns_ipvs *ipvs, int af, __u32 fwmark, __u16 protocol, in ip_vs_service_find() argument [all …]
|
D | ip_vs_lblcr.c | 204 IP_VS_DBG_ADDR(least->af, &least->addr), in ip_vs_dest_set_min() 250 IP_VS_DBG_ADDR(most->af, &most->addr), ntohs(most->port), in ip_vs_dest_set_max() 264 int af; /* address family */ member 316 ip_vs_lblcr_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_lblcr_hashkey() argument 321 if (af == AF_INET6) in ip_vs_lblcr_hashkey() 336 unsigned int hash = ip_vs_lblcr_hashkey(en->af, &en->addr); in ip_vs_lblcr_hash() 345 ip_vs_lblcr_get(int af, struct ip_vs_lblcr_table *tbl, in ip_vs_lblcr_get() argument 348 unsigned int hash = ip_vs_lblcr_hashkey(af, addr); in ip_vs_lblcr_get() 352 if (ip_vs_addr_equal(af, &en->addr, addr)) in ip_vs_lblcr_get() 365 u16 af, struct ip_vs_dest *dest) in ip_vs_lblcr_new() argument [all …]
|
D | ip_vs_sh.c | 89 ip_vs_sh_hashkey(int af, const union nf_inet_addr *addr, in ip_vs_sh_hashkey() argument 95 if (af == AF_INET6) in ip_vs_sh_hashkey() 111 unsigned int hash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get() 133 ihash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get_fallback() 141 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_sh_get_fallback() 148 hash = ip_vs_sh_hashkey(svc->af, addr, port, roffset); in ip_vs_sh_get_fallback() 156 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_get_fallback() 195 i, IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_reassign() 341 IP_VS_DBG_ADDR(svc->af, hash_addr), in ip_vs_sh_schedule() 342 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_schedule()
|
D | ip_vs_dh.c | 75 static inline unsigned int ip_vs_dh_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_dh_hashkey() argument 80 if (af == AF_INET6) in ip_vs_dh_hashkey() 92 ip_vs_dh_get(int af, struct ip_vs_dh_state *s, const union nf_inet_addr *addr) in ip_vs_dh_get() argument 94 return rcu_dereference(s->buckets[ip_vs_dh_hashkey(af, addr)].dest); in ip_vs_dh_get() 226 dest = ip_vs_dh_get(svc->af, s, &iph->daddr); in ip_vs_dh_schedule() 236 IP_VS_DBG_ADDR(svc->af, &iph->daddr), in ip_vs_dh_schedule() 237 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_dh_schedule()
|
D | ip_vs_pe_sip.c | 73 retc = ip_vs_fill_iph_skb(p->af, skb, false, &iph); in ip_vs_sip_fill_param() 112 if (ct->af == p->af && in ip_vs_sip_ct_match() 113 ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) && in ip_vs_sip_ct_match() 116 ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : p->af, in ip_vs_sip_ct_match() 128 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_sip_ct_match()
|
D | ip_vs_proto_sctp.c | 12 sctp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in sctp_conn_schedule() argument 44 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule() 47 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule() 96 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_snat_handler() 108 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) in sctp_snat_handler() 143 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_dnat_handler() 155 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) in sctp_dnat_handler() 183 sctp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) in sctp_csum_check() argument 190 if (af == AF_INET6) in sctp_csum_check() 205 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, in sctp_csum_check() [all …]
|
D | ip_vs_xmit.c | 569 !ip_vs_addr_equal(cp->af, &cp->vaddr, &cp->daddr)) in ip_vs_nat_send_or_cont() 628 if (__ip_vs_get_out_rt(cp->ipvs, cp->af, skb, NULL, iph->daddr, in ip_vs_bypass_xmit() 660 if (__ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, NULL, in ip_vs_bypass_xmit_v6() 708 local = __ip_vs_get_out_rt(cp->ipvs, cp->af, skb, cp->dest, cp->daddr.ip, in ip_vs_nat_xmit() 797 local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, in ip_vs_nat_xmit_v6() 985 local = __ip_vs_get_out_rt(ipvs, cp->af, skb, cp->dest, cp->daddr.ip, in ip_vs_tunnel_xmit() 1007 skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, in ip_vs_tunnel_xmit() 1013 if (iptunnel_handle_offloads(skb, __tun_gso_type_mask(AF_INET, cp->af))) in ip_vs_tunnel_xmit() 1077 local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, in ip_vs_tunnel_xmit_v6() 1098 skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, in ip_vs_tunnel_xmit_v6() [all …]
|
D | ip_vs_sync.c | 547 if (unlikely(cp->af != AF_INET)) in ip_vs_sync_conn_v0() 669 if (cp->af == AF_INET6) in ip_vs_sync_conn() 719 s->v4.type = (cp->af == AF_INET6 ? STYPE_F_INET6 : 0); in ip_vs_sync_conn() 732 if (cp->af == AF_INET6) { in ip_vs_sync_conn() 786 ip_vs_conn_fill_param_sync(struct netns_ipvs *ipvs, int af, union ip_vs_sync_conn *sc, in ip_vs_conn_fill_param_sync() argument 792 if (af == AF_INET6) in ip_vs_conn_fill_param_sync() 793 ip_vs_conn_fill_param(ipvs, af, sc->v6.protocol, in ip_vs_conn_fill_param_sync() 800 ip_vs_conn_fill_param(ipvs, af, sc->v4.protocol, in ip_vs_conn_fill_param_sync() 1077 unsigned int af, state, pe_data_len=0, pe_name_len=0; in ip_vs_proc_sync_conn() local 1086 af = AF_INET6; in ip_vs_proc_sync_conn() [all …]
|
/net/sctp/ |
D | bind_addr.c | 231 struct sctp_af *af; in sctp_bind_addrs_to_raw() local 256 af = sctp_get_af_specific(addr->a.v4.sin_family); in sctp_bind_addrs_to_raw() 257 len = af->to_addr_param(&addr->a, &rawaddr); in sctp_bind_addrs_to_raw() 280 struct sctp_af *af; in sctp_raw_to_bind_addrs() local 287 af = sctp_get_af_specific(param_type2af(param->type)); in sctp_raw_to_bind_addrs() 288 if (unlikely(!af)) { in sctp_raw_to_bind_addrs() 294 af->from_addr_param(&addr, rawaddr, htons(port), 0); in sctp_raw_to_bind_addrs() 379 struct sctp_af *af; in sctp_bind_addr_state() local 382 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_bind_addr_state() 383 if (unlikely(!af)) in sctp_bind_addr_state() [all …]
|
D | input.c | 107 struct sctp_af *af; in sctp_rcv() local 146 af = sctp_get_af_specific(family); in sctp_rcv() 147 if (unlikely(!af)) in sctp_rcv() 149 SCTP_INPUT_CB(skb)->af = af; in sctp_rcv() 152 af->from_skb(&src, skb, 1); in sctp_rcv() 153 af->from_skb(&dest, skb, 0); in sctp_rcv() 166 if (!af->addr_valid(&src, NULL, skb) || in sctp_rcv() 167 !af->addr_valid(&dest, NULL, skb)) in sctp_rcv() 183 if (sk->sk_bound_dev_if && (sk->sk_bound_dev_if != af->skb_iif(skb))) { in sctp_rcv() 479 struct sctp_af *af; in sctp_err_lookup() local [all …]
|
D | proc.c | 131 struct sctp_af *af; in sctp_seq_dump_local_addrs() local 151 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_seq_dump_local_addrs() 152 if (primary && af->cmp_addr(addr, primary)) { in sctp_seq_dump_local_addrs() 155 af->seq_dump_addr(seq, addr); in sctp_seq_dump_local_addrs() 165 struct sctp_af *af; in sctp_seq_dump_remote_addrs() local 172 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_seq_dump_remote_addrs() 173 if (af->cmp_addr(addr, primary)) { in sctp_seq_dump_remote_addrs() 176 af->seq_dump_addr(seq, addr); in sctp_seq_dump_remote_addrs()
|
D | socket.c | 205 struct sctp_af *af; in sctp_verify_addr() local 208 af = sctp_sockaddr_af(sctp_sk(sk), addr, len); in sctp_verify_addr() 209 if (!af) in sctp_verify_addr() 213 if (!af->addr_valid(addr, sctp_sk(sk), NULL)) in sctp_verify_addr() 268 struct sctp_af *af = sctp_get_af_specific(addr->ss_family); in sctp_addr_id2transport() local 272 if (!af || sctp_verify_addr(sk, laddr, af->sockaddr_len)) in sctp_addr_id2transport() 329 struct sctp_af *af; in sctp_sockaddr_af() local 348 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_sockaddr_af() 350 if (len < af->sockaddr_len) in sctp_sockaddr_af() 353 return af; in sctp_sockaddr_af() [all …]
|
D | sm_make_chunk.c | 113 return SCTP_INPUT_CB(skb)->af->skb_iif(skb); in sctp_chunk_iif() 1597 SCTP_INPUT_CB(skb)->af->from_skb(&asoc->c.peer_addr, skb, 1); in sctp_make_temp_asoc() 2311 struct sctp_af *af; in sctp_process_init() local 2336 af = sctp_get_af_specific(param_type2af(param.p->type)); in sctp_process_init() 2337 af->from_addr_param(&addr, param.addr, in sctp_process_init() 2511 struct sctp_af *af; in sctp_process_param() local 2531 af = sctp_get_af_specific(param_type2af(param.p->type)); in sctp_process_param() 2532 af->from_addr_param(&addr, param.addr, htons(asoc->peer.port), 0); in sctp_process_param() 2624 af = sctp_get_af_specific(param_type2af(addr_param->p.type)); in sctp_process_param() 2625 if (af == NULL) in sctp_process_param() [all …]
|
D | ipv6.c | 875 struct sctp_af *af; in sctp_inet6_bind_verify() local 879 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_inet6_bind_verify() 901 af = opt->pf->af; in sctp_inet6_bind_verify() 903 return af->available(addr, opt); in sctp_inet6_bind_verify() 911 struct sctp_af *af = NULL; in sctp_inet6_send_verify() local 915 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_inet6_send_verify() 930 af = opt->pf->af; in sctp_inet6_send_verify() 933 return af != NULL; in sctp_inet6_send_verify() 1062 .af = &sctp_af_inet6,
|
D | protocol.c | 172 struct sctp_af *af; in sctp_get_local_addr_list() local 177 af = list_entry(pos, struct sctp_af, list); in sctp_get_local_addr_list() 178 af->copy_addrlist(&net->sctp.local_addr_list, dev); in sctp_get_local_addr_list() 844 int sctp_register_af(struct sctp_af *af) in sctp_register_af() argument 846 switch (af->sa_family) { in sctp_register_af() 850 sctp_af_v4_specific = af; in sctp_register_af() 855 sctp_af_v6_specific = af; in sctp_register_af() 861 INIT_LIST_HEAD(&af->list); in sctp_register_af() 862 list_add_tail(&af->list, &sctp_address_families); in sctp_register_af() 1004 .af = &sctp_af_inet
|
D | inqueue.c | 211 cb->af = head_cb->af; in sctp_inq_pop()
|
D | transport.c | 277 struct sctp_af *af = transport->af_specific; in sctp_transport_route() local 279 af->get_dst(transport, saddr, &transport->fl, sctp_opt2sk(opt)); in sctp_transport_route() 284 af->get_saddr(opt, transport, &transport->fl); in sctp_transport_route()
|
/net/rxrpc/ |
D | Makefile | 5 af-rxrpc-y := \ 29 af-rxrpc-$(CONFIG_PROC_FS) += proc.o 30 af-rxrpc-$(CONFIG_RXKAD) += rxkad.o 31 af-rxrpc-$(CONFIG_SYSCTL) += sysctl.o 33 obj-$(CONFIG_AF_RXRPC) += af-rxrpc.o
|