Hello,
Some time ago (originally reported in [zebra 14971]), I discovered, that
when entering a Zebra configuration like
interface lo
ip address 192.168.0.1/32 label lo:0
it is written to the configuration file and read back as
interface lo
ip address 192.168.0.1/32 secondary label lo:0
which isn't accepted as input by the Zebra daemon.
The patch below makes the Zebra daemon output the "ip address" line
without the "secondary" keyword if a label exists, so that it is able to
read the written configuration, when restarted.
This is the original patch, but it still applies cleanly to todays
zebra-pj CVS (except for some minor offsets). I'm hoping, that you'll
consider it for the Quagga Project.
Regards,
Anders K. Pedersen
diff -ru zebra-0.93a.orig/zebra/interface.c
zebra-0.93a/zebra/interface.c
--- zebra-0.93a.orig/zebra/interface.c Wed Jan 16 19:26:34 2002
+++ zebra-0.93a/zebra/interface.c Sat Aug 3 23:36:16 2002
@@ -421,11 +421,10 @@
}
}
- if (CHECK_FLAG (connected->flags, ZEBRA_IFA_SECONDARY))
- vty_out (vty, " secondary");
-
if (connected->label)
vty_out (vty, " %s", connected->label);
+ else if (CHECK_FLAG (connected->flags, ZEBRA_IFA_SECONDARY))
+ vty_out (vty, " secondary");
vty_out (vty, "%s", VTY_NEWLINE);
}
@@ -1312,11 +1311,10 @@
inet_ntop (p->family, &p->u.prefix, buf,
BUFSIZ),
p->prefixlen);
- if (CHECK_FLAG (ifc->flags, ZEBRA_IFA_SECONDARY))
- vty_out (vty, " secondary");
-
if (ifc->label)
vty_out (vty, " label %s", ifc->label);
+ else if (CHECK_FLAG (ifc->flags, ZEBRA_IFA_SECONDARY))
+ vty_out (vty, " secondary");
vty_out (vty, "%s", VTY_NEWLINE);
}
--
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to "Anders K. Pedersen" <akp@cohaesio.com>
Some time ago (originally reported in [zebra 14971]), I discovered, that
when entering a Zebra configuration like
interface lo
ip address 192.168.0.1/32 label lo:0
it is written to the configuration file and read back as
interface lo
ip address 192.168.0.1/32 secondary label lo:0
which isn't accepted as input by the Zebra daemon.
The patch below makes the Zebra daemon output the "ip address" line
without the "secondary" keyword if a label exists, so that it is able to
read the written configuration, when restarted.
This is the original patch, but it still applies cleanly to todays
zebra-pj CVS (except for some minor offsets). I'm hoping, that you'll
consider it for the Quagga Project.
Regards,
Anders K. Pedersen
diff -ru zebra-0.93a.orig/zebra/interface.c
zebra-0.93a/zebra/interface.c
--- zebra-0.93a.orig/zebra/interface.c Wed Jan 16 19:26:34 2002
+++ zebra-0.93a/zebra/interface.c Sat Aug 3 23:36:16 2002
@@ -421,11 +421,10 @@
}
}
- if (CHECK_FLAG (connected->flags, ZEBRA_IFA_SECONDARY))
- vty_out (vty, " secondary");
-
if (connected->label)
vty_out (vty, " %s", connected->label);
+ else if (CHECK_FLAG (connected->flags, ZEBRA_IFA_SECONDARY))
+ vty_out (vty, " secondary");
vty_out (vty, "%s", VTY_NEWLINE);
}
@@ -1312,11 +1311,10 @@
inet_ntop (p->family, &p->u.prefix, buf,
BUFSIZ),
p->prefixlen);
- if (CHECK_FLAG (ifc->flags, ZEBRA_IFA_SECONDARY))
- vty_out (vty, " secondary");
-
if (ifc->label)
vty_out (vty, " label %s", ifc->label);
+ else if (CHECK_FLAG (ifc->flags, ZEBRA_IFA_SECONDARY))
+ vty_out (vty, " secondary");
vty_out (vty, "%s", VTY_NEWLINE);
}
--
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to "Anders K. Pedersen" <akp@cohaesio.com>