Lines Matching refs:rt
293 static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument
296 struct dst_entry *dst = &rt->dst; in icmpv4_xrlim_allow()
360 struct ipcm_cookie *ipc, struct rtable **rt) in icmp_push_reply() argument
365 sk = icmp_sk(dev_net((*rt)->dst.dev)); in icmp_push_reply()
369 ipc, rt, MSG_DONTWAIT) < 0) { in icmp_push_reply()
396 struct rtable *rt = skb_rtable(skb); in icmp_reply() local
397 struct net *net = dev_net(rt->dst.dev); in icmp_reply()
437 rt = ip_route_output_key(net, &fl4); in icmp_reply()
438 if (IS_ERR(rt)) in icmp_reply()
440 if (icmpv4_xrlim_allow(net, rt, &fl4, icmp_param->data.icmph.type, in icmp_reply()
442 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in icmp_reply()
443 ip_rt_put(rt); in icmp_reply()
490 struct rtable *rt, *rt2; in icmp_route_lookup() local
508 rt = __ip_route_output_key_hash(net, fl4, in icmp_route_lookup()
510 if (IS_ERR(rt)) in icmp_route_lookup()
511 return rt; in icmp_route_lookup()
514 rt2 = rt; in icmp_route_lookup()
516 rt = (struct rtable *) xfrm_lookup(net, &rt->dst, in icmp_route_lookup()
518 if (!IS_ERR(rt)) { in icmp_route_lookup()
519 if (rt != rt2) in icmp_route_lookup()
520 return rt; in icmp_route_lookup()
521 } else if (PTR_ERR(rt) == -EPERM) { in icmp_route_lookup()
522 rt = NULL; in icmp_route_lookup()
524 return rt; in icmp_route_lookup()
563 dst_release(&rt->dst); in icmp_route_lookup()
565 rt = rt2; in icmp_route_lookup()
567 if (rt) in icmp_route_lookup()
568 dst_release(&rt->dst); in icmp_route_lookup()
574 return rt; in icmp_route_lookup()
577 if (rt) in icmp_route_lookup()
578 return rt; in icmp_route_lookup()
599 struct rtable *rt = skb_rtable(skb_in); in __icmp_send() local
608 if (!rt) in __icmp_send()
610 net = dev_net(rt->dst.dev); in __icmp_send()
633 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) in __icmp_send()
688 if (!(rt->rt_flags & RTCF_LOCAL)) { in __icmp_send()
692 if (rt_is_input_route(rt) && in __icmp_send()
730 rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos, mark, in __icmp_send()
732 if (IS_ERR(rt)) in __icmp_send()
735 if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code)) in __icmp_send()
740 room = dst_mtu(&rt->dst); in __icmp_send()
751 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in __icmp_send()
753 ip_rt_put(rt); in __icmp_send()
1004 struct rtable *rt = skb_rtable(skb); in icmp_rcv() local
1005 struct net *net = dev_net(rt->dst.dev); in icmp_rcv()
1053 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { in icmp_rcv()