/net/x25/ |
D | x25_route.c | 29 struct x25_route *rt; in x25_add_route() local 34 list_for_each_entry(rt, &x25_route_list, node) { in x25_add_route() 35 if (!memcmp(&rt->address, address, sigdigits) && in x25_add_route() 36 rt->sigdigits == sigdigits) in x25_add_route() 40 rt = kmalloc(sizeof(*rt), GFP_ATOMIC); in x25_add_route() 42 if (!rt) in x25_add_route() 45 strcpy(rt->address.x25_addr, "000000000000000"); in x25_add_route() 46 memcpy(rt->address.x25_addr, address->x25_addr, sigdigits); in x25_add_route() 48 rt->sigdigits = sigdigits; in x25_add_route() 49 rt->dev = dev; in x25_add_route() [all …]
|
/net/ipv6/ |
D | route.c | 110 struct fib6_info *rt, struct dst_entry *dst, 137 void rt6_uncached_list_add(struct rt6_info *rt) in rt6_uncached_list_add() argument 141 rt->rt6i_uncached_list = ul; in rt6_uncached_list_add() 144 list_add_tail(&rt->rt6i_uncached, &ul->head); in rt6_uncached_list_add() 148 void rt6_uncached_list_del(struct rt6_info *rt) in rt6_uncached_list_del() argument 150 if (!list_empty(&rt->rt6i_uncached)) { in rt6_uncached_list_del() 151 struct uncached_list *ul = rt->rt6i_uncached_list; in rt6_uncached_list_del() 152 struct net *net = dev_net(rt->dst.dev); in rt6_uncached_list_del() 155 list_del(&rt->rt6i_uncached); in rt6_uncached_list_del() 171 struct rt6_info *rt; in rt6_uncached_list_flush_dev() local [all …]
|
D | ip6_fib.c | 316 struct rt6_info *rt; in fib6_rule_lookup() local 318 rt = pol_lookup_func(lookup, in fib6_rule_lookup() 320 if (rt->dst.error == -EAGAIN) { in fib6_rule_lookup() 321 ip6_rt_put_flags(rt, flags); in fib6_rule_lookup() 322 rt = net->ipv6.ip6_null_entry; in fib6_rule_lookup() 324 dst_hold(&rt->dst); in fib6_rule_lookup() 327 return &rt->dst; in fib6_rule_lookup() 364 struct fib6_info *rt, in call_fib6_entry_notifier() argument 369 .rt = rt, in call_fib6_entry_notifier() 377 struct fib6_info *rt, in call_fib6_multipath_entry_notifier() argument [all …]
|
D | fib6_rules.c | 113 struct rt6_info *rt; in fib6_rule_lookup() local 115 rt = pol_lookup_func(lookup, in fib6_rule_lookup() 117 if (rt != net->ipv6.ip6_null_entry && rt->dst.error != -EAGAIN) in fib6_rule_lookup() 118 return &rt->dst; in fib6_rule_lookup() 119 ip6_rt_put_flags(rt, flags); in fib6_rule_lookup() 120 rt = pol_lookup_func(lookup, in fib6_rule_lookup() 122 if (rt->dst.error != -EAGAIN) in fib6_rule_lookup() 123 return &rt->dst; in fib6_rule_lookup() 124 ip6_rt_put_flags(rt, flags); in fib6_rule_lookup() 200 struct rt6_info *rt = NULL; in __fib6_rule_action() local [all …]
|
D | ip6_output.c | 571 struct rt6_info *rt; in ip6_forward() local 578 rt = (struct rt6_info *) dst; in ip6_forward() 579 if (rt->rt6i_flags & RTF_GATEWAY) in ip6_forward() 580 target = &rt->rt6i_gateway; in ip6_forward() 832 struct rt6_info *rt = (struct rt6_info *)skb_dst(skb); in ip6_fragment() local 883 hroom = LL_RESERVED_SPACE(rt->dst.dev); in ip6_fragment() 931 IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), in ip6_fragment() 943 IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), in ip6_fragment() 951 IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), in ip6_fragment() 971 ip6_frag_init(skb, hlen, mtu, rt->dst.dev->needed_tailroom, in ip6_fragment() [all …]
|
/net/ipv4/ |
D | route.c | 414 const struct rtable *rt = container_of(dst, struct rtable, dst); in ipv4_neigh_lookup() local 420 if (likely(rt->rt_gw_family == AF_INET)) { in ipv4_neigh_lookup() 421 n = ip_neigh_gw4(dev, rt->rt_gw4); in ipv4_neigh_lookup() 422 } else if (rt->rt_gw_family == AF_INET6) { in ipv4_neigh_lookup() 423 n = ip_neigh_gw6(dev, &rt->rt_gw6); in ipv4_neigh_lookup() 441 const struct rtable *rt = container_of(dst, struct rtable, dst); in ipv4_confirm_neigh() local 445 if (rt->rt_gw_family == AF_INET) { in ipv4_confirm_neigh() 446 pkey = (const __be32 *)&rt->rt_gw4; in ipv4_confirm_neigh() 447 } else if (rt->rt_gw_family == AF_INET6) { in ipv4_confirm_neigh() 448 return __ipv6_confirm_neigh_stub(dev, &rt->rt_gw6); in ipv4_confirm_neigh() [all …]
|
D | xfrm4_policy.c | 26 struct rtable *rt; in __xfrm4_dst_lookup() local 38 rt = __ip_route_output_key(net, fl4); in __xfrm4_dst_lookup() 39 if (!IS_ERR(rt)) in __xfrm4_dst_lookup() 40 return &rt->dst; in __xfrm4_dst_lookup() 42 return ERR_CAST(rt); in __xfrm4_dst_lookup() 74 struct rtable *rt = (struct rtable *)xdst->route; in xfrm4_fill_dst() local 77 xdst->u.rt.rt_iif = fl4->flowi4_iif; in xfrm4_fill_dst() 84 xdst->u.rt.rt_is_input = rt->rt_is_input; in xfrm4_fill_dst() 85 xdst->u.rt.rt_flags = rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST | in xfrm4_fill_dst() 87 xdst->u.rt.rt_type = rt->rt_type; in xfrm4_fill_dst() [all …]
|
D | icmp.c | 314 static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument 317 struct dst_entry *dst = &rt->dst; in icmpv4_xrlim_allow() 370 struct ipcm_cookie *ipc, struct rtable **rt) in icmp_push_reply() argument 375 sk = icmp_sk(dev_net((*rt)->dst.dev)); in icmp_push_reply() 379 ipc, rt, MSG_DONTWAIT) < 0) { in icmp_push_reply() 406 struct rtable *rt = skb_rtable(skb); in icmp_reply() local 407 struct net *net = dev_net(rt->dst.dev); in icmp_reply() 453 rt = ip_route_output_key(net, &fl4); in icmp_reply() 454 if (IS_ERR(rt)) in icmp_reply() 456 if (icmpv4_xrlim_allow(net, rt, &fl4, type, code)) in icmp_reply() [all …]
|
D | datagram.c | 25 struct rtable *rt; in __ip4_datagram_connect() local 48 rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr, in __ip4_datagram_connect() 52 if (IS_ERR(rt)) { in __ip4_datagram_connect() 53 err = PTR_ERR(rt); in __ip4_datagram_connect() 59 if ((rt->rt_flags & RTCF_BROADCAST) && !sock_flag(sk, SOCK_BROADCAST)) { in __ip4_datagram_connect() 60 ip_rt_put(rt); in __ip4_datagram_connect() 78 sk_dst_set(sk, &rt->dst); in __ip4_datagram_connect() 107 struct rtable *rt; in ip4_datagram_release_cb() local 119 rt = ip_route_output_ports(sock_net(sk), &fl4, sk, daddr, in ip4_datagram_release_cb() 124 dst = !IS_ERR(rt) ? &rt->dst : NULL; in ip4_datagram_release_cb()
|
D | netfilter.c | 23 struct rtable *rt; in ip_route_me_harder() local 53 rt = ip_route_output_key(net, &fl4); in ip_route_me_harder() 54 if (IS_ERR(rt)) in ip_route_me_harder() 55 return PTR_ERR(rt); in ip_route_me_harder() 59 skb_dst_set(skb, &rt->dst); in ip_route_me_harder() 90 struct rtable *rt = ip_route_output_key(net, &fl->u.ip4); in nf_ip_route() local 91 if (IS_ERR(rt)) in nf_ip_route() 92 return PTR_ERR(rt); in nf_ip_route() 93 *dst = &rt->dst; in nf_ip_route()
|
D | ip_output.c | 150 struct rtable *rt = skb_rtable(skb); in ip_build_and_send_pkt() local 161 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt() 166 if (skb->len <= IPV4_MIN_MTU || ip_dont_fragment(sk, &rt->dst)) { in ip_build_and_send_pkt() 182 ip_options_build(skb, &opt->opt, daddr, rt, 0); in ip_build_and_send_pkt() 197 struct rtable *rt = (struct rtable *)dst; in ip_finish_output2() local 203 if (rt->rt_type == RTN_MULTICAST) { in ip_finish_output2() 205 } else if (rt->rt_type == RTN_BROADCAST) in ip_finish_output2() 222 neigh = ip_neigh_for_gw(rt, skb, &is_v6gw); in ip_finish_output2() 361 struct rtable *rt = skb_rtable(skb); in ip_mc_output() local 362 struct net_device *dev = rt->dst.dev; in ip_mc_output() [all …]
|
D | ip_tunnel.c | 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() [all …]
|
D | ip_forward.c | 90 struct rtable *rt; /* Route we use */ in ip_forward() local 124 rt = skb_rtable(skb); in ip_forward() 126 if (opt->is_strictroute && rt->rt_uses_gateway) in ip_forward() 130 mtu = ip_dst_mtu_maybe_forward(&rt->dst, true); in ip_forward() 139 if (skb_cow(skb, LL_RESERVED_SPACE(rt->dst.dev)+rt->dst.header_len)) in ip_forward() 158 net, NULL, skb, skb->dev, rt->dst.dev, in ip_forward()
|
D | arp.c | 433 struct rtable *rt; in arp_filter() local 438 rt = ip_route_output(net, sip, tip, 0, l3mdev_master_ifindex_rcu(dev)); in arp_filter() 439 if (IS_ERR(rt)) in arp_filter() 441 if (rt->dst.dev != dev) { in arp_filter() 445 ip_rt_put(rt); in arp_filter() 453 struct net_device *dev, struct rtable *rt) in arp_fwd_proxy() argument 458 if (rt->dst.dev == dev) in arp_fwd_proxy() 471 out_dev = __in_dev_get_rcu(rt->dst.dev); in arp_fwd_proxy() 498 struct net_device *dev, struct rtable *rt, in arp_fwd_pvlan() argument 502 if (rt->dst.dev != dev) in arp_fwd_pvlan() [all …]
|
D | ip_options.c | 45 __be32 daddr, struct rtable *rt, int is_frag) in ip_options_build() argument 58 ip_rt_get_source(iph + opt->rr + iph[opt->rr + 2] - 5, skb, rt); in ip_options_build() 60 ip_rt_get_source(iph + opt->ts + iph[opt->ts + 2] - 9, skb, rt); in ip_options_build() 260 struct rtable *rt = NULL; in __ip_options_compile() local 266 rt = skb_rtable(skb); in __ip_options_compile() 342 if (rt) { in __ip_options_compile() 383 if (rt) { in __ip_options_compile() 555 struct rtable *rt = skb_rtable(skb); in ip_forward_options() local 560 ip_rt_get_source(&optptr[optptr[2]-5], skb, rt); in ip_forward_options() 580 ip_rt_get_source(&optptr[srrptr-1], skb, rt); in ip_forward_options() [all …]
|
/net/mctp/ |
D | route.c | 378 static unsigned int mctp_route_mtu(struct mctp_route *rt) in mctp_route_mtu() argument 380 return rt->mtu ?: READ_ONCE(rt->dev->dev->mtu); in mctp_route_mtu() 418 static void mctp_route_release(struct mctp_route *rt) in mctp_route_release() argument 420 if (refcount_dec_and_test(&rt->refs)) { in mctp_route_release() 421 dev_put(rt->dev->dev); in mctp_route_release() 422 kfree_rcu(rt, rcu); in mctp_route_release() 429 struct mctp_route *rt; in mctp_route_alloc() local 431 rt = kzalloc(sizeof(*rt), GFP_KERNEL); in mctp_route_alloc() 432 if (!rt) in mctp_route_alloc() 435 INIT_LIST_HEAD(&rt->list); in mctp_route_alloc() [all …]
|
/net/mpls/ |
D | af_mpls.c | 73 static void rtmsg_lfib(int event, u32 label, struct mpls_route *rt, 79 struct mpls_route *rt = NULL; in mpls_route_input_rcu() local 84 rt = rcu_dereference(platform_label[index]); in mpls_route_input_rcu() 86 return rt; in mpls_route_input_rcu() 95 static u8 *__mpls_nh_via(struct mpls_route *rt, struct mpls_nh *nh) in __mpls_nh_via() argument 97 return (u8 *)nh + rt->rt_via_offset; in __mpls_nh_via() 100 static const u8 *mpls_nh_via(const struct mpls_route *rt, in mpls_nh_via() argument 103 return __mpls_nh_via((struct mpls_route *)rt, (struct mpls_nh *)nh); in mpls_nh_via() 156 static u32 mpls_multipath_hash(struct mpls_route *rt, struct sk_buff *skb) in mpls_multipath_hash() argument 223 static struct mpls_nh *mpls_get_nexthop(struct mpls_route *rt, u8 index) in mpls_get_nexthop() argument [all …]
|
D | internal.h | 160 #define for_nexthops(rt) { \ argument 162 for (nhsel = 0, nh = (rt)->rt_nh, __nh = (u8 *)((rt)->rt_nh); \ 163 nhsel < (rt)->rt_nhn; \ 164 __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) 166 #define change_nexthops(rt) { \ argument 168 for (nhsel = 0, nh = (struct mpls_nh *)((rt)->rt_nh), \ 169 __nh = (u8 *)((rt)->rt_nh); \ 170 nhsel < (rt)->rt_nhn; \ 171 __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) 173 #define endfor_nexthops(rt) } argument
|
/net/sunrpc/ |
D | timer.c | 35 void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo) in rpc_init_rtt() argument 40 rt->timeo = timeo; in rpc_init_rtt() 45 rt->srtt[i] = init; in rpc_init_rtt() 46 rt->sdrtt[i] = RPC_RTO_INIT; in rpc_init_rtt() 47 rt->ntimeouts[i] = 0; in rpc_init_rtt() 61 void rpc_update_rtt(struct rpc_rtt *rt, unsigned int timer, long m) in rpc_update_rtt() argument 75 srtt = (long *)&rt->srtt[timer]; in rpc_update_rtt() 82 sdrtt = (long *)&rt->sdrtt[timer]; in rpc_update_rtt() 110 unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned int timer) in rpc_calc_rto() argument 115 return rt->timeo; in rpc_calc_rto() [all …]
|
/net/ipv6/netfilter/ |
D | nft_fib_ipv6.c | 62 struct rt6_info *rt; in __nft_fib6_eval_type() local 79 route_err = nf_ip6_route(nft_net(pkt), (struct dst_entry **)&rt, in __nft_fib6_eval_type() 84 if (rt->rt6i_flags & RTF_REJECT) { in __nft_fib6_eval_type() 85 route_err = rt->dst.error; in __nft_fib6_eval_type() 86 dst_release(&rt->dst); in __nft_fib6_eval_type() 90 if (ipv6_anycast_destination((struct dst_entry *)rt, &fl6.daddr)) in __nft_fib6_eval_type() 92 else if (!dev && rt->rt6i_flags & RTF_LOCAL) in __nft_fib6_eval_type() 95 dst_release(&rt->dst); in __nft_fib6_eval_type() 164 struct rt6_info *rt; in nft_fib6_eval() local 190 rt = (void *)ip6_route_lookup(nft_net(pkt), &fl6, pkt->skb, in nft_fib6_eval() [all …]
|
D | ip6t_rpfilter.c | 35 struct rt6_info *rt; in rpfilter_lookup_reverse6() local 63 rt = (void *)ip6_route_lookup(net, &fl6, skb, lookup_flags); in rpfilter_lookup_reverse6() 64 if (rt->dst.error) in rpfilter_lookup_reverse6() 67 if (rt->rt6i_flags & (RTF_REJECT|RTF_ANYCAST)) in rpfilter_lookup_reverse6() 70 if (rt->rt6i_flags & RTF_LOCAL) { in rpfilter_lookup_reverse6() 75 if (rt->rt6i_idev->dev == dev || in rpfilter_lookup_reverse6() 76 l3mdev_master_ifindex_rcu(rt->rt6i_idev->dev) == dev->ifindex || in rpfilter_lookup_reverse6() 80 ip6_rt_put(rt); in rpfilter_lookup_reverse6()
|
/net/netfilter/ipvs/ |
D | ip_vs_xmit.c | 127 struct rtable *rt; in do_output_route4() local 136 rt = ip_route_output_key(net, &fl4); in do_output_route4() 137 if (IS_ERR(rt)) { in do_output_route4() 139 if (PTR_ERR(rt) == -EINVAL && *saddr && in do_output_route4() 148 ip_rt_put(rt); in do_output_route4() 155 return rt; in do_output_route4() 159 static inline int __ip_vs_is_local_route6(struct rt6_info *rt) in __ip_vs_is_local_route6() argument 161 return rt->dst.dev && rt->dst.dev->flags & IFF_LOOPBACK; in __ip_vs_is_local_route6() 314 struct rtable *rt; /* Route to the other host */ in __ip_vs_get_out_rt() local 321 rt = (struct rtable *) dest_dst->dst_cache; in __ip_vs_get_out_rt() [all …]
|
/net/appletalk/ |
D | atalk_proc.c | 122 struct atalk_route *rt; in atalk_seq_route_show() local 130 rt = &atrtr_default; in atalk_seq_route_show() 132 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show() 133 rt->flags, rt->dev->name); in atalk_seq_route_show() 136 rt = v; in atalk_seq_route_show() 138 ntohs(rt->target.s_net), rt->target.s_node, in atalk_seq_route_show() 139 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show() 140 rt->flags, rt->dev->name); in atalk_seq_route_show()
|
D | ddp.c | 500 struct atalk_route *rt; in atrtr_create() local 516 for (rt = atalk_routes; rt; rt = rt->next) { in atrtr_create() 517 if (r->rt_flags != rt->flags) in atrtr_create() 520 if (ta->sat_addr.s_net == rt->target.s_net) { in atrtr_create() 521 if (!(rt->flags & RTF_HOST)) in atrtr_create() 523 if (ta->sat_addr.s_node == rt->target.s_node) in atrtr_create() 553 if (!rt) { in atrtr_create() 554 rt = kzalloc(sizeof(*rt), GFP_ATOMIC); in atrtr_create() 557 if (!rt) in atrtr_create() 560 rt->next = atalk_routes; in atrtr_create() [all …]
|
/net/bridge/ |
D | br_nf_core.c | 74 struct rtable *rt = &br->fake_rtable; in br_netfilter_rtable_init() local 76 atomic_set(&rt->dst.__refcnt, 1); in br_netfilter_rtable_init() 77 rt->dst.dev = br->dev; in br_netfilter_rtable_init() 78 dst_init_metrics(&rt->dst, br_dst_default_metrics, true); in br_netfilter_rtable_init() 79 rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE; in br_netfilter_rtable_init() 80 rt->dst.ops = &fake_dst_ops; in br_netfilter_rtable_init()
|