devinet.c (661d2967b3f1b34eeaa7e212e7b9bbe8ee072b59) | devinet.c (0465277f6b3fd0535428ae935644ac30ce903de0) |
---|---|
1/* 2 * NET3 IP device support routines. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 1485 unchanged lines hidden (view full) --- 1494 s_h = cb->args[0]; 1495 s_idx = idx = cb->args[1]; 1496 s_ip_idx = ip_idx = cb->args[2]; 1497 1498 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { 1499 idx = 0; 1500 head = &net->dev_index_head[h]; 1501 rcu_read_lock(); | 1/* 2 * NET3 IP device support routines. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 1485 unchanged lines hidden (view full) --- 1494 s_h = cb->args[0]; 1495 s_idx = idx = cb->args[1]; 1496 s_ip_idx = ip_idx = cb->args[2]; 1497 1498 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { 1499 idx = 0; 1500 head = &net->dev_index_head[h]; 1501 rcu_read_lock(); |
1502 cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^ 1503 net->dev_base_seq; |
|
1502 hlist_for_each_entry_rcu(dev, head, index_hlist) { 1503 if (idx < s_idx) 1504 goto cont; 1505 if (h > s_h || idx > s_idx) 1506 s_ip_idx = 0; 1507 in_dev = __in_dev_get_rcu(dev); 1508 if (!in_dev) 1509 goto cont; --- 4 unchanged lines hidden (view full) --- 1514 continue; 1515 if (inet_fill_ifaddr(skb, ifa, 1516 NETLINK_CB(cb->skb).portid, 1517 cb->nlh->nlmsg_seq, 1518 RTM_NEWADDR, NLM_F_MULTI) <= 0) { 1519 rcu_read_unlock(); 1520 goto done; 1521 } | 1504 hlist_for_each_entry_rcu(dev, head, index_hlist) { 1505 if (idx < s_idx) 1506 goto cont; 1507 if (h > s_h || idx > s_idx) 1508 s_ip_idx = 0; 1509 in_dev = __in_dev_get_rcu(dev); 1510 if (!in_dev) 1511 goto cont; --- 4 unchanged lines hidden (view full) --- 1516 continue; 1517 if (inet_fill_ifaddr(skb, ifa, 1518 NETLINK_CB(cb->skb).portid, 1519 cb->nlh->nlmsg_seq, 1520 RTM_NEWADDR, NLM_F_MULTI) <= 0) { 1521 rcu_read_unlock(); 1522 goto done; 1523 } |
1524 nl_dump_check_consistent(cb, nlmsg_hdr(skb)); |
|
1522 } 1523cont: 1524 idx++; 1525 } 1526 rcu_read_unlock(); 1527 } 1528 1529done: --- 272 unchanged lines hidden (view full) --- 1802 1803 s_h = cb->args[0]; 1804 s_idx = idx = cb->args[1]; 1805 1806 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { 1807 idx = 0; 1808 head = &net->dev_index_head[h]; 1809 rcu_read_lock(); | 1525 } 1526cont: 1527 idx++; 1528 } 1529 rcu_read_unlock(); 1530 } 1531 1532done: --- 272 unchanged lines hidden (view full) --- 1805 1806 s_h = cb->args[0]; 1807 s_idx = idx = cb->args[1]; 1808 1809 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { 1810 idx = 0; 1811 head = &net->dev_index_head[h]; 1812 rcu_read_lock(); |
1813 cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^ 1814 net->dev_base_seq; |
|
1810 hlist_for_each_entry_rcu(dev, head, index_hlist) { 1811 if (idx < s_idx) 1812 goto cont; 1813 in_dev = __in_dev_get_rcu(dev); 1814 if (!in_dev) 1815 goto cont; 1816 1817 if (inet_netconf_fill_devconf(skb, dev->ifindex, 1818 &in_dev->cnf, 1819 NETLINK_CB(cb->skb).portid, 1820 cb->nlh->nlmsg_seq, 1821 RTM_NEWNETCONF, 1822 NLM_F_MULTI, 1823 -1) <= 0) { 1824 rcu_read_unlock(); 1825 goto done; 1826 } | 1815 hlist_for_each_entry_rcu(dev, head, index_hlist) { 1816 if (idx < s_idx) 1817 goto cont; 1818 in_dev = __in_dev_get_rcu(dev); 1819 if (!in_dev) 1820 goto cont; 1821 1822 if (inet_netconf_fill_devconf(skb, dev->ifindex, 1823 &in_dev->cnf, 1824 NETLINK_CB(cb->skb).portid, 1825 cb->nlh->nlmsg_seq, 1826 RTM_NEWNETCONF, 1827 NLM_F_MULTI, 1828 -1) <= 0) { 1829 rcu_read_unlock(); 1830 goto done; 1831 } |
1832 nl_dump_check_consistent(cb, nlmsg_hdr(skb)); |
|
1827cont: 1828 idx++; 1829 } 1830 rcu_read_unlock(); 1831 } 1832 if (h == NETDEV_HASHENTRIES) { 1833 if (inet_netconf_fill_devconf(skb, NETCONFA_IFINDEX_ALL, 1834 net->ipv4.devconf_all, --- 433 unchanged lines hidden --- | 1833cont: 1834 idx++; 1835 } 1836 rcu_read_unlock(); 1837 } 1838 if (h == NETDEV_HASHENTRIES) { 1839 if (inet_netconf_fill_devconf(skb, NETCONFA_IFINDEX_ALL, 1840 net->ipv4.devconf_all, --- 433 unchanged lines hidden --- |