• Andrew Vagin's avatar
    route: filter routes by family if it's specified · 5b9ac190
    Andrew Vagin authored
    Currently when we specify AF_INET6 when it is disabled, we will get
    all routes.
    
    For example, we can boot kernel with ipv6.disable=1 and try to get ipv6
    routes:
    $ ip -6 route show
    default via 192.168.122.1 dev eth0  proto static  metric 100
    192.168.122.0/24 dev eth0  proto kernel  scope link  src 192.168.122.141  metric 100
    
    Here are ipv4 routes and this is unexpected behaviour.
    Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
    5b9ac190
iproute.c 48.6 KB