Xin Long 4ef1a7cb08 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: 81f6cb31222d ("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>
2020-08-18 15:58:53 -07:00
..
2019-01-23 11:18:00 -08:00
2020-05-05 13:23:29 -07:00
2019-12-09 10:36:44 -08:00
2020-07-01 15:49:11 -07:00
2020-06-22 21:12:44 -07:00
2020-07-19 19:20:22 -07:00
2020-07-24 15:41:54 -07:00
2020-07-24 15:41:54 -07:00
2018-09-13 09:04:58 -07:00
2019-12-09 10:36:44 -08:00
2020-03-04 13:25:55 -08:00
2020-03-23 21:57:44 -07:00
2019-04-22 21:47:25 -07:00
2019-10-05 16:29:00 -07:00
2020-08-06 19:44:25 -07:00
2020-06-18 20:46:23 -07:00
2019-12-09 10:28:43 -08:00
2020-07-13 15:32:56 -07:00