[quagga-dev 1095] Re: point-to-point patch
paul at clubi.ie
Wed Apr 28 19:10:56 BST 2004
On Wed, 28 Apr 2004, Andrew J. Schorr wrote:
> I guess it's pretty obvious that I prefer the NULL pointer
> Just to try out the alternative, I made the following test patch
> to zebra/interface.c:connected_dump_vty():
> --- ./zebra/interface.c.test 2004-03-18 10:40:33.000000000 -0500
> +++ ./zebra/interface.c 2004-04-28 13:32:36.000000000 -0400
> @@ -413,7 +413,15 @@
> /* If there is destination address, print it. */
> p = connected->destination;
> - if (p)
> + /* only IPV4 and IPV6 address families are currently supported by
> + the prefix_vty_out() display function (since it calls inet_ntop) */
> + if ((p->family == AF_INET) ? (p->u.prefix4.s_addr != INADDR_ANY) :
> +#ifdef HAVE_IPV6
> + ((p->family == AF_INET6) && IPV6_ADDR_CMP(&p->u.prefix6,&in6addr_any))
> + 0
> + )
> if (p->family == AF_INET)
> if (ifp->flags & IFF_BROADCAST)
> Is that what you guys are proposing? I guess we could package that
> test in a macro,
A nice wee function, even better.
> but it does raise the question of whether address families other
> than AF_INET and AF_INET6 are or will be supported...
For ospfd, it doesnt matter. For lib/, some handy generic function?
prefix_is_subneted_ptp() or something more appropriate? (add a _ipv4
variant for stuff that deals only with v4, eg ospfd).
Paul Jakma paul at clubi.ie paul at jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam at dishone.st
A vivid and creative mind characterizes you.
More information about the Quagga-dev