Re: bgpd: check max prefix just once

2018-07-09 Thread Claudio Jeker
On Mon, Jul 09, 2018 at 05:50:07PM +0200, Denis Fondras wrote: > I am late for a comment because it has already been commited but... > > > @@ -1373,6 +1339,14 @@ rde_update_update(struct rde_peer *peer, > > if (path_update([RIB_ADJ_IN].rib, peer, asp, prefix, prefixlen, 0)) > >

Re: bgpd: check max prefix just once

2018-07-09 Thread Denis Fondras
I am late for a comment because it has already been commited but... > @@ -1373,6 +1339,14 @@ rde_update_update(struct rde_peer *peer, > if (path_update([RIB_ADJ_IN].rib, peer, asp, prefix, prefixlen, 0)) > peer->prefix_cnt++; > > + /* max prefix checker */ > + if

bgpd: check max prefix just once

2018-07-09 Thread Claudio Jeker
No need to duplicate the same block over and over again. Just check it when we increment the counter and return failure if we hit the limit. OK? -- :wq Claudio Index: rde.c === RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving