Lines Matching refs:rt
294 struct rtable *rt; in ip_tunnel_bind_dev() local
300 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_bind_dev()
302 if (!IS_ERR(rt)) { in ip_tunnel_bind_dev()
303 tdev = rt->dst.dev; in ip_tunnel_bind_dev()
304 ip_rt_put(rt); in ip_tunnel_bind_dev()
513 struct rtable *rt, __be16 df, in tnl_update_pmtu() argument
526 mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen); in tnl_update_pmtu()
593 struct rtable *rt = NULL; in ip_md_tunnel_xmit() local
626 rt = dst_cache_get_ip4(&tun_info->dst_cache, &fl4.saddr); in ip_md_tunnel_xmit()
627 if (!rt) { in ip_md_tunnel_xmit()
628 rt = ip_route_output_key(tunnel->net, &fl4); in ip_md_tunnel_xmit()
629 if (IS_ERR(rt)) { in ip_md_tunnel_xmit()
634 dst_cache_set_ip4(&tun_info->dst_cache, &rt->dst, in ip_md_tunnel_xmit()
637 if (rt->dst.dev == dev) { in ip_md_tunnel_xmit()
638 ip_rt_put(rt); in ip_md_tunnel_xmit()
645 if (tnl_update_pmtu(dev, skb, rt, df, inner_iph, tunnel_hlen, in ip_md_tunnel_xmit()
647 ip_rt_put(rt); in ip_md_tunnel_xmit()
659 ttl = ip4_dst_hoplimit(&rt->dst); in ip_md_tunnel_xmit()
662 headroom += LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len; in ip_md_tunnel_xmit()
664 ip_rt_put(rt); in ip_md_tunnel_xmit()
670 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, tos, ttl, in ip_md_tunnel_xmit()
690 struct rtable *rt = NULL; /* Route to the other host */ in ip_tunnel_xmit() local
723 rt = skb_rtable(skb); in ip_tunnel_xmit()
724 dst = rt_nexthop(rt, inner_iph->daddr); in ip_tunnel_xmit()
787 rt = dst_cache_get_ip4(&tun_info->dst_cache, in ip_tunnel_xmit()
790 rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache, in ip_tunnel_xmit()
794 if (!rt) { in ip_tunnel_xmit()
795 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_xmit()
797 if (IS_ERR(rt)) { in ip_tunnel_xmit()
802 dst_cache_set_ip4(&tun_info->dst_cache, &rt->dst, in ip_tunnel_xmit()
805 dst_cache_set_ip4(&tunnel->dst_cache, &rt->dst, in ip_tunnel_xmit()
809 if (rt->dst.dev == dev) { in ip_tunnel_xmit()
810 ip_rt_put(rt); in ip_tunnel_xmit()
819 if (tnl_update_pmtu(dev, skb, rt, df, inner_iph, 0, 0, false)) { in ip_tunnel_xmit()
820 ip_rt_put(rt); in ip_tunnel_xmit()
844 ttl = ip4_dst_hoplimit(&rt->dst); in ip_tunnel_xmit()
847 max_headroom = LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) in ip_tunnel_xmit()
848 + rt->dst.header_len + ip_encap_hlen(&tunnel->encap); in ip_tunnel_xmit()
851 ip_rt_put(rt); in ip_tunnel_xmit()
859 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, tos, ttl, in ip_tunnel_xmit()