Mailing List Archive

Re: Jose's Patch for Route Server Capabilities onSolaris Machines
Ok, it's a very little bug in the patch. I hadn't noticed because I
always compile with IPv6, and the problem only arises when
'HAVE_IPV6' is not defined.

In the line 218 of the patch, where it says:

+ if ((p->family == AF_INET && attr->nexthop.s_addr == 0)
+#ifdef HAVE_IPV6
+ || (p->family == AF_INET6 && ri->peer == bgp->peer_self))
+#endif /* HAVE_IPV6 */

The parenthesis shouldn't be closed inside de 'ifdef' clause, because when
'HAVE_IPV6' is not defined, the parenthesis doesn't get closed and logically
compilation fails.

I attach a corrected version of the patch.

Sorry and thanks to Mike for the bug report :-)

Jose

----- Original Message -----
From: Gibbs, Michael
To: quagga-dev@lists.quagga.net
Sent: Friday, January 09, 2004 7:02 PM
Subject: [quagga-dev 681] Jose's Patch for Route Server Capabilities onSolaris Machines


After applying the patches, compiling crashes at:



la-rs01# gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I. -I. -I.. -I.. -I.. -I../lib -g -O2 -Wall -c `test -f 'bgp_route.c' || echo './'`bgp_route.c

bgp_route.c: In function `bgp_announce_check_rsclient':

bgp_route.c:899: parse error before `{'

bgp_route.c:808: warning: unused variable `info'

bgp_route.c:805: warning: unused variable `ret'

bgp_route.c:908: warning: control reaches end of non-void function

bgp_route.c: At top level:

bgp_route.c:950: parse error before `0'

bgp_route.c:952: warning: type defaults to `int' in declaration of `zlog'

bgp_route.c:952: conflicting types for `zlog'

../lib/log.h:93: previous declaration of `zlog'

bgp_route.c:953: warning: type defaults to `int' in declaration of `p'

bgp_route.c:953: parse error before `->'

bgp_route.c:961: parse error before `->'

bgp_route.c: In function `bgp_update_rsclient':

bgp_route.c:1405: warning: unused variable `buf2'

la-rs01# make depend

make: *** No rule to make target `depend'. Stop.

la-rs01#



This is on:



la-rs01# uname -a

SunOS la-rs01 5.9 Generic_112233-08 sun4u sparc SUNW,Ultra-250

la-rs01#



Moving it to a FreeBSD box, it compiles without a hitch. Any ideas as to what could be causing the issue?



Mike Gibbs



------------------------------------------------------------------------------


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
Re: Jose's Patch for Route Server Capabilities onSolaris Machines [ In reply to ]
On Sat, 10 Jan 2004, Jose Luis Rubio wrote:

> I attach a corrected version of the patch.

I meant to comment on your patch:

1. you're using tabbed indentation in places, please use 2-space
indents everywhere.

2. some spanish seems to have crept into debug zlog's :)

3. further, unconditional logging of debug information.

4. bgp_process_rsclient and bgp_process_main - there is a section of
code replicated 3 times here which probably should be consolidated.

looks good! and it includes peer-group support too, hadnt realised
that. nice :)

> Sorry and thanks to Mike for the bug report :-)
>
> Jose

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
Know how to save 5 drowning lawyers?

-- No?

GOOD!
Re: Jose's Patch for Route Server CapabilitiesonSolaris Machines [ In reply to ]
> I meant to comment on your patch:
>
> 1. you're using tabbed indentation in places, please use 2-space
> indents everywhere.
>
> 2. some spanish seems to have crept into debug zlog's :)
>
> 3. further, unconditional logging of debug information.
>
> 4. bgp_process_rsclient and bgp_process_main - there is a section of
> code replicated 3 times here which probably should be consolidated.

OK, fixed all that
+ fixed some minor problems when compiling without IPv6 (thaks to Mike)
+ fixed a bug that I discovered yesterday in the 'clear bgp * rsclient'
command.

> regards,

Regards,

Jose