diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-20 12:25:25 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-20 12:25:25 +0100 |
commit | 562c03c527aa3a0c1e58dd1dec1a30df5af67138 (patch) | |
tree | 8e73a0cf3c2ecf14f2576100158f9f5b81082d6e /zebra/interface.c | |
parent | 3c2ac0426ffdc0091c80c0f11007c0b32b187ccb (diff) | |
download | quagga-562c03c527aa3a0c1e58dd1dec1a30df5af67138.tar.bz2 quagga-562c03c527aa3a0c1e58dd1dec1a30df5af67138.tar.xz |
zebra: labels, scopes and preference are IPv4 onlyquagga_1.1.0-dn42.11-rc1
avoid writing out configurations that we can't read back; in particular,
the scope field does get set for IPv6 addresses received from netlink
and would be written out for "ipv6 address" lines - but it can't
actually be configured.
Diffstat (limited to 'zebra/interface.c')
-rw-r--r-- | zebra/interface.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 23554620..d52dfa29 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1788,16 +1788,21 @@ if_config_write (struct vty *vty) } vty_out (vty, "/%d", p->prefixlen); + if (p->family == AF_INET) + { #ifdef HAVE_NETLINK - if (ifc->scope) - vty_out (vty, " scope %s", connected_scope_name (ifc->scope)); - if (ifc->label) - vty_out (vty, " label %s", ifc->label); + if (ifc->scope) + vty_out (vty, " scope %s", + connected_scope_name (ifc->scope)); + if (ifc->label) + vty_out (vty, " label %s", ifc->label); #endif #ifdef SIOCSIFADDRPREF - if (ifc->preference) - vty_out (vty, " preference %d", ifc->preference); + if (ifc->preference) + vty_out (vty, " preference %d", ifc->preference); #endif + } + vty_out (vty, "%s", VTY_NEWLINE); } } |