Lines Matching refs:rt
289 static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument
292 struct dst_entry *dst = &rt->dst; in icmpv4_xrlim_allow()
356 struct ipcm_cookie *ipc, struct rtable **rt) in icmp_push_reply() argument
361 sk = icmp_sk(dev_net((*rt)->dst.dev)); in icmp_push_reply()
365 ipc, rt, MSG_DONTWAIT) < 0) { in icmp_push_reply()
392 struct rtable *rt = skb_rtable(skb); in icmp_reply() local
393 struct net *net = dev_net(rt->dst.dev); in icmp_reply()
432 rt = ip_route_output_key(net, &fl4); in icmp_reply()
433 if (IS_ERR(rt)) in icmp_reply()
435 if (icmpv4_xrlim_allow(net, rt, &fl4, icmp_param->data.icmph.type, in icmp_reply()
437 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in icmp_reply()
438 ip_rt_put(rt); in icmp_reply()
467 struct rtable *rt, *rt2; in icmp_route_lookup() local
483 rt = __ip_route_output_key_hash(net, fl4, in icmp_route_lookup()
485 if (IS_ERR(rt)) in icmp_route_lookup()
486 return rt; in icmp_route_lookup()
489 rt2 = rt; in icmp_route_lookup()
491 rt = (struct rtable *) xfrm_lookup(net, &rt->dst, in icmp_route_lookup()
493 if (!IS_ERR(rt)) { in icmp_route_lookup()
494 if (rt != rt2) in icmp_route_lookup()
495 return rt; in icmp_route_lookup()
496 } else if (PTR_ERR(rt) == -EPERM) { in icmp_route_lookup()
497 rt = NULL; in icmp_route_lookup()
499 return rt; in icmp_route_lookup()
538 dst_release(&rt->dst); in icmp_route_lookup()
540 rt = rt2; in icmp_route_lookup()
542 if (rt) in icmp_route_lookup()
543 dst_release(&rt->dst); in icmp_route_lookup()
549 return rt; in icmp_route_lookup()
552 if (rt) in icmp_route_lookup()
553 return rt; in icmp_route_lookup()
573 struct rtable *rt = skb_rtable(skb_in); in icmp_send() local
582 if (!rt) in icmp_send()
584 net = dev_net(rt->dst.dev); in icmp_send()
607 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) in icmp_send()
662 if (!(rt->rt_flags & RTCF_LOCAL)) { in icmp_send()
666 if (rt_is_input_route(rt) && in icmp_send()
704 rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos, mark, in icmp_send()
706 if (IS_ERR(rt)) in icmp_send()
709 if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code)) in icmp_send()
714 room = dst_mtu(&rt->dst); in icmp_send()
725 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in icmp_send()
727 ip_rt_put(rt); in icmp_send()
978 struct rtable *rt = skb_rtable(skb); in icmp_rcv() local
979 struct net *net = dev_net(rt->dst.dev); in icmp_rcv()
1027 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { in icmp_rcv()