• Xin Long's avatar
    sctp: check ipv6 addr with sk_bound_dev if set · 6fe1e524
    Xin Long authored
    When binding to an ipv6 address, it calls ipv6_chk_addr() to check if
    this address is on any dev. If a socket binds to a l3mdev but no dev
    is passed to do this check, all l3mdev and slaves will be skipped and
    the check will fail.
    
    This patch is to pass the bound_dev to make sure the devices under the
    same l3mdev can be returned in ipv6_chk_addr(). When the bound_dev is
    not a l3mdev or l3slave, l3mdev_master_dev_rcu() will return NULL in
    __ipv6_chk_addr_and_flags(), it will keep compitable with before when
    NULL dev was passed.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6fe1e524
ipv6.c 31.9 KB