• David Ahern's avatar
    ipv4: Add function to send route updates · 1bff1a0c
    David Ahern authored
    Add fib_info_notify_update to walk the fib and send RTM_NEWROUTE
    notifications with NLM_F_REPLACE set for entries linked to a fib_info
    that have nh_updated flag set. This helper will be used by the nexthop
    code to notify userspace of routes that are impacted when a nexthop
    config is updated via replace. The new function and its helper are
    similar to how fib_flush and fib_table_flush work for address delete
    and link down events.
    
    This notification is needed for legacy apps that do not understand
    the new nexthop object. Apps that are nexthop aware can use the
    RTA_NH_ID attribute in the route notification to just ignore it.
    
    In the future this should be wrapped in a sysctl to allow OS'es that
    are fully updated to avoid the notificaton storm.
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1bff1a0c
ip_fib.h 13.2 KB