Mailing List Archive

Quagga ip address label problem
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>
Re: Quagga ip address label problem [ In reply to ]
\ wrote:
> 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.

Seems OK.

--
Hasso Tepper
Elion Enterprises Ltd.
WAN administrator
Re: Quagga ip address label problem [ In reply to ]
Hasso Tepper wrote:

>>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.
>
>
> Seems OK.

Yep, makes sense, clearly this is an invalid state that needs fixing.

However, can someone point out the usability of the 'secondary' keyword
in zebra/quagga vty in the first place? I haven't found any, apart from
being Cisco-like (but only syntactically, in this case, it has no effect
on kernel addressing, at least not with Linux).

Gilad
Re: Quagga ip address label problem [ In reply to ]
On Tue, 5 Aug 2003, Gilad Arnold wrote:
> Hasso Tepper wrote:
>
> >>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.
> >
> >
> > Seems OK.
>
> Yep, makes sense, clearly this is an invalid state that needs fixing.
>
> However, can someone point out the usability of the 'secondary' keyword
> in zebra/quagga vty in the first place? I haven't found any, apart from
> being Cisco-like (but only syntactically, in this case, it has no effect
> on kernel addressing, at least not with Linux).
>
> Gilad

Gentlemen,

Let us not forget that Linux is not the only operating system Quagga runs
on. Also, the "secondary" keyword is MUCH more important to me than the
"label" keyword.


--
John Fraizer | High-Security Datacenter Services |
President | Dedicated circuits 64k - 155M OC3 |
EnterZone, Inc | Virtual, Dedicated, Colocation |
http://www.enterzone.net/ | Network Consulting Services |
Re: Quagga ip address label problem [ In reply to ]
John Fraizer wrote:

>>However, can someone point out the usability of the 'secondary' keyword
>>in zebra/quagga vty in the first place? I haven't found any, apart from
>>being Cisco-like (but only syntactically, in this case, it has no effect
>>on kernel addressing, at least not with Linux).
>
> Let us not forget that Linux is not the only operating system Quagga runs
> on. Also, the "secondary" keyword is MUCH more important to me than the
> "label" keyword.

No doubt that, both arguments. Yet, is there an actual effect to the
'secondary' keyword on other platforms? (at least for FreeBSD, I assume
it's not the expected IOS-like, FreeBSD has an even finer resolution for
IP address chaining, isn't it?)

Just curious.

Gilad
Re: Quagga ip address label problem [ In reply to ]
On Tue, 5 Aug 2003, John Fraizer wrote:

> Gentlemen,
>
> Let us not forget that Linux is not the only operating system
> Quagga runs on. Also, the "secondary" keyword is MUCH more
> important to me than the "label" keyword.

indeed. however, i can only comment on linux.

i assume other quagga supported platforms are similarly not as
primitive wrt 'primary' address as IOS is.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
Biology is the only science in which multiplication means the same thing
as division.
Re: Quagga ip address label problem [ In reply to ]
What is wrong with having certain commands/options only being availble
on specific platforms? If 'secondary' does not have a specific meaning
on linux, when running on linux it should either be a no-op and not saved
in the config file or the option should not even be availble.

Just my $0.02 (US)

--
James R. Leu

On Tue, Aug 05, 2003 at 05:18:17PM +0100, Paul Jakma wrote:
> On Tue, 5 Aug 2003, John Fraizer wrote:
>
> > Gentlemen,
> >
> > Let us not forget that Linux is not the only operating system
> > Quagga runs on. Also, the "secondary" keyword is MUCH more
> > important to me than the "label" keyword.
>
> indeed. however, i can only comment on linux.
>
> i assume other quagga supported platforms are similarly not as
> primitive wrt 'primary' address as IOS is.
>
> regards,
> --
> Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
> warning: do not ever send email to spam@dishone.st
> Fortune:
> Biology is the only science in which multiplication means the same thing
> as division.
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev@lists.quagga.net
> http://lists.quagga.net/mailman/listinfo/quagga-dev
Re: Quagga ip address label problem [ In reply to ]
James R. Leu wrote:

> What is wrong with having certain commands/options only being availble
> on specific platforms? If 'secondary' does not have a specific meaning
> on linux, when running on linux it should either be a no-op and not saved
> in the config file or the option should not even be availble.

AFAICT, Paul was suggesting to use the 'secondary' attribute to derive
meanings as of ospfd address usage, etc. According to your suggestions,
if it isn't available on some platform, then anything relying on its
presence is not working. Otherwise if it's a NOP on some platforms, then
it might imply different behaviors of the same config ran with different
platforms. My suspect here is that it bears no meaning at all, for all
(or most) *nix kernels, and mostly it's there because it's Cisco-vty
compliant.

Gilad
Re: Quagga ip address label problem [ In reply to ]
On Tue, 5 Aug 2003, James R. Leu wrote:

> What is wrong with having certain commands/options only being
> availble on specific platforms?

well, it'd be nice to try avoid this.

> If 'secondary' does not have a specific meaning on linux, when
> running on linux it should either be a no-op and not saved in the
> config file or the option should not even be availble.

ah, but it does have meaning on linux - the kernel sets it.

what i was getting at is that it'd be nice to formalise the meaning
of this flag within zebra. Ie that zebra would provide a meaning to
this flag that we could rely on.

> Just my $0.02 (US)

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
Do you guys know what you're doing, or are you just hacking?