Commit 313c502
ipv4: fix bind address validity regression tests
Commit 8ff978b ("ipv4/raw: support binding to nonlocal addresses")
introduces support for binding to nonlocal addresses, as well as some
basic test coverage for some of the related cases.
Commit b4a028c ("ipv4: ping: fix bind address validity check")
fixes a regression which incorrectly removed some checks for bind
address validation. In addition, it introduces regression tests for
those specific checks. However, those regression tests are defective, in
that they perform the tests using an incorrect combination of bind
flags. As a result, those tests fail when they should succeed.
This commit introduces additional regression tests for nonlocal binding
and fixes the defective regression tests. It also introduces new
set_sysctl calls for the ipv4_bind test group, as to perform the ICMP
binding tests it is necessary to allow ICMP socket creation by setting
the net.ipv4.ping_group_range knob.
Fixes: b4a028c ("ipv4: ping: fix bind address validity check")
Reported-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 9926de7 commit 313c502
1 file changed
Lines changed: 27 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1800 | 1800 | | |
1801 | 1801 | | |
1802 | 1802 | | |
1803 | | - | |
| 1803 | + | |
1804 | 1804 | | |
1805 | 1805 | | |
1806 | 1806 | | |
1807 | | - | |
1808 | | - | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
1809 | 1817 | | |
1810 | 1818 | | |
1811 | 1819 | | |
1812 | 1820 | | |
1813 | 1821 | | |
1814 | 1822 | | |
1815 | | - | |
| 1823 | + | |
1816 | 1824 | | |
1817 | 1825 | | |
1818 | 1826 | | |
1819 | 1827 | | |
1820 | | - | |
| 1828 | + | |
1821 | 1829 | | |
1822 | 1830 | | |
1823 | 1831 | | |
| |||
1870 | 1878 | | |
1871 | 1879 | | |
1872 | 1880 | | |
1873 | | - | |
| 1881 | + | |
1874 | 1882 | | |
1875 | 1883 | | |
1876 | 1884 | | |
1877 | | - | |
| 1885 | + | |
1878 | 1886 | | |
1879 | 1887 | | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
1880 | 1896 | | |
1881 | 1897 | | |
1882 | 1898 | | |
1883 | 1899 | | |
1884 | 1900 | | |
1885 | | - | |
| 1901 | + | |
1886 | 1902 | | |
1887 | 1903 | | |
1888 | 1904 | | |
1889 | 1905 | | |
1890 | | - | |
| 1906 | + | |
1891 | 1907 | | |
1892 | 1908 | | |
1893 | 1909 | | |
| |||
1922 | 1938 | | |
1923 | 1939 | | |
1924 | 1940 | | |
| 1941 | + | |
1925 | 1942 | | |
1926 | 1943 | | |
1927 | 1944 | | |
1928 | 1945 | | |
| 1946 | + | |
1929 | 1947 | | |
1930 | 1948 | | |
1931 | 1949 | | |
| |||
0 commit comments