• Dan Smith's avatar
    Add ip route save/restore · f4ff11e3
    Dan Smith authored
    This patch adds save and restore commands to "ip route". Save dumps
    the RTNL stream to stdout which can then be passed to restore later.
    This may be helpful in some normal situations, and will allow C/R to
    migrate the routing information in userspace.  Tweaking of the stream
    can be done by userspace helpers to convert between versions and adjust
    things like device indexes when restoring routes in a different
    environment.
    
    By factoring out some of the common bits of print_route() into
    filter_nlmsg(), the "save" command can use the same selection logic
    as "list," allowing the caller to save only specific routes as
    necessary.
    
    The only change since the RFC is the addition of manpage and doc
    material.
    Signed-off-by: default avatarDan Smith <danms@us.ibm.com>
    f4ff11e3
iproute.c 42.5 KB