Lines Matching refs:rt
293 struct rtable *rt; in ip_tunnel_bind_dev() local
299 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_bind_dev()
301 if (!IS_ERR(rt)) { in ip_tunnel_bind_dev()
302 tdev = rt->dst.dev; in ip_tunnel_bind_dev()
303 ip_rt_put(rt); in ip_tunnel_bind_dev()
485 struct rtable *rt, __be16 df, in tnl_update_pmtu() argument
498 mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen); in tnl_update_pmtu()
551 struct rtable *rt = NULL; in ip_md_tunnel_xmit() local
579 rt = dst_cache_get_ip4(&tun_info->dst_cache, &fl4.saddr); in ip_md_tunnel_xmit()
580 if (!rt) { in ip_md_tunnel_xmit()
581 rt = ip_route_output_key(tunnel->net, &fl4); in ip_md_tunnel_xmit()
582 if (IS_ERR(rt)) { in ip_md_tunnel_xmit()
587 dst_cache_set_ip4(&tun_info->dst_cache, &rt->dst, in ip_md_tunnel_xmit()
590 if (rt->dst.dev == dev) { in ip_md_tunnel_xmit()
591 ip_rt_put(rt); in ip_md_tunnel_xmit()
598 if (tnl_update_pmtu(dev, skb, rt, df, inner_iph, tunnel_hlen, in ip_md_tunnel_xmit()
600 ip_rt_put(rt); in ip_md_tunnel_xmit()
612 ttl = ip4_dst_hoplimit(&rt->dst); in ip_md_tunnel_xmit()
615 headroom += LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len; in ip_md_tunnel_xmit()
620 ip_rt_put(rt); in ip_md_tunnel_xmit()
623 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, tos, ttl, in ip_md_tunnel_xmit()
643 struct rtable *rt = NULL; /* Route to the other host */ in ip_tunnel_xmit() local
675 rt = skb_rtable(skb); in ip_tunnel_xmit()
676 dst = rt_nexthop(rt, inner_iph->daddr); in ip_tunnel_xmit()
738 rt = dst_cache_get_ip4(&tun_info->dst_cache, in ip_tunnel_xmit()
741 rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache, in ip_tunnel_xmit()
745 if (!rt) { in ip_tunnel_xmit()
746 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_xmit()
748 if (IS_ERR(rt)) { in ip_tunnel_xmit()
753 dst_cache_set_ip4(&tun_info->dst_cache, &rt->dst, in ip_tunnel_xmit()
756 dst_cache_set_ip4(&tunnel->dst_cache, &rt->dst, in ip_tunnel_xmit()
760 if (rt->dst.dev == dev) { in ip_tunnel_xmit()
761 ip_rt_put(rt); in ip_tunnel_xmit()
770 if (tnl_update_pmtu(dev, skb, rt, df, inner_iph, 0, 0, false)) { in ip_tunnel_xmit()
771 ip_rt_put(rt); in ip_tunnel_xmit()
795 ttl = ip4_dst_hoplimit(&rt->dst); in ip_tunnel_xmit()
798 max_headroom = LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) in ip_tunnel_xmit()
799 + rt->dst.header_len + ip_encap_hlen(&tunnel->encap); in ip_tunnel_xmit()
804 ip_rt_put(rt); in ip_tunnel_xmit()
810 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, tos, ttl, in ip_tunnel_xmit()