Lines Matching refs:daddr
156 const void *daddr);
445 const void *daddr) in ipv4_neigh_lookup() argument
448 const __be32 *pkey = daddr; in ipv4_neigh_lookup()
456 pkey = &ip_hdr(skb)->daddr; in ipv4_neigh_lookup()
495 hash = jhash_3words((__force u32)iph->daddr, in __ip_select_ident()
520 iph->daddr, iph->saddr, 0, 0); in __build_flow_key()
539 __be32 daddr = inet->inet_daddr; in build_sk_flow_key() local
544 daddr = inet_opt->opt.faddr; in build_sk_flow_key()
549 daddr, inet->inet_saddr, 0, 0); in build_sk_flow_key()
599 static inline u32 fnhe_hashfun(__be32 daddr) in fnhe_hashfun() argument
605 hval = jhash_1word((__force u32) daddr, fnhe_hashrnd); in fnhe_hashfun()
621 static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw, in update_or_create_fnhe() argument
629 u32 hval = fnhe_hashfun(daddr); in update_or_create_fnhe()
646 if (fnhe->fnhe_daddr == daddr) in update_or_create_fnhe()
677 fnhe->fnhe_daddr = daddr; in update_or_create_fnhe()
758 update_or_create_fnhe(nh, fl4->daddr, new_gw, in __ip_do_redirect()
773 __be32 daddr = iph->daddr; in __ip_do_redirect() local
779 &saddr, &daddr); in __ip_do_redirect()
858 rt_nexthop(rt, ip_hdr(skb)->daddr)); in ip_rt_send_redirect()
883 __be32 gw = rt_nexthop(rt, ip_hdr(skb)->daddr); in ip_rt_send_redirect()
893 &ip_hdr(skb)->daddr, &gw); in ip_rt_send_redirect()
989 update_or_create_fnhe(nh, fl4->daddr, 0, mtu, in __ip_rt_update_pmtu()
1159 __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, in ip_rt_bug()
1189 fl4.daddr = iph->daddr; in ip_rt_get_source()
1201 rt_nexthop(rt, iph->daddr), in ip_rt_get_source()
1252 static struct fib_nh_exception *find_exception(struct fib_nh *nh, __be32 daddr) in find_exception() argument
1261 hval = fnhe_hashfun(daddr); in find_exception()
1265 if (fnhe->fnhe_daddr == daddr) in find_exception()
1272 __be32 daddr) in rt_bind_exception() argument
1278 if (daddr == fnhe->fnhe_daddr) { in rt_bind_exception()
1299 rt->rt_gateway = daddr; in rt_bind_exception()
1396 static void rt_set_nexthop(struct rtable *rt, __be32 daddr, in rt_set_nexthop() argument
1416 cached = rt_bind_exception(rt, fnhe, daddr); in rt_set_nexthop()
1427 rt->rt_gateway = daddr; in rt_set_nexthop()
1473 static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, in ip_route_input_mc() argument
1495 if (!ipv4_is_local_multicast(daddr)) in ip_route_input_mc()
1518 if (!ipv4_is_local_multicast(daddr) && IN_DEV_MFORWARD(in_dev)) in ip_route_input_mc()
1538 __be32 daddr, in ip_handle_martian_source() argument
1549 &daddr, &saddr, dev->name); in ip_handle_martian_source()
1560 static void ip_del_fnhe(struct fib_nh *nh, __be32 daddr) in ip_del_fnhe() argument
1564 u32 hval = fnhe_hashfun(daddr); in ip_del_fnhe()
1575 if (fnhe->fnhe_daddr == daddr) { in ip_del_fnhe()
1594 __be32 daddr, __be32 saddr, u32 tos) in __mkroute_input() argument
1610 err = fib_validate_source(skb, saddr, daddr, tos, FIB_RES_OIF(*res), in __mkroute_input()
1613 ip_handle_martian_source(in_dev->dev, in_dev, skb, daddr, in __mkroute_input()
1641 fnhe = find_exception(&FIB_RES_NH(*res), daddr); in __mkroute_input()
1647 ip_del_fnhe(&FIB_RES_NH(*res), daddr); in __mkroute_input()
1678 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag); in __mkroute_input()
1728 return fib_multipath_hash(inner_iph->daddr, inner_iph->saddr); in ip_multipath_icmp_hash()
1731 return fib_multipath_hash(outer_iph->saddr, outer_iph->daddr); in ip_multipath_icmp_hash()
1740 __be32 daddr, __be32 saddr, u32 tos) in ip_mkroute_input() argument
1749 h = fib_multipath_hash(saddr, daddr); in ip_mkroute_input()
1755 return __mkroute_input(skb, res, in_dev, daddr, saddr, tos); in ip_mkroute_input()
1769 static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, in ip_route_input_slow() argument
1804 if (ipv4_is_lbcast(daddr) || (saddr == 0 && daddr == 0)) in ip_route_input_slow()
1813 if (ipv4_is_zeronet(daddr)) in ip_route_input_slow()
1819 if (ipv4_is_loopback(daddr)) { in ip_route_input_slow()
1836 fl4.daddr = daddr; in ip_route_input_slow()
1849 err = fib_validate_source(skb, saddr, daddr, tos, in ip_route_input_slow()
1863 err = ip_mkroute_input(skb, &res, &fl4, in_dev, daddr, saddr, tos); in ip_route_input_slow()
1938 &daddr, &saddr, dev->name); in ip_route_input_slow()
1950 ip_handle_martian_source(dev, in_dev, skb, daddr, saddr); in ip_route_input_slow()
1954 int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr, in ip_route_input_noref() argument
1972 if (ipv4_is_multicast(daddr)) { in ip_route_input_noref()
1976 int our = ip_check_mc_rcu(in_dev, daddr, saddr, in ip_route_input_noref()
1981 (!ipv4_is_local_multicast(daddr) && in ip_route_input_noref()
1985 int res = ip_route_input_mc(skb, daddr, saddr, in ip_route_input_noref()
1994 res = ip_route_input_slow(skb, daddr, saddr, tos, dev); in ip_route_input_noref()
2021 if (ipv4_is_lbcast(fl4->daddr)) in __mkroute_output()
2023 else if (ipv4_is_multicast(fl4->daddr)) in __mkroute_output()
2025 else if (ipv4_is_zeronet(fl4->daddr)) in __mkroute_output()
2037 if (!ip_check_mc_rcu(in_dev, fl4->daddr, fl4->saddr, in __mkroute_output()
2068 fnhe = find_exception(nh, fl4->daddr); in __mkroute_output()
2074 ip_del_fnhe(nh, fl4->daddr); in __mkroute_output()
2121 !ipv4_is_local_multicast(fl4->daddr)) { in __mkroute_output()
2129 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); in __mkroute_output()
2179 (ipv4_is_multicast(fl4->daddr) || in __ip_route_output_key_hash()
2180 ipv4_is_lbcast(fl4->daddr))) { in __ip_route_output_key_hash()
2224 if (ipv4_is_local_multicast(fl4->daddr) || in __ip_route_output_key_hash()
2225 ipv4_is_lbcast(fl4->daddr) || in __ip_route_output_key_hash()
2233 if (ipv4_is_multicast(fl4->daddr)) in __ip_route_output_key_hash()
2236 else if (!fl4->daddr) in __ip_route_output_key_hash()
2246 if (!fl4->daddr) { in __ip_route_output_key_hash()
2247 fl4->daddr = fl4->saddr; in __ip_route_output_key_hash()
2248 if (!fl4->daddr) in __ip_route_output_key_hash()
2249 fl4->daddr = fl4->saddr = htonl(INADDR_LOOPBACK); in __ip_route_output_key_hash()
2296 fl4->saddr = fl4->daddr; in __ip_route_output_key_hash()
2494 fl4->saddr, fl4->daddr, in rt_fill_info()
2567 fl4.daddr = dst; in inet_rtm_getroute()