/Linux-v6.6/net/ipv6/ |
D | inet6_connection_sock.c | 28 struct flowi6 *fl6, in inet6_csk_route_req() argument 37 memset(fl6, 0, sizeof(*fl6)); in inet6_csk_route_req() 38 fl6->flowi6_proto = proto; in inet6_csk_route_req() 39 fl6->daddr = ireq->ir_v6_rmt_addr; in inet6_csk_route_req() 41 final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final); in inet6_csk_route_req() 43 fl6->saddr = ireq->ir_v6_loc_addr; in inet6_csk_route_req() 44 fl6->flowi6_oif = ireq->ir_iif; in inet6_csk_route_req() 45 fl6->flowi6_mark = ireq->ir_mark; in inet6_csk_route_req() 46 fl6->fl6_dport = ireq->ir_rmt_port; in inet6_csk_route_req() 47 fl6->fl6_sport = htons(ireq->ir_num); in inet6_csk_route_req() [all …]
|
D | icmp.c | 194 struct flowi6 *fl6) in icmpv6_xrlim_allow() argument 208 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow() 223 peer = inet_getpeer_v6(net->ipv6.peers, &fl6->daddr, 1); in icmpv6_xrlim_allow() 236 struct flowi6 *fl6) in icmpv6_rt_has_prefsrc() argument 242 dst = ip6_route_output(net, sk, fl6); in icmpv6_rt_has_prefsrc() 272 void icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, in icmpv6_push_pending_frames() argument 289 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() 290 &fl6->daddr, in icmpv6_push_pending_frames() 291 len, fl6->flowi6_proto, in icmpv6_push_pending_frames() 302 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() [all …]
|
D | ping.c | 70 struct flowi6 fl6; in ping_v6_sendmsg() local 82 memset(&fl6, 0, sizeof(fl6)); in ping_v6_sendmsg() 93 fl6.flowlabel = u->sin6_flowinfo & IPV6_FLOWINFO_MASK; in ping_v6_sendmsg() 100 fl6.flowlabel = np->flow_label; in ping_v6_sendmsg() 125 fl6.flowi6_oif = oif; in ping_v6_sendmsg() 133 err = ip6_datagram_send_ctl(sock_net(sk), sk, msg, &fl6, &ipc6); in ping_v6_sendmsg() 143 fl6.flowi6_proto = IPPROTO_ICMPV6; in ping_v6_sendmsg() 144 fl6.saddr = np->saddr; in ping_v6_sendmsg() 145 fl6.daddr = *daddr; in ping_v6_sendmsg() 146 fl6.flowi6_mark = ipc6.sockc.mark; in ping_v6_sendmsg() [all …]
|
D | raw.c | 503 static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, in rawv6_push_pending_frames() argument 572 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in rawv6_push_pending_frames() 573 total_len, fl6->flowi6_proto, tmp_csum); in rawv6_push_pending_frames() 575 if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) in rawv6_push_pending_frames() 587 struct flowi6 *fl6, struct dst_entry **dstp, in rawv6_send_hdrinc() argument 600 ipv6_local_error(sk, EMSGSIZE, fl6, rt->dst.dev->mtu); in rawv6_send_hdrinc() 682 static int rawv6_probe_proto_opt(struct raw6_frag_vec *rfv, struct flowi6 *fl6) in rawv6_probe_proto_opt() argument 685 switch (fl6->flowi6_proto) { in rawv6_probe_proto_opt() 690 fl6->fl6_icmp_type = rfv->c[0]; in rawv6_probe_proto_opt() 691 fl6->fl6_icmp_code = rfv->c[1]; in rawv6_probe_proto_opt() [all …]
|
D | datagram.c | 41 static void ip6_datagram_flow_key_init(struct flowi6 *fl6, in ip6_datagram_flow_key_init() argument 48 memset(fl6, 0, sizeof(*fl6)); in ip6_datagram_flow_key_init() 49 fl6->flowi6_proto = sk->sk_protocol; in ip6_datagram_flow_key_init() 50 fl6->daddr = sk->sk_v6_daddr; in ip6_datagram_flow_key_init() 51 fl6->saddr = np->saddr; in ip6_datagram_flow_key_init() 52 fl6->flowi6_mark = sk->sk_mark; in ip6_datagram_flow_key_init() 53 fl6->fl6_dport = inet->inet_dport; in ip6_datagram_flow_key_init() 54 fl6->fl6_sport = inet->inet_sport; in ip6_datagram_flow_key_init() 55 fl6->flowlabel = ip6_make_flowinfo(np->tclass, np->flow_label); in ip6_datagram_flow_key_init() 56 fl6->flowi6_uid = sk->sk_uid; in ip6_datagram_flow_key_init() [all …]
|
D | xfrm6_output.c | 21 struct flowi6 fl6; in xfrm6_local_rxpmtu() local 24 fl6.flowi6_oif = sk->sk_bound_dev_if; in xfrm6_local_rxpmtu() 25 fl6.daddr = ipv6_hdr(skb)->daddr; in xfrm6_local_rxpmtu() 27 ipv6_local_rxpmtu(sk, &fl6, mtu); in xfrm6_local_rxpmtu() 32 struct flowi6 fl6; in xfrm6_local_error() local 37 fl6.fl6_dport = inet_sk(sk)->inet_dport; in xfrm6_local_error() 38 fl6.daddr = hdr->daddr; in xfrm6_local_error() 40 ipv6_local_error(sk, EMSGSIZE, &fl6, mtu); in xfrm6_local_error()
|
D | syncookies.c | 227 struct flowi6 fl6; in cookie_v6_check() local 228 memset(&fl6, 0, sizeof(fl6)); in cookie_v6_check() 229 fl6.flowi6_proto = IPPROTO_TCP; in cookie_v6_check() 230 fl6.daddr = ireq->ir_v6_rmt_addr; in cookie_v6_check() 231 final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final); in cookie_v6_check() 232 fl6.saddr = ireq->ir_v6_loc_addr; in cookie_v6_check() 233 fl6.flowi6_oif = ireq->ir_iif; in cookie_v6_check() 234 fl6.flowi6_mark = ireq->ir_mark; in cookie_v6_check() 235 fl6.fl6_dport = ireq->ir_rmt_port; in cookie_v6_check() 236 fl6.fl6_sport = inet_sk(sk)->inet_sport; in cookie_v6_check() [all …]
|
D | ip6_output.c | 249 int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, in ip6_xmit() argument 254 struct in6_addr *first_hop = &fl6->daddr; in ip6_xmit() 262 u8 proto = fl6->flowi6_proto; in ip6_xmit() 287 &fl6->saddr); in ip6_xmit() 316 ip6_flow_hdr(hdr, tclass, ip6_make_flowlabel(net, skb, fl6->flowlabel, in ip6_xmit() 317 ip6_autoflowlabel(net, np), fl6)); in ip6_xmit() 323 hdr->saddr = fl6->saddr; in ip6_xmit() 353 ipv6_local_error((struct sock *)sk, EMSGSIZE, fl6, mtu); in ip6_xmit() 1043 const struct flowi6 *fl6) in ip6_sk_dst_check() argument 1074 if (ip6_rt_check(&rt->rt6i_dst, &fl6->daddr, np->daddr_cache) || in ip6_sk_dst_check() [all …]
|
D | fib6_rules.c | 64 int fib6_lookup(struct net *net, int oif, struct flowi6 *fl6, in fib6_lookup() argument 77 l3mdev_update_flow(net, flowi6_to_flowi(fl6)); in fib6_lookup() 80 flowi6_to_flowi(fl6), flags, &arg); in fib6_lookup() 83 fl6, res, flags); in fib6_lookup() 86 oif, fl6, res, flags); in fib6_lookup() 92 struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, in fib6_rule_lookup() argument 106 l3mdev_update_flow(net, flowi6_to_flowi(fl6)); in fib6_rule_lookup() 109 flowi6_to_flowi(fl6), flags, &arg); in fib6_rule_lookup() 117 net, net->ipv6.fib6_local_tbl, fl6, skb, flags); in fib6_rule_lookup() 122 net, net->ipv6.fib6_main_tbl, fl6, skb, flags); in fib6_rule_lookup() [all …]
|
D | udp.c | 1211 static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6, in udp_v6_send_skb() argument 1227 uh->source = fl6->fl6_sport; in udp_v6_send_skb() 1228 uh->dest = fl6->fl6_dport; in udp_v6_send_skb() 1270 udp6_hwcsum_outgoing(sk, skb, &fl6->saddr, &fl6->daddr, len); in udp_v6_send_skb() 1276 uh->check = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in udp_v6_send_skb() 1277 len, fl6->flowi6_proto, csum); in udp_v6_send_skb() 1329 struct flowi6 *fl6 = &cork.fl.u.ip6; in udpv6_sendmsg() local 1421 memset(fl6, 0, sizeof(*fl6)); in udpv6_sendmsg() 1427 fl6->fl6_dport = sin6->sin6_port; in udpv6_sendmsg() 1431 fl6->flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK; in udpv6_sendmsg() [all …]
|
D | ip6_gre.c | 633 struct flowi6 *fl6, __u8 *dsfield, in prepare_ip6gre_xmit_ipv4() argument 642 memcpy(fl6, &t->fl.u.ip6, sizeof(*fl6)); in prepare_ip6gre_xmit_ipv4() 650 fl6->flowi6_mark = skb->mark; in prepare_ip6gre_xmit_ipv4() 652 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv4() 654 fl6->flowi6_uid = sock_net_uid(dev_net(dev), NULL); in prepare_ip6gre_xmit_ipv4() 659 struct flowi6 *fl6, __u8 *dsfield, in prepare_ip6gre_xmit_ipv6() argument 684 memcpy(fl6, &t->fl.u.ip6, sizeof(*fl6)); in prepare_ip6gre_xmit_ipv6() 692 fl6->flowlabel |= ip6_flowlabel(ipv6h); in prepare_ip6gre_xmit_ipv6() 695 fl6->flowi6_mark = skb->mark; in prepare_ip6gre_xmit_ipv6() 697 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv6() [all …]
|
D | xfrm6_policy.c | 31 struct flowi6 fl6; in xfrm6_dst_lookup() local 35 memset(&fl6, 0, sizeof(fl6)); in xfrm6_dst_lookup() 36 fl6.flowi6_l3mdev = l3mdev_master_ifindex_by_index(net, oif); in xfrm6_dst_lookup() 37 fl6.flowi6_mark = mark; in xfrm6_dst_lookup() 38 memcpy(&fl6.daddr, daddr, sizeof(fl6.daddr)); in xfrm6_dst_lookup() 40 memcpy(&fl6.saddr, saddr, sizeof(fl6.saddr)); in xfrm6_dst_lookup() 42 dst = ip6_route_output(net, NULL, &fl6); in xfrm6_dst_lookup()
|
D | fou6.c | 22 struct flowi6 *fl6, u8 *protocol, __be16 sport) in fou6_build_udp() argument 35 &fl6->saddr, &fl6->daddr, skb->len); in fou6_build_udp() 41 u8 *protocol, struct flowi6 *fl6) in fou6_build_header() argument 52 fou6_build_udp(skb, e, fl6, protocol, sport); in fou6_build_header() 58 u8 *protocol, struct flowi6 *fl6) in gue6_build_header() argument 69 fou6_build_udp(skb, e, fl6, protocol, sport); in gue6_build_header()
|
D | route.c | 414 struct flowi6 *fl6, int oif, bool have_oif_match, in fib6_select_path() argument 432 if (!fl6->mp_hash && in fib6_select_path() 434 fl6->mp_hash = rt6_multipath_hash(net, fl6, skb, NULL); in fib6_select_path() 437 nexthop_path_fib6_result(res, fl6->mp_hash); in fib6_select_path() 441 if (fl6->mp_hash <= atomic_read(&match->fib6_nh->fib_nh_upper_bound)) in fib6_select_path() 450 if (fl6->mp_hash > nh_upper_bound) in fib6_select_path() 1205 struct flowi6 *fl6, in ip6_pol_route_lookup() argument 1214 fn = fib6_node_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr); in ip6_pol_route_lookup() 1220 rt6_device_match(net, &res, &fl6->saddr, fl6->flowi6_oif, in ip6_pol_route_lookup() 1224 fn = fib6_backtrack(fn, &fl6->saddr); in ip6_pol_route_lookup() [all …]
|
D | rpl_iptunnel.c | 221 struct flowi6 fl6; in rpl_output() local 223 memset(&fl6, 0, sizeof(fl6)); in rpl_output() 224 fl6.daddr = hdr->daddr; in rpl_output() 225 fl6.saddr = hdr->saddr; in rpl_output() 226 fl6.flowlabel = ip6_flowinfo(hdr); in rpl_output() 227 fl6.flowi6_mark = skb->mark; in rpl_output() 228 fl6.flowi6_proto = hdr->nexthdr; in rpl_output() 230 dst = ip6_route_output(net, NULL, &fl6); in rpl_output() 238 dst_cache_set_ip6(&rlwt->cache, dst, &fl6.saddr); in rpl_output()
|
/Linux-v6.6/net/ipv6/netfilter/ |
D | nft_fib_ipv6.c | 22 static int nft_fib6_flowi_init(struct flowi6 *fl6, const struct nft_fib *priv, in nft_fib6_flowi_init() argument 30 fl6->daddr = iph->daddr; in nft_fib6_flowi_init() 31 fl6->saddr = iph->saddr; in nft_fib6_flowi_init() 35 fl6->flowi6_iif = nft_out(pkt)->ifindex; in nft_fib6_flowi_init() 37 fl6->daddr = iph->saddr; in nft_fib6_flowi_init() 38 fl6->saddr = iph->daddr; in nft_fib6_flowi_init() 41 if (ipv6_addr_type(&fl6->daddr) & IPV6_ADDR_LINKLOCAL) { in nft_fib6_flowi_init() 43 fl6->flowi6_oif = get_ifindex(dev ? dev : pkt->skb->dev); in nft_fib6_flowi_init() 45 fl6->flowi6_l3mdev = l3mdev_master_ifindex_rcu(dev); in nft_fib6_flowi_init() 48 if (ipv6_addr_type(&fl6->saddr) & IPV6_ADDR_UNICAST) in nft_fib6_flowi_init() [all …]
|
D | nf_dup_ipv6.c | 24 struct flowi6 fl6; in nf_dup_ipv6_route() local 26 memset(&fl6, 0, sizeof(fl6)); in nf_dup_ipv6_route() 28 fl6.flowi6_oif = oif; in nf_dup_ipv6_route() 30 fl6.daddr = *gw; in nf_dup_ipv6_route() 31 fl6.flowlabel = (__force __be32)(((iph->flow_lbl[0] & 0xF) << 16) | in nf_dup_ipv6_route() 33 fl6.flowi6_flags = FLOWI_FLAG_KNOWN_NH; in nf_dup_ipv6_route() 34 dst = ip6_route_output(net, NULL, &fl6); in nf_dup_ipv6_route()
|
D | nf_reject_ipv6.c | 289 struct flowi6 fl6; in nf_send_reset6() local 301 memset(&fl6, 0, sizeof(fl6)); in nf_send_reset6() 302 fl6.flowi6_proto = IPPROTO_TCP; in nf_send_reset6() 303 fl6.saddr = oip6h->daddr; in nf_send_reset6() 304 fl6.daddr = oip6h->saddr; in nf_send_reset6() 305 fl6.fl6_sport = otcph->dest; in nf_send_reset6() 306 fl6.fl6_dport = otcph->source; in nf_send_reset6() 309 nf_ip6_route(net, &dst, flowi6_to_flowi(&fl6), false); in nf_send_reset6() 315 fl6.flowi6_oif = l3mdev_master_ifindex(skb_dst(oldskb)->dev); in nf_send_reset6() 316 fl6.flowi6_mark = IP6_REPLY_MARK(net, oldskb->mark); in nf_send_reset6() [all …]
|
D | ip6t_rpfilter.c | 38 struct flowi6 fl6 = { in rpfilter_lookup_reverse6() local 49 memcpy(&fl6.saddr, &iph->daddr, sizeof(struct in6_addr)); in rpfilter_lookup_reverse6() 55 fl6.flowi6_mark = flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0; in rpfilter_lookup_reverse6() 59 fl6.flowi6_oif = dev->ifindex; in rpfilter_lookup_reverse6() 61 fl6.flowi6_oif = dev->ifindex; in rpfilter_lookup_reverse6() 63 rt = (void *)ip6_route_lookup(net, &fl6, skb, lookup_flags); in rpfilter_lookup_reverse6()
|
/Linux-v6.6/net/l2tp/ |
D | l2tp_ip6.c | 498 struct flowi6 fl6; in l2tp_ip6_sendmsg() local 516 memset(&fl6, 0, sizeof(fl6)); in l2tp_ip6_sendmsg() 518 fl6.flowi6_mark = READ_ONCE(sk->sk_mark); in l2tp_ip6_sendmsg() 519 fl6.flowi6_uid = sk->sk_uid; in l2tp_ip6_sendmsg() 532 fl6.flowlabel = lsa->l2tp_flowinfo & IPV6_FLOWINFO_MASK; in l2tp_ip6_sendmsg() 533 if (fl6.flowlabel & IPV6_FLOWLABEL_MASK) { in l2tp_ip6_sendmsg() 534 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); in l2tp_ip6_sendmsg() 550 fl6.flowi6_oif = lsa->l2tp_scope_id; in l2tp_ip6_sendmsg() 556 fl6.flowlabel = np->flow_label; in l2tp_ip6_sendmsg() 559 if (fl6.flowi6_oif == 0) in l2tp_ip6_sendmsg() [all …]
|
/Linux-v6.6/net/dccp/ |
D | ipv6.c | 202 struct flowi6 fl6; in dccp_v6_send_response() local 206 memset(&fl6, 0, sizeof(fl6)); in dccp_v6_send_response() 207 fl6.flowi6_proto = IPPROTO_DCCP; in dccp_v6_send_response() 208 fl6.daddr = ireq->ir_v6_rmt_addr; in dccp_v6_send_response() 209 fl6.saddr = ireq->ir_v6_loc_addr; in dccp_v6_send_response() 210 fl6.flowlabel = 0; in dccp_v6_send_response() 211 fl6.flowi6_oif = ireq->ir_iif; in dccp_v6_send_response() 212 fl6.fl6_dport = ireq->ir_rmt_port; in dccp_v6_send_response() 213 fl6.fl6_sport = htons(ireq->ir_num); in dccp_v6_send_response() 214 security_req_classify_flow(req, flowi6_to_flowi_common(&fl6)); in dccp_v6_send_response() [all …]
|
/Linux-v6.6/drivers/net/ethernet/chelsio/libcxgb/ |
D | libcxgb_cm.c | 129 struct flowi6 fl6; in cxgb_find_route6() local 131 memset(&fl6, 0, sizeof(fl6)); in cxgb_find_route6() 132 memcpy(&fl6.daddr, peer_ip, 16); in cxgb_find_route6() 133 memcpy(&fl6.saddr, local_ip, 16); in cxgb_find_route6() 134 if (ipv6_addr_type(&fl6.daddr) & IPV6_ADDR_LINKLOCAL) in cxgb_find_route6() 135 fl6.flowi6_oif = sin6_scope_id; in cxgb_find_route6() 136 dst = ip6_route_output(&init_net, NULL, &fl6); in cxgb_find_route6()
|
/Linux-v6.6/net/sctp/ |
D | ipv6.c | 225 struct flowi6 *fl6 = &t->fl.u.ip6; in sctp_v6_xmit() local 232 skb->len, &fl6->saddr, &fl6->daddr); in sctp_v6_xmit() 238 IP6_ECN_flow_xmit(sk, fl6->flowlabel); in sctp_v6_xmit() 250 res = ip6_xmit(sk, skb, fl6, sk->sk_mark, in sctp_v6_xmit() 264 label = ip6_make_flowlabel(sock_net(sk), skb, fl6->flowlabel, true, fl6); in sctp_v6_xmit() 266 return udp_tunnel6_xmit_skb(dst, sk, skb, NULL, &fl6->saddr, in sctp_v6_xmit() 267 &fl6->daddr, tclass, ip6_dst_hoplimit(dst), in sctp_v6_xmit() 280 struct flowi6 *fl6 = &_fl.u.ip6; in sctp_v6_get_dst() local 291 fl6->daddr = daddr->v6.sin6_addr; in sctp_v6_get_dst() 292 fl6->fl6_dport = daddr->v6.sin6_port; in sctp_v6_get_dst() [all …]
|
/Linux-v6.6/net/ipv6/ila/ |
D | ila_lwt.c | 64 struct flowi6 fl6; in ila_output() local 70 memset(&fl6, 0, sizeof(fl6)); in ila_output() 71 fl6.flowi6_oif = orig_dst->dev->ifindex; in ila_output() 72 fl6.flowi6_iif = LOOPBACK_IFINDEX; in ila_output() 73 fl6.daddr = *rt6_nexthop((struct rt6_info *)orig_dst, in ila_output() 76 dst = ip6_route_output(net, NULL, &fl6); in ila_output() 83 dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); in ila_output() 90 dst_cache_set_ip6(&ilwt->dst_cache, dst, &fl6.saddr); in ila_output()
|
/Linux-v6.6/include/net/ |
D | ip6_fib.h | 423 struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, 430 int fib6_lookup(struct net *net, int oif, struct flowi6 *fl6, 435 int oif, struct flowi6 *fl6, struct fib6_result *res, 439 struct flowi6 *fl6, int oif, bool have_oif_match, 589 struct flowi6 *fl6, 594 struct flowi6 *fl6, 599 struct flowi6 *fl6, 604 struct flowi6 *fl6, 610 struct flowi6 *fl6, in pol_lookup_func() argument 619 net, table, fl6, skb, flags); in pol_lookup_func() [all …]
|