Repository navigation
Commit 4ef1a7c
ipv6: some fixes for ipv6_dev_find()
This patch is to do 3 things for ipv6_dev_find():
As David A. noticed,
- rt6_lookup() is not really needed. Different from __ip_dev_find(),
ipv6_dev_find() doesn't have a compatibility problem, so remove it.
As Hideaki suggested,
- "valid" (non-tentative) check for the address is also needed.
ipv6_chk_addr() calls ipv6_chk_addr_and_flags(), which will
traverse the address hash list, but it's heavy to be called
inside ipv6_dev_find(). This patch is to reuse the code of
ipv6_chk_addr_and_flags() for ipv6_dev_find().
- dev parameter is passed into ipv6_dev_find(), as link-local
addresses from user space has sin6_scope_id set and the dev
lookup needs it.
Fixes: 81f6cb3 ("ipv6: add ipv6_dev_find()")
Suggested-by: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 0410d07 commit 4ef1a7c
3 files changed
Lines changed: 28 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1899 | 1900 | | |
1900 | 1901 | | |
1901 | | - | |
| 1902 | + | |
1902 | 1903 | | |
1903 | 1904 | | |
1904 | 1905 | | |
| |||
1909 | 1910 | | |
1910 | 1911 | | |
1911 | 1912 | | |
1912 | | - | |
| 1913 | + | |
| 1914 | + | |
1913 | 1915 | | |
1914 | 1916 | | |
1915 | | - | |
| 1917 | + | |
1916 | 1918 | | |
1917 | 1919 | | |
1918 | 1920 | | |
| |||
1923 | 1925 | | |
1924 | 1926 | | |
1925 | 1927 | | |
1926 | | - | |
| 1928 | + | |
1927 | 1929 | | |
1928 | 1930 | | |
1929 | | - | |
| 1931 | + | |
1930 | 1932 | | |
1931 | 1933 | | |
1932 | 1934 | | |
1933 | 1935 | | |
1934 | | - | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
1935 | 1945 | | |
1936 | 1946 | | |
1937 | 1947 | | |
| |||
1990 | 2000 | | |
1991 | 2001 | | |
1992 | 2002 | | |
1993 | | - | |
| 2003 | + | |
| 2004 | + | |
1994 | 2005 | | |
1995 | | - | |
1996 | | - | |
1997 | | - | |
1998 | | - | |
1999 | | - | |
2000 | | - | |
2001 | | - | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
| 2006 | + | |
| 2007 | + | |
2022 | 2008 | | |
2023 | 2009 | | |
2024 | 2010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| 663 | + | |
663 | 664 | | |
664 | 665 | | |
665 | 666 | | |
| |||
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
717 | | - | |
718 | | - | |
719 | 718 | | |
720 | 719 | | |
721 | 720 | | |
| |||
738 | 737 | | |
739 | 738 | | |
740 | 739 | | |
741 | | - | |
742 | | - | |
743 | | - | |
| 740 | + | |
| 741 | + | |
744 | 742 | | |
745 | 743 | | |
746 | 744 | | |
| |||
0 commit comments