• Ido Schimmel's avatar
    ipv4: Replace route in list before notifying · 6324d0fa
    Ido Schimmel authored
    Subsequent patches will add an offload / trap indication to routes which
    will signal if the route is present in hardware or not.
    
    After programming the route to the hardware, drivers will have to ask
    the IPv4 code to set the flags by passing the route's key.
    
    In the case of route replace, the new route is notified before it is
    actually inserted into the FIB alias list. This can prevent simple
    drivers (e.g., netdevsim) that program the route to the hardware in the
    same context it is notified in from being able to set the flag.
    
    Solve this by first inserting the new route to the list and rollback the
    operation in case the route was vetoed.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6324d0fa
fib_trie.c 70.1 KB