• Andreas Hofmeister's avatar
    ipv6: Do not use routes from locally generated RAs · 9f56220f
    Andreas Hofmeister authored
    When hybrid mode is enabled (accept_ra == 2), the kernel also sees RAs
    generated locally. This is useful since it allows the kernel to auto-configure
    its own interface addresses.
    
    However, if 'accept_ra_defrtr' and/or 'accept_ra_rtr_pref' are set and the
    locally generated RAs announce the default route and/or other route information,
    the kernel happily inserts bogus routes with its own address as gateway.
    
    With this patch, adding routes from an RA will be skiped when the RAs source
    address matches any local address, just as if 'accept_ra_defrtr' and
    'accept_ra_rtr_pref' were set to 0.
    Signed-off-by: default avatarAndreas Hofmeister <andi@collax.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9f56220f
ndisc.c 46.1 KB