Lines Matching refs:rt
288 static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument
291 struct dst_entry *dst = &rt->dst; in icmpv4_xrlim_allow()
354 struct ipcm_cookie *ipc, struct rtable **rt) in icmp_push_reply() argument
359 sk = icmp_sk(dev_net((*rt)->dst.dev)); in icmp_push_reply()
363 ipc, rt, MSG_DONTWAIT) < 0) { in icmp_push_reply()
390 struct rtable *rt = skb_rtable(skb); in icmp_reply() local
391 struct net *net = dev_net(rt->dst.dev); in icmp_reply()
429 rt = ip_route_output_key(net, &fl4); in icmp_reply()
430 if (IS_ERR(rt)) in icmp_reply()
432 if (icmpv4_xrlim_allow(net, rt, &fl4, icmp_param->data.icmph.type, in icmp_reply()
434 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in icmp_reply()
435 ip_rt_put(rt); in icmp_reply()
448 struct rtable *rt, *rt2; in icmp_route_lookup() local
462 rt = __ip_route_output_key(net, fl4); in icmp_route_lookup()
463 if (IS_ERR(rt)) in icmp_route_lookup()
464 return rt; in icmp_route_lookup()
467 rt2 = rt; in icmp_route_lookup()
469 rt = (struct rtable *) xfrm_lookup(net, &rt->dst, in icmp_route_lookup()
471 if (!IS_ERR(rt)) { in icmp_route_lookup()
472 if (rt != rt2) in icmp_route_lookup()
473 return rt; in icmp_route_lookup()
474 } else if (PTR_ERR(rt) == -EPERM) { in icmp_route_lookup()
475 rt = NULL; in icmp_route_lookup()
477 return rt; in icmp_route_lookup()
514 dst_release(&rt->dst); in icmp_route_lookup()
516 rt = rt2; in icmp_route_lookup()
518 if (rt) in icmp_route_lookup()
519 dst_release(&rt->dst); in icmp_route_lookup()
525 return rt; in icmp_route_lookup()
528 if (rt) in icmp_route_lookup()
529 return rt; in icmp_route_lookup()
549 struct rtable *rt = skb_rtable(skb_in); in icmp_send() local
558 if (!rt) in icmp_send()
560 net = dev_net(rt->dst.dev); in icmp_send()
583 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) in icmp_send()
638 if (!(rt->rt_flags & RTCF_LOCAL)) { in icmp_send()
642 if (rt_is_input_route(rt) && in icmp_send()
680 rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos, mark, in icmp_send()
682 if (IS_ERR(rt)) in icmp_send()
685 if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code)) in icmp_send()
690 room = dst_mtu(&rt->dst); in icmp_send()
701 icmp_push_reply(icmp_param, &fl4, &ipc, &rt); in icmp_send()
703 ip_rt_put(rt); in icmp_send()
954 struct rtable *rt = skb_rtable(skb); in icmp_rcv() local
955 struct net *net = dev_net(rt->dst.dev); in icmp_rcv()
1003 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { in icmp_rcv()