Mailing List Archive

Sun zebra_rib.c changes
Hi Sowmini,

The attached diff is what I've pulled from the Sun changes to
zebra_rib.c. Does it appear correct?

What happens if

if (ipv6 != NULL && IN6_IS_ADDR_LINKLOCAL(ipv6))

ipv6 is NULL but !IN6_IS_ADDR_LINKLOCAL(ipv6)? Does this mean routes
using link-local addresses are not allowed in IPv6?

Also, would it be good practice to set the gate to the link-local
address for other systems too, not just solaris for interface routes?
(or is this a funny solarisism?)

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
We are what we pretend to be.
-- Kurt Vonnegut, Jr.
Re: Sun zebra_rib.c changes [ In reply to ]
The questions are a bit confusing.

> What happens if
>
> if (ipv6 != NULL && IN6_IS_ADDR_LINKLOCAL(ipv6))

In the above case, nexthop->gate is set to ipv6.

> ipv6 is NULL but !IN6_IS_ADDR_LINKLOCAL(ipv6)?

If ipv6 is null, then the function will lookup the link-local
address for that interface and use the link-local address for the nexthop.

> Does this mean routes
> using link-local addresses are not allowed in IPv6?

no. all it means is that the next hop has to be a linklocal.

> Also, would it be good practice to set the gate to the link-local
> address for other systems too, not just solaris for interface routes?
> (or is this a funny solarisism?)

I think (not sure) that, on most other systems, if no nexthop is specified, the
kernel will automatically use the link-local address of the interface
as the next hop (e.g., when you do add an interface route via 'route add').
Solaris doesn't do this, so I had to introduce the function.
Re: Sun zebra_rib.c changes [ In reply to ]
On Mon, 17 May 2004 sowmini.varadhan@Sun.COM wrote:

> The questions are a bit confusing.

Possibly.

> > What happens if
> >
> > if (ipv6 != NULL && IN6_IS_ADDR_LINKLOCAL(ipv6))
>
> In the above case, nexthop->gate is set to ipv6.

Sorry, the question is the next line, relating to the above.

> > ipv6 is NULL but !IN6_IS_ADDR_LINKLOCAL(ipv6)?
>
> If ipv6 is null, then the function will lookup the link-local
> address for that interface and use the link-local address for the
> nexthop.

What happens if someone passes in an address that is not link-local?

> no. all it means is that the next hop has to be a linklocal.

Ok.

> I think (not sure) that, on most other systems, if no nexthop is
> specified, the kernel will automatically use the link-local address
> of the interface as the next hop (e.g., when you do add an
> interface route via 'route add'). Solaris doesn't do this, so I
> had to introduce the function.

Hmmm, so it might be an idea to do this on all platforms, if it is
the correct thing to do.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
"We demand rigidly defined areas of doubt and uncertainty!"
-- Vroomfondel
Re: Sun zebra_rib.c changes [ In reply to ]
> What happens if someone passes in an address that is not link-local?

Then it will call if_lookup_linklocal and find a linklocal addr.