Lines Matching refs:fl6
193 struct flowi6 *fl6) in icmpv6_xrlim_allow() argument
207 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow()
222 peer = inet_getpeer_v6(net->ipv6.peers, &fl6->daddr, 1); in icmpv6_xrlim_allow()
232 struct flowi6 *fl6) in icmpv6_rt_has_prefsrc() argument
238 dst = ip6_route_output(net, sk, fl6); in icmpv6_rt_has_prefsrc()
268 void icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, in icmpv6_push_pending_frames() argument
285 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames()
286 &fl6->daddr, in icmpv6_push_pending_frames()
287 len, fl6->flowi6_proto, in icmpv6_push_pending_frames()
298 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames()
299 &fl6->daddr, in icmpv6_push_pending_frames()
300 len, fl6->flowi6_proto, in icmpv6_push_pending_frames()
352 struct flowi6 *fl6) in icmpv6_route_lookup() argument
358 err = ip6_dst_lookup(net, sk, &dst, fl6); in icmpv6_route_lookup()
366 if (ipv6_anycast_destination(dst, &fl6->daddr)) { in icmpv6_route_lookup()
375 dst = xfrm_lookup(net, dst, flowi6_to_flowi(fl6), sk, 0); in icmpv6_route_lookup()
452 struct flowi6 fl6; in icmp6_send() local
544 memset(&fl6, 0, sizeof(fl6)); in icmp6_send()
545 fl6.flowi6_proto = IPPROTO_ICMPV6; in icmp6_send()
546 fl6.daddr = hdr->saddr; in icmp6_send()
550 fl6.saddr = *saddr; in icmp6_send()
551 } else if (!icmpv6_rt_has_prefsrc(sk, type, &fl6)) { in icmp6_send()
557 ipv6_dev_get_saddr(net, in_netdev, &fl6.daddr, in icmp6_send()
559 &fl6.saddr); in icmp6_send()
563 fl6.flowi6_mark = mark; in icmp6_send()
564 fl6.flowi6_oif = iif; in icmp6_send()
565 fl6.fl6_icmp_type = type; in icmp6_send()
566 fl6.fl6_icmp_code = code; in icmp6_send()
567 fl6.flowi6_uid = sock_net_uid(net, NULL); in icmp6_send()
568 fl6.mp_hash = rt6_multipath_hash(net, &fl6, skb, NULL); in icmp6_send()
569 security_skb_classify_flow(skb, flowi6_to_flowi_common(&fl6)); in icmp6_send()
573 if (!icmpv6_xrlim_allow(sk, type, &fl6)) in icmp6_send()
581 if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) in icmp6_send()
582 fl6.flowi6_oif = np->mcast_oif; in icmp6_send()
583 else if (!fl6.flowi6_oif) in icmp6_send()
584 fl6.flowi6_oif = np->ucast_oif; in icmp6_send()
588 fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel); in icmp6_send()
590 dst = icmpv6_route_lookup(net, skb, sk, &fl6); in icmp6_send()
594 ipc6.hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst); in icmp6_send()
614 &ipc6, &fl6, (struct rt6_info *)dst, in icmp6_send()
619 icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, in icmp6_send()
716 struct flowi6 fl6; in icmpv6_echo_reply() local
746 memset(&fl6, 0, sizeof(fl6)); in icmpv6_echo_reply()
748 fl6.flowlabel = ip6_flowlabel(ipv6_hdr(skb)); in icmpv6_echo_reply()
750 fl6.flowi6_proto = IPPROTO_ICMPV6; in icmpv6_echo_reply()
751 fl6.daddr = ipv6_hdr(skb)->saddr; in icmpv6_echo_reply()
753 fl6.saddr = *saddr; in icmpv6_echo_reply()
754 fl6.flowi6_oif = icmp6_iif(skb); in icmpv6_echo_reply()
755 fl6.fl6_icmp_type = type; in icmpv6_echo_reply()
756 fl6.flowi6_mark = mark; in icmpv6_echo_reply()
757 fl6.flowi6_uid = sock_net_uid(net, NULL); in icmpv6_echo_reply()
758 security_skb_classify_flow(skb, flowi6_to_flowi_common(&fl6)); in icmpv6_echo_reply()
766 if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) in icmpv6_echo_reply()
767 fl6.flowi6_oif = np->mcast_oif; in icmpv6_echo_reply()
768 else if (!fl6.flowi6_oif) in icmpv6_echo_reply()
769 fl6.flowi6_oif = np->ucast_oif; in icmpv6_echo_reply()
771 if (ip6_dst_lookup(net, sk, &dst, &fl6)) in icmpv6_echo_reply()
773 dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), sk, 0); in icmpv6_echo_reply()
779 !icmpv6_xrlim_allow(sk, ICMPV6_ECHO_REPLY, &fl6)) in icmpv6_echo_reply()
789 ipc6.hlimit = ip6_sk_dst_hoplimit(np, &fl6, dst); in icmpv6_echo_reply()
799 sizeof(struct icmp6hdr), &ipc6, &fl6, in icmpv6_echo_reply()
804 icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, in icmpv6_echo_reply()
1020 void icmpv6_flow_init(struct sock *sk, struct flowi6 *fl6, in icmpv6_flow_init() argument
1026 memset(fl6, 0, sizeof(*fl6)); in icmpv6_flow_init()
1027 fl6->saddr = *saddr; in icmpv6_flow_init()
1028 fl6->daddr = *daddr; in icmpv6_flow_init()
1029 fl6->flowi6_proto = IPPROTO_ICMPV6; in icmpv6_flow_init()
1030 fl6->fl6_icmp_type = type; in icmpv6_flow_init()
1031 fl6->fl6_icmp_code = 0; in icmpv6_flow_init()
1032 fl6->flowi6_oif = oif; in icmpv6_flow_init()
1033 security_sk_classify_flow(sk, flowi6_to_flowi_common(fl6)); in icmpv6_flow_init()