On Thu, Jan 27, 2011 at 05:19:25PM +0000, Stuart Henderson wrote:
> fixed, thanks.
>
> On 2011/01/27 17:07, Sebastian Benoit wrote:
> > Hi,
> >
> > the configuration option in bgpd.conf is called "enforce neighbor-as", not
> > "enforce remote-as".
> >
> > /Benno
> >
> >
> > --- rde.c.orig Thu Jan 27 17:02:08 2011
> > +++ rde.c Thu Jan 27 17:02:51 2011
> > @@ -921,7 +921,7 @@
> > if (peer->conf.remote_as !=
> > aspath_neighbor(asp->aspath)) {
> > log_peer_warnx(&peer->conf, "bad path, "
> > - "enforce remote-as enabled");
> > + "enforce neighbor-as enabled");
> > rde_update_err(peer, ERR_UPDATE, ERR_UPD_ASPATH,
> > NULL, 0);
> > goto done;
>
After a bit more thinking I like this version a lot better. This correctly
prints the neighbor AS number in both cases 16bit and 32bit AS Number.
Comments?
--
:wq Claudio
Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
retrieving revision 1.306
diff -u -p -r1.306 rde.c
--- rde.c 29 Jan 2011 17:10:45 -0000 1.306
+++ rde.c 14 Feb 2011 19:48:11 -0000
@@ -922,8 +922,8 @@ rde_update_dispatch(struct imsg *imsg)
fas = aspath_neighbor(asp->aspath);
if (peer->conf.remote_as != fas) {
log_peer_warnx(&peer->conf, "bad path, "
- "starting with %i, "
- "enforce neighbor-as enabled", fas);
+ "starting with %s, "
+ "enforce neighbor-as enabled", log_as(fas));
rde_update_err(peer, ERR_UPDATE, ERR_UPD_ASPATH,
NULL, 0);
goto done;