Home
last modified time | relevance | path

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

123

/Linux-v4.19/include/net/
Droute.h140 struct flowi4 fl4 = { in ip_route_output() local
146 return ip_route_output_key(net, &fl4); in ip_route_output()
149 static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4, in ip_route_output_ports() argument
155 flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos, in ip_route_output_ports()
160 security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); in ip_route_output_ports()
161 return ip_route_output_flow(net, fl4, sk); in ip_route_output_ports()
164 static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 *fl4, in ip_route_output_gre() argument
168 memset(fl4, 0, sizeof(*fl4)); in ip_route_output_gre()
169 fl4->flowi4_oif = oif; in ip_route_output_gre()
170 fl4->daddr = daddr; in ip_route_output_gre()
[all …]
Dflow.h96 static inline void flowi4_init_output(struct flowi4 *fl4, int oif, in flowi4_init_output() argument
103 fl4->flowi4_oif = oif; in flowi4_init_output()
104 fl4->flowi4_iif = LOOPBACK_IFINDEX; in flowi4_init_output()
105 fl4->flowi4_mark = mark; in flowi4_init_output()
106 fl4->flowi4_tos = tos; in flowi4_init_output()
107 fl4->flowi4_scope = scope; in flowi4_init_output()
108 fl4->flowi4_proto = proto; in flowi4_init_output()
109 fl4->flowi4_flags = flags; in flowi4_init_output()
110 fl4->flowi4_secid = 0; in flowi4_init_output()
111 fl4->flowi4_tun_key.tun_id = 0; in flowi4_init_output()
[all …]
Dip_tunnels.h259 static inline void ip_tunnel_init_flow(struct flowi4 *fl4, in ip_tunnel_init_flow() argument
265 memset(fl4, 0, sizeof(*fl4)); in ip_tunnel_init_flow()
266 fl4->flowi4_oif = oif; in ip_tunnel_init_flow()
267 fl4->daddr = daddr; in ip_tunnel_init_flow()
268 fl4->saddr = saddr; in ip_tunnel_init_flow()
269 fl4->flowi4_tos = tos; in ip_tunnel_init_flow()
270 fl4->flowi4_proto = proto; in ip_tunnel_init_flow()
271 fl4->fl4_gre_key = key; in ip_tunnel_init_flow()
272 fl4->flowi4_mark = mark; in ip_tunnel_init_flow()
313 u8 *protocol, struct flowi4 *fl4);
[all …]
Dip_fib.h299 struct flowi4 *fl4, in fib4_rules_early_flow_dissect() argument
354 struct flowi4 *fl4, in fib4_rules_early_flow_dissect() argument
363 fl4->fl4_sport = flkeys->ports.src; in fib4_rules_early_flow_dissect()
364 fl4->fl4_dport = flkeys->ports.dst; in fib4_rules_early_flow_dissect()
365 fl4->flowi4_proto = flkeys->basic.ip_proto; in fib4_rules_early_flow_dissect()
400 int fib_multipath_hash(const struct net *net, const struct flowi4 *fl4,
405 struct flowi4 *fl4, const struct sk_buff *skb);
/Linux-v4.19/net/ipv4/
Dxfrm4_policy.c21 static struct dst_entry *__xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4, in __xfrm4_dst_lookup() argument
29 memset(fl4, 0, sizeof(*fl4)); in __xfrm4_dst_lookup()
30 fl4->daddr = daddr->a4; in __xfrm4_dst_lookup()
31 fl4->flowi4_tos = tos; in __xfrm4_dst_lookup()
32 fl4->flowi4_oif = l3mdev_master_ifindex_by_index(net, oif); in __xfrm4_dst_lookup()
33 fl4->flowi4_mark = mark; in __xfrm4_dst_lookup()
35 fl4->saddr = saddr->a4; in __xfrm4_dst_lookup()
37 fl4->flowi4_flags = FLOWI_FLAG_SKIP_NH_OIF; in __xfrm4_dst_lookup()
39 rt = __ip_route_output_key(net, fl4); in __xfrm4_dst_lookup()
51 struct flowi4 fl4; in xfrm4_dst_lookup() local
[all …]
Droute.c517 static void __build_flow_key(const struct net *net, struct flowi4 *fl4, in __build_flow_key() argument
531 flowi4_init_output(fl4, oif, mark, tos, in __build_flow_key()
538 static void build_skb_flow_key(struct flowi4 *fl4, const struct sk_buff *skb, in build_skb_flow_key() argument
548 __build_flow_key(net, fl4, sk, iph, oif, tos, prot, mark, 0); in build_skb_flow_key()
551 static void build_sk_flow_key(struct flowi4 *fl4, const struct sock *sk) in build_sk_flow_key() argument
561 flowi4_init_output(fl4, sk->sk_bound_dev_if, sk->sk_mark, in build_sk_flow_key()
569 static void ip_rt_build_flow_key(struct flowi4 *fl4, const struct sock *sk, in ip_rt_build_flow_key() argument
573 build_skb_flow_key(fl4, skb, sk); in ip_rt_build_flow_key()
575 build_sk_flow_key(fl4, sk); in ip_rt_build_flow_key()
726 static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flowi4 *fl4, in __ip_do_redirect() argument
[all …]
Dnetfilter.c24 struct flowi4 fl4 = {}; in ip_route_me_harder() local
41 fl4.daddr = iph->daddr; in ip_route_me_harder()
42 fl4.saddr = saddr; in ip_route_me_harder()
43 fl4.flowi4_tos = RT_TOS(iph->tos); in ip_route_me_harder()
44 fl4.flowi4_oif = sk ? sk->sk_bound_dev_if : 0; in ip_route_me_harder()
45 if (!fl4.flowi4_oif) in ip_route_me_harder()
46 fl4.flowi4_oif = l3mdev_master_ifindex(dev); in ip_route_me_harder()
47 fl4.flowi4_mark = skb->mark; in ip_route_me_harder()
48 fl4.flowi4_flags = flags; in ip_route_me_harder()
49 rt = ip_route_output_key(net, &fl4); in ip_route_me_harder()
[all …]
Dicmp.c315 struct flowi4 *fl4, int type, int code) in icmpv4_xrlim_allow() argument
330 peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, vif, 1); in icmpv4_xrlim_allow()
368 struct flowi4 *fl4, in icmp_push_reply() argument
375 if (ip_append_data(sk, fl4, icmp_glue_bits, icmp_param, in icmp_push_reply()
394 ip_push_pending_frames(sk, fl4); in icmp_push_reply()
407 struct flowi4 fl4; in icmp_reply() local
443 memset(&fl4, 0, sizeof(fl4)); in icmp_reply()
444 fl4.daddr = daddr; in icmp_reply()
445 fl4.saddr = saddr; in icmp_reply()
446 fl4.flowi4_mark = mark; in icmp_reply()
[all …]
Ddatagram.c27 struct flowi4 *fl4; in __ip4_datagram_connect() local
50 fl4 = &inet->cork.fl.u.ip4; in __ip4_datagram_connect()
51 rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr, in __ip4_datagram_connect()
68 inet->inet_saddr = fl4->saddr; /* Update source address */ in __ip4_datagram_connect()
70 inet->inet_rcv_saddr = fl4->saddr; in __ip4_datagram_connect()
74 inet->inet_daddr = fl4->daddr; in __ip4_datagram_connect()
108 struct flowi4 fl4; in ip4_datagram_release_cb() local
121 rt = ip_route_output_ports(sock_net(sk), &fl4, sk, daddr, in ip4_datagram_release_cb()
Dxfrm4_state.c28 const struct flowi4 *fl4 = &fl->u.ip4; in __xfrm4_init_tempsel() local
30 sel->daddr.a4 = fl4->daddr; in __xfrm4_init_tempsel()
31 sel->saddr.a4 = fl4->saddr; in __xfrm4_init_tempsel()
32 sel->dport = xfrm_flowi_dport(fl, &fl4->uli); in __xfrm4_init_tempsel()
34 sel->sport = xfrm_flowi_sport(fl, &fl4->uli); in __xfrm4_init_tempsel()
39 sel->proto = fl4->flowi4_proto; in __xfrm4_init_tempsel()
40 sel->ifindex = fl4->flowi4_oif; in __xfrm4_init_tempsel()
Dip_output.c417 static void ip_copy_addrs(struct iphdr *iph, const struct flowi4 *fl4) in ip_copy_addrs() argument
419 BUILD_BUG_ON(offsetof(typeof(*fl4), daddr) != in ip_copy_addrs()
420 offsetof(typeof(*fl4), saddr) + sizeof(fl4->saddr)); in ip_copy_addrs()
421 memcpy(&iph->saddr, &fl4->saddr, in ip_copy_addrs()
422 sizeof(fl4->saddr) + sizeof(fl4->daddr)); in ip_copy_addrs()
432 struct flowi4 *fl4; in __ip_queue_xmit() local
442 fl4 = &fl->u.ip4; in __ip_queue_xmit()
461 rt = ip_route_output_ports(net, fl4, sk, in __ip_queue_xmit()
489 ip_copy_addrs(iph, fl4); in __ip_queue_xmit()
860 struct flowi4 *fl4, in __ip_append_data() argument
[all …]
Dfib_frontend.c221 struct flowi4 fl4 = { .daddr = addr }; in __inet_dev_addr_type() local
236 if (!fib_table_lookup(table, &fl4, &res, FIB_LOOKUP_NOREF)) { in __inet_dev_addr_type()
301 struct flowi4 fl4 = { in fib_compute_spec_dst() local
309 if (!fib_lookup(net, &fl4, &res, 0)) in fib_compute_spec_dst()
334 struct flowi4 fl4; in __fib_validate_source() local
337 fl4.flowi4_oif = 0; in __fib_validate_source()
338 fl4.flowi4_iif = l3mdev_master_ifindex_rcu(dev); in __fib_validate_source()
339 if (!fl4.flowi4_iif) in __fib_validate_source()
340 fl4.flowi4_iif = oif ? : LOOPBACK_IFINDEX; in __fib_validate_source()
341 fl4.daddr = src; in __fib_validate_source()
[all …]
Dfib_rules.c174 struct flowi4 *fl4 = &fl->u.ip4; in fib4_rule_match() local
175 __be32 daddr = fl4->daddr; in fib4_rule_match()
176 __be32 saddr = fl4->saddr; in fib4_rule_match()
182 if (r->tos && (r->tos != fl4->flowi4_tos)) in fib4_rule_match()
185 if (rule->ip_proto && (rule->ip_proto != fl4->flowi4_proto)) in fib4_rule_match()
189 !fib_rule_port_inrange(&rule->sport_range, fl4->fl4_sport)) in fib4_rule_match()
193 !fib_rule_port_inrange(&rule->dport_range, fl4->fl4_dport)) in fib4_rule_match()
Draw.c348 static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4, in raw_send_hdrinc() argument
363 ip_local_error(sk, EMSGSIZE, fl4->daddr, inet->inet_dport, in raw_send_hdrinc()
419 iph->saddr = fl4->saddr; in raw_send_hdrinc()
452 static int raw_probe_proto_opt(struct raw_frag_vec *rfv, struct flowi4 *fl4) in raw_probe_proto_opt() argument
456 if (fl4->flowi4_proto != IPPROTO_ICMP) in raw_probe_proto_opt()
466 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
467 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
509 struct flowi4 fl4; in raw_sendmsg() local
631 flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos, in raw_sendmsg()
642 err = raw_probe_proto_opt(&rfv, &fl4); in raw_sendmsg()
[all …]
Dip_tunnel.c307 struct flowi4 fl4; in ip_tunnel_bind_dev() local
310 ip_tunnel_init_flow(&fl4, iph->protocol, iph->daddr, in ip_tunnel_bind_dev()
314 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_bind_dev()
559 struct flowi4 fl4; in ip_md_tunnel_xmit() local
577 ip_tunnel_init_flow(&fl4, proto, key->u.ipv4.dst, key->u.ipv4.src, 0, in ip_md_tunnel_xmit()
581 rt = ip_route_output_key(tunnel->net, &fl4); in ip_md_tunnel_xmit()
613 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, tos, ttl, in ip_md_tunnel_xmit()
632 struct flowi4 fl4; in ip_tunnel_xmit() local
715 ip_tunnel_init_flow(&fl4, protocol, dst, tnl_params->saddr, in ip_tunnel_xmit()
719 if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0) in ip_tunnel_xmit()
[all …]
Dinet_connection_sock.c539 struct flowi4 *fl4, in inet_csk_route_req() argument
550 flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark, in inet_csk_route_req()
556 security_req_classify_flow(req, flowi4_to_flowi(fl4)); in inet_csk_route_req()
557 rt = ip_route_output_flow(net, fl4, sk); in inet_csk_route_req()
582 struct flowi4 *fl4; in inet_csk_route_child_sock() local
586 fl4 = &newinet->cork.fl.u.ip4; in inet_csk_route_child_sock()
588 flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark, in inet_csk_route_child_sock()
594 security_req_classify_flow(req, flowi4_to_flowi(fl4)); in inet_csk_route_child_sock()
595 rt = ip_route_output_flow(net, fl4, sk); in inet_csk_route_child_sock()
1061 struct flowi4 *fl4; in inet_csk_rebuild_route() local
[all …]
Dsyncookies.c297 struct flowi4 fl4; in cookie_v4_check() local
375 flowi4_init_output(&fl4, ireq->ir_iif, ireq->ir_mark, in cookie_v4_check()
380 security_req_classify_flow(req, flowi4_to_flowi(&fl4)); in cookie_v4_check()
381 rt = ip_route_output_key(sock_net(sk), &fl4); in cookie_v4_check()
403 inet_sk(ret)->cork.fl.u.ip4 = fl4; in cookie_v4_check()
/Linux-v4.19/net/ipv4/netfilter/
Dnf_dup_ipv4.c31 struct flowi4 fl4; in nf_dup_ipv4_route() local
33 memset(&fl4, 0, sizeof(fl4)); in nf_dup_ipv4_route()
35 fl4.flowi4_oif = oif; in nf_dup_ipv4_route()
37 fl4.daddr = gw->s_addr; in nf_dup_ipv4_route()
38 fl4.flowi4_tos = RT_TOS(iph->tos); in nf_dup_ipv4_route()
39 fl4.flowi4_scope = RT_SCOPE_UNIVERSE; in nf_dup_ipv4_route()
40 fl4.flowi4_flags = FLOWI_FLAG_KNOWN_NH; in nf_dup_ipv4_route()
41 rt = ip_route_output_key(net, &fl4); in nf_dup_ipv4_route()
Dnft_fib_ipv4.c74 struct flowi4 fl4 = { in nft_fib4_eval() local
121 fl4.flowi4_mark = pkt->skb->mark; in nft_fib4_eval()
123 fl4.flowi4_tos = iph->tos & DSCP_BITS; in nft_fib4_eval()
126 fl4.daddr = iph->daddr; in nft_fib4_eval()
127 fl4.saddr = get_saddr(iph->saddr); in nft_fib4_eval()
129 fl4.daddr = iph->saddr; in nft_fib4_eval()
130 fl4.saddr = get_saddr(iph->daddr); in nft_fib4_eval()
135 if (fib_lookup(nft_net(pkt), &fl4, &res, FIB_LOOKUP_IGNORE_LINKSTATE)) in nft_fib4_eval()
/Linux-v4.19/net/sctp/
Dprotocol.c294 static void sctp_v4_dst_saddr(union sctp_addr *saddr, struct flowi4 *fl4, in sctp_v4_dst_saddr() argument
299 saddr->v4.sin_addr.s_addr = fl4->saddr; in sctp_v4_dst_saddr()
423 struct flowi4 *fl4 = &fl->u.ip4; in sctp_v4_get_dst() local
433 memset(fl4, 0x0, sizeof(struct flowi4)); in sctp_v4_get_dst()
434 fl4->daddr = daddr->v4.sin_addr.s_addr; in sctp_v4_get_dst()
435 fl4->fl4_dport = daddr->v4.sin_port; in sctp_v4_get_dst()
436 fl4->flowi4_proto = IPPROTO_SCTP; in sctp_v4_get_dst()
438 fl4->flowi4_tos = RT_CONN_FLAGS_TOS(asoc->base.sk, tos); in sctp_v4_get_dst()
439 fl4->flowi4_oif = asoc->base.sk->sk_bound_dev_if; in sctp_v4_get_dst()
440 fl4->fl4_sport = htons(asoc->base.bind_addr.port); in sctp_v4_get_dst()
[all …]
/Linux-v4.19/drivers/net/
Dgtp.c382 static struct rtable *ip4_route_output_gtp(struct flowi4 *fl4, in ip4_route_output_gtp() argument
386 memset(fl4, 0, sizeof(*fl4)); in ip4_route_output_gtp()
387 fl4->flowi4_oif = sk->sk_bound_dev_if; in ip4_route_output_gtp()
388 fl4->daddr = daddr; in ip4_route_output_gtp()
389 fl4->saddr = inet_sk(sk)->inet_saddr; in ip4_route_output_gtp()
390 fl4->flowi4_tos = RT_CONN_FLAGS(sk); in ip4_route_output_gtp()
391 fl4->flowi4_proto = sk->sk_protocol; in ip4_route_output_gtp()
393 return ip_route_output_key(sock_net(sk), fl4); in ip4_route_output_gtp()
439 struct flowi4 fl4; member
463 struct flowi4 *fl4, in gtp_set_pktinfo_ipv4() argument
[all …]
Dgeneve.c718 struct flowi4 *fl4, in geneve_get_v4_rt() argument
730 memset(fl4, 0, sizeof(*fl4)); in geneve_get_v4_rt()
731 fl4->flowi4_mark = skb->mark; in geneve_get_v4_rt()
732 fl4->flowi4_proto = IPPROTO_UDP; in geneve_get_v4_rt()
733 fl4->daddr = info->key.u.ipv4.dst; in geneve_get_v4_rt()
734 fl4->saddr = info->key.u.ipv4.src; in geneve_get_v4_rt()
741 fl4->flowi4_tos = RT_TOS(tos); in geneve_get_v4_rt()
745 rt = dst_cache_get_ip4(dst_cache, &fl4->saddr); in geneve_get_v4_rt()
749 rt = ip_route_output_key(geneve->net, fl4); in geneve_get_v4_rt()
751 netdev_dbg(dev, "no route to %pI4\n", &fl4->daddr); in geneve_get_v4_rt()
[all …]
/Linux-v4.19/net/dccp/
Dipv4.c49 struct flowi4 *fl4; in dccp_v4_connect() local
74 fl4 = &inet->cork.fl.u.ip4; in dccp_v4_connect()
75 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in dccp_v4_connect()
88 daddr = fl4->daddr; in dccp_v4_connect()
91 inet->inet_saddr = fl4->saddr; in dccp_v4_connect()
110 rt = ip_route_newports(fl4, rt, orig_sport, orig_dport, in dccp_v4_connect()
458 struct flowi4 fl4 = { in dccp_v4_route_skb() local
468 security_skb_classify_flow(skb, flowi4_to_flowi(&fl4)); in dccp_v4_route_skb()
469 rt = ip_route_output_flow(net, &fl4, sk); in dccp_v4_route_skb()
483 struct flowi4 fl4; in dccp_v4_send_response() local
[all …]
/Linux-v4.19/drivers/infiniband/core/
Daddr.c374 struct flowi4 fl4; in addr4_resolve() local
377 memset(&fl4, 0, sizeof(fl4)); in addr4_resolve()
378 fl4.daddr = dst_ip; in addr4_resolve()
379 fl4.saddr = src_ip; in addr4_resolve()
380 fl4.flowi4_oif = addr->bound_dev_if; in addr4_resolve()
381 rt = ip_route_output_key(addr->net, &fl4); in addr4_resolve()
387 src_in->sin_addr.s_addr = fl4.saddr; in addr4_resolve()
/Linux-v4.19/net/netfilter/
Dxt_TCPMSS.c55 struct flowi4 *fl4 = &fl.u.ip4; in tcpmss_reverse_mtu() local
56 memset(fl4, 0, sizeof(*fl4)); in tcpmss_reverse_mtu()
57 fl4->daddr = ip_hdr(skb)->saddr; in tcpmss_reverse_mtu()

123