/linux/net/ipv4/ |
H A D | devinet.c | 129 static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) in inet_hash_insert() argument 131 u32 hash = inet_addr_hash(net, ifa->ifa_local); in inet_hash_insert() 134 hlist_add_head_rcu(&ifa->addr_lst, &net->ipv4.inet_addr_lst[hash]); in inet_hash_insert() 137 static void inet_hash_remove(struct in_ifaddr *ifa) in inet_hash_remove() argument 140 hlist_del_init_rcu(&ifa->addr_lst); in inet_hash_remove() 154 struct in_ifaddr *ifa; in __ip_dev_find() local 157 ifa = inet_lookup_ifaddr_rcu(net, addr); in __ip_dev_find() 158 if (!ifa) { in __ip_dev_find() 172 result = ifa->ifa_dev->dev; in __ip_dev_find() 185 struct in_ifaddr *ifa; in inet_lookup_ifaddr_rcu() local [all …]
|
H A D | fib_frontend.c | 553 const struct in_ifaddr *ifa; in rtentry_to_fib_config() local 563 in_dev_for_each_ifa_rcu(ifa, in_dev) { in rtentry_to_fib_config() 564 if (strcmp(ifa->ifa_label, devname) == 0) in rtentry_to_fib_config() 569 if (!ifa) in rtentry_to_fib_config() 571 cfg->fc_prefsrc = ifa->ifa_local; in rtentry_to_fib_config() 1078 struct in_ifaddr *ifa, u32 rt_priority) in fib_magic() argument 1080 struct net *net = dev_net(ifa->ifa_dev->dev); in fib_magic() 1081 u32 tb_id = l3mdev_fib_table(ifa->ifa_dev->dev); in fib_magic() 1089 .fc_prefsrc = ifa->ifa_local, in fib_magic() 1090 .fc_oif = ifa->ifa_dev->dev->ifindex, in fib_magic() [all …]
|
/linux/net/netfilter/ |
H A D | nf_nat_redirect.c | 66 const struct in_ifaddr *ifa; in nf_nat_redirect_ipv4() local 68 ifa = rcu_dereference(indev->ifa_list); in nf_nat_redirect_ipv4() 69 if (ifa) in nf_nat_redirect_ipv4() 70 newdst.ip = ifa->ifa_local; in nf_nat_redirect_ipv4() 83 static bool nf_nat_redirect_ipv6_usable(const struct inet6_ifaddr *ifa, unsigned int scope) in nf_nat_redirect_ipv6_usable() argument 85 unsigned int ifa_addr_type = ipv6_addr_type(&ifa->addr); in nf_nat_redirect_ipv6_usable() 90 if ((ifa->flags & IFA_F_TENTATIVE) && (!(ifa->flags & IFA_F_OPTIMISTIC))) in nf_nat_redirect_ipv6_usable() 118 const struct inet6_ifaddr *ifa; in nf_nat_redirect_ipv6() local 121 list_for_each_entry(ifa, &idev->addr_list, if_list) { in nf_nat_redirect_ipv6() 122 if (!nf_nat_redirect_ipv6_usable(ifa, scope)) in nf_nat_redirect_ipv6() [all …]
|
H A D | nf_conntrack_broadcast.c | 41 const struct in_ifaddr *ifa; in nf_conntrack_broadcast_help() local 43 in_dev_for_each_ifa_rcu(ifa, in_dev) { in nf_conntrack_broadcast_help() 44 if (ifa->ifa_flags & IFA_F_SECONDARY) in nf_conntrack_broadcast_help() 47 if (ifa->ifa_broadcast == iph->daddr) { in nf_conntrack_broadcast_help() 48 mask = ifa->ifa_mask; in nf_conntrack_broadcast_help()
|
H A D | nf_nat_masquerade.c | 186 const struct in_ifaddr *ifa = ptr; in masq_inet_event() local 199 idev = ifa->ifa_dev; in masq_inet_event() 205 addr.ip = ifa->ifa_address; in masq_inet_event() 282 struct inet6_ifaddr *ifa = ptr; in masq_inet6_event() local 289 dev = ifa->idev->dev; in masq_inet6_event() 293 addr.in6 = ifa->addr; in masq_inet6_event()
|
H A D | nfnetlink_osf.c | 36 const struct in_ifaddr *ifa; in nf_osf_ttl() local 46 in_dev_for_each_ifa_rcu(ifa, in_dev) { in nf_osf_ttl() 47 if (inet_ifa_match(ip->saddr, ifa)) { in nf_osf_ttl()
|
/linux/net/ipv6/ |
H A D | addrconf.c | 173 static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); 174 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); 805 struct inet6_ifaddr *ifa; in dev_forward_change() local 826 list_for_each_entry(ifa, &idev->addr_list, if_list) { in dev_forward_change() 827 if (ifa->flags&IFA_F_TENTATIVE) in dev_forward_change() 829 list_add_tail(&ifa->if_list_aux, &tmp_addr_list); in dev_forward_change() 834 ifa = list_first_entry(&tmp_addr_list, in dev_forward_change() 836 list_del(&ifa->if_list_aux); in dev_forward_change() 838 addrconf_join_anycast(ifa); in dev_forward_change() 840 addrconf_leave_anycast(ifa); in dev_forward_change() [all …]
|
/linux/net/ipv4/netfilter/ |
H A D | nf_tproxy_ipv4.c | 52 const struct in_ifaddr *ifa; in nf_tproxy_laddr4() local 64 in_dev_for_each_ifa_rcu(ifa, indev) { in nf_tproxy_laddr4() 65 if (ifa->ifa_flags & IFA_F_SECONDARY) in nf_tproxy_laddr4() 68 laddr = ifa->ifa_local; in nf_tproxy_laddr4()
|
/linux/net/ipv6/netfilter/ |
H A D | nf_tproxy_ipv6.c | 14 struct inet6_ifaddr *ifa; in nf_tproxy_laddr6() local 24 list_for_each_entry(ifa, &indev->addr_list, if_list) { in nf_tproxy_laddr6() 25 if (ifa->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED)) in nf_tproxy_laddr6() 28 laddr = &ifa->addr; in nf_tproxy_laddr6()
|
/linux/net/smc/ |
H A D | smc_clc.c | 518 const struct in_ifaddr *ifa; in smc_clc_prfx_set4_rcu() local 523 in_dev_for_each_ifa_rcu(ifa, in_dev) { in smc_clc_prfx_set4_rcu() 524 if (!inet_ifa_match(ipv4, ifa)) in smc_clc_prfx_set4_rcu() 526 prop->prefix_len = inet_mask_len(ifa->ifa_mask); in smc_clc_prfx_set4_rcu() 527 prop->outgoing_subnet = ifa->ifa_address & ifa->ifa_mask; in smc_clc_prfx_set4_rcu() 541 struct inet6_ifaddr *ifa; in smc_clc_prfx_set6_rcu() local 547 list_for_each_entry(ifa, &in6_dev->addr_list, if_list) { in smc_clc_prfx_set6_rcu() 548 if (ipv6_addr_type(&ifa->addr) & IPV6_ADDR_LINKLOCAL) in smc_clc_prfx_set6_rcu() 551 &ifa->addr, ifa->prefix_len); in smc_clc_prfx_set6_rcu() 552 ipv6_prfx[cnt].prefix_len = ifa->prefix_len; in smc_clc_prfx_set6_rcu() [all …]
|
/linux/fs/lockd/ |
H A D | svc.c | 269 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in lockd_inetaddr_event() local 277 &ifa->ifa_local); in lockd_inetaddr_event() 279 sin.sin_addr.s_addr = ifa->ifa_local; in lockd_inetaddr_event() 295 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; in lockd_inet6addr_event() local 302 dprintk("lockd_inet6addr_event: removed %pI6\n", &ifa->addr); in lockd_inet6addr_event() 304 sin6.sin6_addr = ifa->addr; in lockd_inet6addr_event() 306 sin6.sin6_scope_id = ifa->idev->dev->ifindex; in lockd_inet6addr_event()
|
/linux/drivers/infiniband/hw/usnic/ |
H A D | usnic_ib_main.c | 248 struct in_ifaddr *ifa = ptr; in usnic_ib_handle_inet_event() local 265 usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address); in usnic_ib_handle_inet_event() 288 struct in_ifaddr *ifa = ptr; in usnic_ib_inetaddr_event() local 289 struct net_device *netdev = ifa->ifa_dev->dev; in usnic_ib_inetaddr_event() 421 const struct in_ifaddr *ifa; in usnic_ib_device_add() local 423 ifa = rcu_dereference(ind->ifa_list); in usnic_ib_device_add() 424 if (ifa) in usnic_ib_device_add() 425 usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address); in usnic_ib_device_add()
|
/linux/drivers/net/wan/ |
H A D | hdlc_cisco.c | 185 const struct in_ifaddr *ifa; in cisco_rx() local 187 in_dev_for_each_ifa_rcu(ifa, in_dev) { in cisco_rx() 189 ifa->ifa_label) == 0) { in cisco_rx() 190 addr = ifa->ifa_local; in cisco_rx() 191 mask = ifa->ifa_mask; in cisco_rx()
|
/linux/fs/nfsd/ |
H A D | nfssvc.c | 456 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in nfsd_inetaddr_event() local 457 struct net_device *dev = ifa->ifa_dev->dev; in nfsd_inetaddr_event() 467 dprintk("nfsd_inetaddr_event: removed %pI4\n", &ifa->ifa_local); in nfsd_inetaddr_event() 469 sin.sin_addr.s_addr = ifa->ifa_local; in nfsd_inetaddr_event() 486 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; in nfsd_inet6addr_event() local 487 struct net_device *dev = ifa->idev->dev; in nfsd_inet6addr_event() 497 dprintk("nfsd_inet6addr_event: removed %pI6\n", &ifa->addr); in nfsd_inet6addr_event() 499 sin6.sin6_addr = ifa->addr; in nfsd_inet6addr_event() 501 sin6.sin6_scope_id = ifa->idev->dev->ifindex; in nfsd_inet6addr_event()
|
/linux/net/appletalk/ |
H A D | aarp.c | 721 struct atalk_iface *ifa; in aarp_rcv() local 750 ifa = atalk_find_dev(dev); in aarp_rcv() 751 if (!ifa) in aarp_rcv() 754 if (ifa->status & ATIF_PROBE && in aarp_rcv() 755 ifa->address.s_node == ea->pa_dst_node && in aarp_rcv() 756 ifa->address.s_net == ea->pa_dst_net) { in aarp_rcv() 757 ifa->status |= ATIF_PROBE_FAIL; /* Fail the probe (in use) */ in aarp_rcv() 816 ma = &ifa->address; in aarp_rcv()
|
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
H A D | core.c | 992 struct in_ifaddr *ifa = data; in brcmf_inetaddr_changed() local 993 struct net_device *ndev = ifa->ifa_dev->dev; in brcmf_inetaddr_changed() 1029 if (ifa->ifa_address == addr_table[i]) in brcmf_inetaddr_changed() 1036 &ifa->ifa_address); in brcmf_inetaddr_changed() 1039 &ifa->ifa_address, sizeof(ifa->ifa_address)); in brcmf_inetaddr_changed() 1048 &ifa->ifa_address); in brcmf_inetaddr_changed() 1083 struct inet6_ifaddr *ifa = data; in brcmf_inet6addr_changed() local 1092 if (ifp->ndev != ifa->idev->dev) in brcmf_inet6addr_changed() 1097 if (ipv6_addr_equal(&ifa->addr, &table[i])) in brcmf_inet6addr_changed() 1104 table[ifp->ipv6addr_idx++] = ifa->addr; in brcmf_inet6addr_changed() [all …]
|
/linux/net/mac80211/ |
H A D | main.c | 554 struct in_ifaddr *ifa = arg; in ieee80211_ifa_changed() local 558 struct net_device *ndev = ifa->ifa_dev->dev; in ieee80211_ifa_changed() 606 ifa = rtnl_dereference(idev->ifa_list); in ieee80211_ifa_changed() 607 while (ifa) { in ieee80211_ifa_changed() 609 vif_cfg->arp_addr_list[c] = ifa->ifa_address; in ieee80211_ifa_changed() 610 ifa = rtnl_dereference(ifa->ifa_next); in ieee80211_ifa_changed() 630 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)arg; in ieee80211_ifa6_changed() local 631 struct inet6_dev *idev = ifa->idev; in ieee80211_ifa6_changed() 632 struct net_device *ndev = ifa->idev->dev; in ieee80211_ifa6_changed()
|
/linux/drivers/net/ethernet/qlogic/netxen/ |
H A D | netxen_nic_main.c | 3181 struct in_ifaddr *ifa, unsigned long event) in netxen_list_config_ip() argument 3188 dev = ifa->ifa_dev->dev; in netxen_list_config_ip() 3197 if (cur->ip_addr == ifa->ifa_address) in netxen_list_config_ip() 3207 cur->ip_addr = ifa->ifa_address; in netxen_list_config_ip() 3209 netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_UP); in netxen_list_config_ip() 3215 if (cur->ip_addr == ifa->ifa_address) { in netxen_list_config_ip() 3218 netxen_config_ipaddr(adapter, ifa->ifa_address, in netxen_list_config_ip() 3234 struct in_ifaddr *ifa; in netxen_config_indev_addr() local 3244 in_dev_for_each_ifa_rcu(ifa, indev) { in netxen_config_indev_addr() 3247 netxen_list_config_ip(adapter, ifa, NX_IP_UP); in netxen_config_indev_addr() [all …]
|
/linux/drivers/net/plip/ |
H A D | plip.c | 1019 const struct in_ifaddr *ifa = rcu_dereference(in_dev->ifa_list); in plip_rewrite_address() local 1020 if (ifa) { in plip_rewrite_address() 1023 memcpy(eth->h_dest+2, &ifa->ifa_address, 4); in plip_rewrite_address() 1114 const struct in_ifaddr *ifa = rtnl_dereference(in_dev->ifa_list); in plip_open() local 1115 if (ifa != NULL) { in plip_open() 1116 dev_addr_mod(dev, 2, &ifa->ifa_local, 4); in plip_open()
|
/linux/arch/um/drivers/ |
H A D | net_kern.c | 728 struct in_ifaddr *ifa = ptr; in uml_inetaddr_event() local 729 struct net_device *dev = ifa->ifa_dev->dev; in uml_inetaddr_event() 749 memcpy(addr_buf, &ifa->ifa_address, sizeof(addr_buf)); in uml_inetaddr_event() 750 memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); in uml_inetaddr_event()
|
/linux/net/core/ |
H A D | netpoll.c | 731 const struct in_ifaddr *ifa; in netpoll_setup() local 737 ifa = rtnl_dereference(in_dev->ifa_list); in netpoll_setup() 738 if (!ifa) { in netpoll_setup() 746 np->local_ip.ip = ifa->ifa_local; in netpoll_setup()
|
/linux/net/sctp/ |
H A D | protocol.c | 76 struct in_ifaddr *ifa; in sctp_v4_copy_addrlist() local 85 in_dev_for_each_ifa_rcu(ifa, in_dev) { in sctp_v4_copy_addrlist() 90 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; in sctp_v4_copy_addrlist() 799 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in sctp_inetaddr_event() local 802 struct net *net = dev_net(ifa->ifa_dev->dev); in sctp_inetaddr_event() 810 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; in sctp_inetaddr_event() 824 ifa->ifa_local) { in sctp_inetaddr_event()
|
/linux/drivers/net/ethernet/via/ |
H A D | via-velocity.h | 1462 struct in_ifaddr *ifa; in velocity_get_ip() local 1468 ifa = rcu_dereference(in_dev->ifa_list); in velocity_get_ip() 1469 if (ifa != NULL) { in velocity_get_ip() 1470 memcpy(vptr->ip_addr, &ifa->ifa_address, 4); in velocity_get_ip()
|
/linux/drivers/infiniband/hw/irdma/ |
H A D | utils.c | 152 struct in_ifaddr *ifa = ptr; in irdma_inetaddr_event() local 153 struct net_device *real_dev, *netdev = ifa->ifa_dev->dev; in irdma_inetaddr_event() 167 local_ipaddr = ntohl(ifa->ifa_address); in irdma_inetaddr_event() 202 struct inet6_ifaddr *ifa = ptr; in irdma_inet6addr_event() local 203 struct net_device *real_dev, *netdev = ifa->idev->dev; in irdma_inet6addr_event() 217 irdma_copy_ip_ntohl(local_ipaddr6, ifa->addr.in6_u.u6_addr32); in irdma_inet6addr_event() 391 const struct in_ifaddr *ifa; in irdma_add_ipv4_addr() local 397 in_dev_for_each_ifa_rcu(ifa, idev) { in irdma_add_ipv4_addr() 399 &ifa->ifa_address, rdma_vlan_dev_vlan_id(dev), in irdma_add_ipv4_addr() 402 ip_addr = ntohl(ifa->ifa_address); in irdma_add_ipv4_addr()
|
/linux/drivers/s390/net/ |
H A D | qeth_l3_main.c | 2126 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in qeth_l3_ip_event() local 2127 struct net_device *dev = ifa->ifa_dev->dev; in qeth_l3_ip_event() 2137 addr.u.a4.addr = ifa->ifa_address; in qeth_l3_ip_event() 2138 addr.u.a4.mask = ifa->ifa_mask; in qeth_l3_ip_event() 2151 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; in qeth_l3_ip6_event() local 2152 struct net_device *dev = ifa->idev->dev; in qeth_l3_ip6_event() 2178 ip_work->addr.u.a6.addr = ifa->addr; in qeth_l3_ip6_event() 2179 ip_work->addr.u.a6.pfxlen = ifa->prefix_len; in qeth_l3_ip6_event()
|