/net/ipv6/ |
D | inet6_connection_sock.c | 71 struct flowi6 *fl6, in inet6_csk_route_req() argument 80 memset(fl6, 0, sizeof(*fl6)); in inet6_csk_route_req() 81 fl6->flowi6_proto = proto; in inet6_csk_route_req() 82 fl6->daddr = ireq->ir_v6_rmt_addr; in inet6_csk_route_req() 84 final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final); in inet6_csk_route_req() 86 fl6->saddr = ireq->ir_v6_loc_addr; in inet6_csk_route_req() 87 fl6->flowi6_oif = ireq->ir_iif; in inet6_csk_route_req() 88 fl6->flowi6_mark = ireq->ir_mark; in inet6_csk_route_req() 89 fl6->fl6_dport = ireq->ir_rmt_port; in inet6_csk_route_req() 90 fl6->fl6_sport = htons(ireq->ir_num); in inet6_csk_route_req() [all …]
|
D | icmp.c | 175 struct flowi6 *fl6) in icmpv6_xrlim_allow() argument 194 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow() 212 &fl6->daddr, 1); in icmpv6_xrlim_allow() 240 int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, in icmpv6_push_pending_frames() argument 258 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() 259 &fl6->daddr, in icmpv6_push_pending_frames() 260 len, fl6->flowi6_proto, in icmpv6_push_pending_frames() 271 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() 272 &fl6->daddr, in icmpv6_push_pending_frames() 273 len, fl6->flowi6_proto, in icmpv6_push_pending_frames() [all …]
|
D | ping.c | 59 struct flowi6 fl6; in ping_v6_sendmsg() local 109 memset(&fl6, 0, sizeof(fl6)); in ping_v6_sendmsg() 111 fl6.flowi6_proto = IPPROTO_ICMPV6; in ping_v6_sendmsg() 112 fl6.saddr = np->saddr; in ping_v6_sendmsg() 113 fl6.daddr = *daddr; in ping_v6_sendmsg() 114 fl6.flowi6_oif = oif; in ping_v6_sendmsg() 115 fl6.flowi6_mark = sk->sk_mark; in ping_v6_sendmsg() 116 fl6.flowi6_uid = sk->sk_uid; in ping_v6_sendmsg() 117 fl6.fl6_icmp_type = user_icmph.icmp6_type; in ping_v6_sendmsg() 118 fl6.fl6_icmp_code = user_icmph.icmp6_code; in ping_v6_sendmsg() [all …]
|
D | xfrm6_policy.c | 35 struct flowi6 fl6; in xfrm6_dst_lookup() local 39 memset(&fl6, 0, sizeof(fl6)); in xfrm6_dst_lookup() 40 fl6.flowi6_oif = l3mdev_master_ifindex_by_index(net, oif); in xfrm6_dst_lookup() 41 fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF; in xfrm6_dst_lookup() 42 fl6.flowi6_mark = mark; in xfrm6_dst_lookup() 43 memcpy(&fl6.daddr, daddr, sizeof(fl6.daddr)); in xfrm6_dst_lookup() 45 memcpy(&fl6.saddr, saddr, sizeof(fl6.saddr)); in xfrm6_dst_lookup() 47 dst = ip6_route_output(net, NULL, &fl6); in xfrm6_dst_lookup() 124 struct flowi6 *fl6 = &fl->u.ip6; in _decode_session6() local 142 memset(fl6, 0, sizeof(struct flowi6)); in _decode_session6() [all …]
|
D | raw.c | 537 static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, in rawv6_push_pending_frames() argument 602 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in rawv6_push_pending_frames() 603 total_len, fl6->flowi6_proto, tmp_csum); in rawv6_push_pending_frames() 605 if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) in rawv6_push_pending_frames() 617 struct flowi6 *fl6, struct dst_entry **dstp, in rawv6_send_hdrinc() argument 630 ipv6_local_error(sk, EMSGSIZE, fl6, rt->dst.dev->mtu); in rawv6_send_hdrinc() 695 static int rawv6_probe_proto_opt(struct raw6_frag_vec *rfv, struct flowi6 *fl6) in rawv6_probe_proto_opt() argument 698 switch (fl6->flowi6_proto) { in rawv6_probe_proto_opt() 703 fl6->fl6_icmp_type = rfv->c[0]; in rawv6_probe_proto_opt() 704 fl6->fl6_icmp_code = rfv->c[1]; in rawv6_probe_proto_opt() [all …]
|
D | datagram.c | 43 static void ip6_datagram_flow_key_init(struct flowi6 *fl6, struct sock *sk) 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_oif = sk->sk_bound_dev_if; in ip6_datagram_flow_key_init() 53 fl6->flowi6_mark = sk->sk_mark; in ip6_datagram_flow_key_init() 54 fl6->fl6_dport = inet->inet_dport; in ip6_datagram_flow_key_init() 55 fl6->fl6_sport = inet->inet_sport; in ip6_datagram_flow_key_init() 56 fl6->flowlabel = np->flow_label; in ip6_datagram_flow_key_init() [all …]
|
D | udp.c | 937 static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6) in udp_v6_send_skb() argument 951 uh->source = fl6->fl6_sport; in udp_v6_send_skb() 952 uh->dest = fl6->fl6_dport; in udp_v6_send_skb() 962 udp6_hwcsum_outgoing(sk, skb, &fl6->saddr, &fl6->daddr, len); in udp_v6_send_skb() 968 uh->check = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in udp_v6_send_skb() 969 len, fl6->flowi6_proto, csum); in udp_v6_send_skb() 992 struct flowi6 fl6; in udp_v6_push_pending_frames() local 1001 fl6 = inet_sk(sk)->cork.fl.u.ip6; in udp_v6_push_pending_frames() 1007 err = udp_v6_send_skb(skb, &fl6); in udp_v6_push_pending_frames() 1026 struct flowi6 fl6; in udpv6_sendmsg() local [all …]
|
D | syncookies.c | 221 struct flowi6 fl6; in cookie_v6_check() local 222 memset(&fl6, 0, sizeof(fl6)); in cookie_v6_check() 223 fl6.flowi6_proto = IPPROTO_TCP; in cookie_v6_check() 224 fl6.daddr = ireq->ir_v6_rmt_addr; in cookie_v6_check() 225 final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final); in cookie_v6_check() 226 fl6.saddr = ireq->ir_v6_loc_addr; in cookie_v6_check() 227 fl6.flowi6_oif = ireq->ir_iif; in cookie_v6_check() 228 fl6.flowi6_mark = ireq->ir_mark; in cookie_v6_check() 229 fl6.fl6_dport = ireq->ir_rmt_port; in cookie_v6_check() 230 fl6.fl6_sport = inet_sk(sk)->inet_sport; in cookie_v6_check() [all …]
|
D | ip6_output.c | 182 int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, in ip6_xmit() argument 187 struct in6_addr *first_hop = &fl6->daddr; in ip6_xmit() 190 u8 proto = fl6->flowi6_proto; in ip6_xmit() 238 ip6_flow_hdr(hdr, tclass, ip6_make_flowlabel(net, skb, fl6->flowlabel, in ip6_xmit() 239 ip6_autoflowlabel(net, np), fl6)); in ip6_xmit() 245 hdr->saddr = fl6->saddr; in ip6_xmit() 276 ipv6_local_error((struct sock *)sk, EMSGSIZE, fl6, mtu); in ip6_xmit() 897 const struct flowi6 *fl6) in ip6_sk_dst_check() argument 928 if (ip6_rt_check(&rt->rt6i_dst, &fl6->daddr, np->daddr_cache) || in ip6_sk_dst_check() 930 ip6_rt_check(&rt->rt6i_src, &fl6->saddr, np->saddr_cache) || in ip6_sk_dst_check() [all …]
|
D | route.c | 435 const struct flowi6 *fl6) in rt6_info_hash_nhsfn() argument 437 return get_hash_from_flowi6(fl6) % candidate_count; in rt6_info_hash_nhsfn() 441 struct flowi6 *fl6, int oif, in rt6_multipath_select() argument 447 route_choosen = rt6_info_hash_nhsfn(match->rt6i_nsiblings + 1, fl6); in rt6_multipath_select() 854 struct flowi6 *fl6, int flags) in ip6_pol_route_lookup() argument 859 if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF) in ip6_pol_route_lookup() 863 fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr); in ip6_pol_route_lookup() 866 rt = rt6_device_match(net, rt, &fl6->saddr, fl6->flowi6_oif, flags); in ip6_pol_route_lookup() 867 if (rt->rt6i_nsiblings && fl6->flowi6_oif == 0) in ip6_pol_route_lookup() 868 rt = rt6_multipath_select(rt, fl6, fl6->flowi6_oif, flags); in ip6_pol_route_lookup() [all …]
|
D | fou6.c | 18 struct flowi6 *fl6, u8 *protocol, __be16 sport) in fou6_build_udp() argument 31 &fl6->saddr, &fl6->daddr, skb->len); in fou6_build_udp() 37 u8 *protocol, struct flowi6 *fl6) in fou6_build_header() argument 48 fou6_build_udp(skb, e, fl6, protocol, sport); in fou6_build_header() 55 u8 *protocol, struct flowi6 *fl6) in gue6_build_header() argument 66 fou6_build_udp(skb, e, fl6, protocol, sport); in gue6_build_header()
|
D | xfrm6_output.c | 49 struct flowi6 fl6; in xfrm6_local_rxpmtu() local 52 fl6.flowi6_oif = sk->sk_bound_dev_if; in xfrm6_local_rxpmtu() 53 fl6.daddr = ipv6_hdr(skb)->daddr; in xfrm6_local_rxpmtu() 55 ipv6_local_rxpmtu(sk, &fl6, mtu); in xfrm6_local_rxpmtu() 60 struct flowi6 fl6; in xfrm6_local_error() local 65 fl6.fl6_dport = inet_sk(sk)->inet_dport; in xfrm6_local_error() 66 fl6.daddr = hdr->daddr; in xfrm6_local_error() 68 ipv6_local_error(sk, EMSGSIZE, &fl6, mtu); in xfrm6_local_error()
|
D | tcp_ipv6.c | 122 struct flowi6 fl6; in tcp_v6_connect() local 133 memset(&fl6, 0, sizeof(fl6)); in tcp_v6_connect() 136 fl6.flowlabel = usin->sin6_flowinfo&IPV6_FLOWINFO_MASK; in tcp_v6_connect() 137 IP6_ECN_flow_init(fl6.flowlabel); in tcp_v6_connect() 138 if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { in tcp_v6_connect() 140 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); in tcp_v6_connect() 190 np->flow_label = fl6.flowlabel; in tcp_v6_connect() 234 fl6.flowi6_proto = IPPROTO_TCP; in tcp_v6_connect() 235 fl6.daddr = sk->sk_v6_daddr; in tcp_v6_connect() 236 fl6.saddr = saddr ? *saddr : np->saddr; in tcp_v6_connect() [all …]
|
D | xfrm6_state.c | 26 const struct flowi6 *fl6 = &fl->u.ip6; in __xfrm6_init_tempsel() local 30 *(struct in6_addr *)&sel->daddr = fl6->daddr; in __xfrm6_init_tempsel() 31 *(struct in6_addr *)&sel->saddr = fl6->saddr; in __xfrm6_init_tempsel() 32 sel->dport = xfrm_flowi_dport(fl, &fl6->uli); in __xfrm6_init_tempsel() 34 sel->sport = xfrm_flowi_sport(fl, &fl6->uli); in __xfrm6_init_tempsel() 39 sel->proto = fl6->flowi6_proto; in __xfrm6_init_tempsel() 40 sel->ifindex = fl6->flowi6_oif; in __xfrm6_init_tempsel()
|
D | ip6_tunnel.c | 1037 struct flowi6 *fl6, int encap_limit, __u32 *pmtu, in ip6_tnl_xmit() argument 1083 memcpy(&fl6->daddr, addr6, sizeof(fl6->daddr)); in ip6_tnl_xmit() 1098 if (!ip6_tnl_xmit_ctl(t, &fl6->saddr, &fl6->daddr)) in ip6_tnl_xmit() 1104 fl6->flowlabel = ip6_make_flowinfo(dsfield, fl6->flowlabel); in ip6_tnl_xmit() 1106 dst = ip6_route_output(net, NULL, fl6); in ip6_tnl_xmit() 1110 dst = xfrm_lookup(net, dst, flowi6_to_flowi(fl6), NULL, 0); in ip6_tnl_xmit() 1118 &fl6->daddr, 0, &fl6->saddr)) in ip6_tnl_xmit() 1188 dst_cache_set_ip6(&t->dst_cache, ndst, &fl6->saddr); in ip6_tnl_xmit() 1205 err = ip6_tnl_encap(skb, t, &proto, fl6); in ip6_tnl_xmit() 1213 ip6_make_flowlabel(net, skb, fl6->flowlabel, true, fl6)); in ip6_tnl_xmit() [all …]
|
D | ip6_gre.c | 510 struct flowi6 *fl6, int encap_limit, in __gre6_xmit() argument 521 fl6->daddr = ((struct ipv6hdr *)skb->data)->daddr; in __gre6_xmit() 523 fl6->daddr = tunnel->parms.raddr; in __gre6_xmit() 537 return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu, in __gre6_xmit() 546 struct flowi6 fl6; in ip6gre_xmit_ipv4() local 556 memcpy(&fl6, &t->fl.u.ip6, sizeof(fl6)); in ip6gre_xmit_ipv4() 563 fl6.flowi6_mark = skb->mark; in ip6gre_xmit_ipv4() 565 fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); in ip6gre_xmit_ipv4() 571 err = __gre6_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu, in ip6gre_xmit_ipv4() 590 struct flowi6 fl6; in ip6gre_xmit_ipv6() local [all …]
|
D | af_inet6.c | 688 struct flowi6 fl6; in inet6_sk_rebuild_header() local 690 memset(&fl6, 0, sizeof(fl6)); in inet6_sk_rebuild_header() 691 fl6.flowi6_proto = sk->sk_protocol; in inet6_sk_rebuild_header() 692 fl6.daddr = sk->sk_v6_daddr; in inet6_sk_rebuild_header() 693 fl6.saddr = np->saddr; in inet6_sk_rebuild_header() 694 fl6.flowlabel = np->flow_label; in inet6_sk_rebuild_header() 695 fl6.flowi6_oif = sk->sk_bound_dev_if; in inet6_sk_rebuild_header() 696 fl6.flowi6_mark = sk->sk_mark; in inet6_sk_rebuild_header() 697 fl6.fl6_dport = inet->inet_dport; in inet6_sk_rebuild_header() 698 fl6.fl6_sport = inet->inet_sport; in inet6_sk_rebuild_header() [all …]
|
/net/dccp/ |
D | ipv6.c | 193 struct flowi6 fl6; in dccp_v6_send_response() local 197 memset(&fl6, 0, sizeof(fl6)); in dccp_v6_send_response() 198 fl6.flowi6_proto = IPPROTO_DCCP; in dccp_v6_send_response() 199 fl6.daddr = ireq->ir_v6_rmt_addr; in dccp_v6_send_response() 200 fl6.saddr = ireq->ir_v6_loc_addr; in dccp_v6_send_response() 201 fl6.flowlabel = 0; in dccp_v6_send_response() 202 fl6.flowi6_oif = ireq->ir_iif; in dccp_v6_send_response() 203 fl6.fl6_dport = ireq->ir_rmt_port; in dccp_v6_send_response() 204 fl6.fl6_sport = htons(ireq->ir_num); in dccp_v6_send_response() 205 security_req_classify_flow(req, flowi6_to_flowi(&fl6)); in dccp_v6_send_response() [all …]
|
/net/l2tp/ |
D | l2tp_ip6.c | 505 struct flowi6 fl6; in l2tp_ip6_sendmsg() local 526 memset(&fl6, 0, sizeof(fl6)); in l2tp_ip6_sendmsg() 528 fl6.flowi6_mark = sk->sk_mark; in l2tp_ip6_sendmsg() 529 fl6.flowi6_uid = sk->sk_uid; in l2tp_ip6_sendmsg() 544 fl6.flowlabel = lsa->l2tp_flowinfo & IPV6_FLOWINFO_MASK; in l2tp_ip6_sendmsg() 545 if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { in l2tp_ip6_sendmsg() 546 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); in l2tp_ip6_sendmsg() 563 fl6.flowi6_oif = lsa->l2tp_scope_id; in l2tp_ip6_sendmsg() 569 fl6.flowlabel = np->flow_label; in l2tp_ip6_sendmsg() 572 if (fl6.flowi6_oif == 0) in l2tp_ip6_sendmsg() [all …]
|
/net/ipv6/netfilter/ |
D | nf_dup_ipv6.c | 27 struct flowi6 fl6; in nf_dup_ipv6_route() local 29 memset(&fl6, 0, sizeof(fl6)); in nf_dup_ipv6_route() 31 fl6.flowi6_oif = oif; in nf_dup_ipv6_route() 33 fl6.daddr = *gw; in nf_dup_ipv6_route() 34 fl6.flowlabel = (__force __be32)(((iph->flow_lbl[0] & 0xF) << 16) | in nf_dup_ipv6_route() 36 fl6.flowi6_flags = FLOWI_FLAG_KNOWN_NH; in nf_dup_ipv6_route() 37 dst = ip6_route_output(net, NULL, &fl6); in nf_dup_ipv6_route()
|
D | nf_reject_ipv6.c | 141 struct flowi6 fl6; in nf_send_reset6() local 153 memset(&fl6, 0, sizeof(fl6)); in nf_send_reset6() 154 fl6.flowi6_proto = IPPROTO_TCP; in nf_send_reset6() 155 fl6.saddr = oip6h->daddr; in nf_send_reset6() 156 fl6.daddr = oip6h->saddr; in nf_send_reset6() 157 fl6.fl6_sport = otcph->dest; in nf_send_reset6() 158 fl6.fl6_dport = otcph->source; in nf_send_reset6() 159 fl6.flowi6_oif = l3mdev_master_ifindex(skb_dst(oldskb)->dev); in nf_send_reset6() 160 fl6.flowi6_mark = IP6_REPLY_MARK(net, oldskb->mark); in nf_send_reset6() 161 security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); in nf_send_reset6() [all …]
|
D | ip6t_rpfilter.c | 35 struct flowi6 fl6 = { in rpfilter_lookup_reverse6() local 44 memcpy(&fl6.saddr, &iph->daddr, sizeof(struct in6_addr)); in rpfilter_lookup_reverse6() 50 fl6.flowi6_mark = flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0; in rpfilter_lookup_reverse6() 52 fl6.flowi6_oif = dev->ifindex; in rpfilter_lookup_reverse6() 56 rt = (void *) ip6_route_lookup(net, &fl6, lookup_flags); in rpfilter_lookup_reverse6()
|
/net/sctp/ |
D | ipv6.c | 211 struct flowi6 *fl6 = &transport->fl.u.ip6; in sctp_v6_xmit() local 215 skb->len, &fl6->saddr, &fl6->daddr); in sctp_v6_xmit() 217 IP6_ECN_flow_xmit(sk, fl6->flowlabel); in sctp_v6_xmit() 225 res = ip6_xmit(sk, skb, fl6, sk->sk_mark, rcu_dereference(np->opt), in sctp_v6_xmit() 239 struct flowi6 *fl6 = &fl->u.ip6; in sctp_v6_get_dst() local 249 memset(fl6, 0, sizeof(struct flowi6)); in sctp_v6_get_dst() 250 fl6->daddr = daddr->v6.sin6_addr; in sctp_v6_get_dst() 251 fl6->fl6_dport = daddr->v6.sin6_port; in sctp_v6_get_dst() 252 fl6->flowi6_proto = IPPROTO_SCTP; in sctp_v6_get_dst() 254 fl6->flowi6_oif = daddr->v6.sin6_scope_id; in sctp_v6_get_dst() [all …]
|
/net/rxrpc/ |
D | peer_object.c | 167 struct flowi6 *fl6 = &fl.u.ip6; in rxrpc_assess_MTU_size() local 188 fl6->flowi6_iif = LOOPBACK_IFINDEX; in rxrpc_assess_MTU_size() 189 fl6->flowi6_scope = RT_SCOPE_UNIVERSE; in rxrpc_assess_MTU_size() 190 fl6->flowi6_proto = IPPROTO_UDP; in rxrpc_assess_MTU_size() 191 memcpy(&fl6->daddr, &peer->srx.transport.sin6.sin6_addr, in rxrpc_assess_MTU_size() 193 fl6->fl6_dport = htons(7001); in rxrpc_assess_MTU_size() 194 fl6->fl6_sport = htons(7000); in rxrpc_assess_MTU_size() 195 dst = ip6_route_output(&init_net, NULL, fl6); in rxrpc_assess_MTU_size()
|
/net/core/ |
D | flow_dissector.c | 774 __u32 __skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6) in __skb_get_hash_flowi6() argument 780 memcpy(&keys.addrs.v6addrs.src, &fl6->saddr, in __skb_get_hash_flowi6() 782 memcpy(&keys.addrs.v6addrs.dst, &fl6->daddr, in __skb_get_hash_flowi6() 785 keys.ports.src = fl6->fl6_sport; in __skb_get_hash_flowi6() 786 keys.ports.dst = fl6->fl6_dport; in __skb_get_hash_flowi6() 787 keys.keyid.keyid = fl6->fl6_gre_key; in __skb_get_hash_flowi6() 788 keys.tags.flow_label = (__force u32)fl6->flowlabel; in __skb_get_hash_flowi6() 789 keys.basic.ip_proto = fl6->flowi6_proto; in __skb_get_hash_flowi6() 889 __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys) in __get_hash_from_flowi6() argument 893 memcpy(&keys->addrs.v6addrs.src, &fl6->saddr, in __get_hash_from_flowi6() [all …]
|