]> git.proxmox.com Git - mirror_iproute2.git/commit
Add ip route save/restore
authorDan Smith <danms@us.ibm.com>
Wed, 1 Dec 2010 19:24:58 +0000 (11:24 -0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Wed, 1 Dec 2010 19:24:58 +0000 (11:24 -0800)
commitf4ff11e3e298d457c4f30813e305f7d27d89823a
tree9a906101fc2213bae70aece7a5b6749452d168be
parent3822cc986cc33751b82a22b91289ef088d94440c
Add ip route save/restore

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: Dan Smith <danms@us.ibm.com>
doc/ip-cref.tex
ip/iproute.c
man/man8/ip.8