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(&ribs[RIB_ADJ_IN].rib, peer, asp, prefix, prefixlen, 0))
> > peer->prefix_cnt++;
> >
> > + /* max prefix checker */
> > + if (peer->conf.max_prefix && peer->prefix_cnt > peer->conf.max_prefix) {
> > + log_peer_warnx(&peer->conf, "prefix limit reached (>%u/%u)",
>
> Is it useful to display peer->prefix_cnt here ? I think it will always be
> peer->conf.max_prefix+1
>
> > + peer->prefix_cnt, peer->conf.max_prefix);
> > + rde_update_err(peer, ERR_CEASE, ERR_CEASE_MAX_PREFIX, NULL, 0);
> > + return (-1);
> > + }
> > +
> > p = prefix_get(&ribs[RIB_ADJ_IN].rib, peer, prefix, prefixlen, 0);
> > if (p == NULL)
> > fatalx("rde_update_update: no prefix in Adj-RIB-In");
>
If you change max-prefix and reload then it is possible to be different.
I agree that the message could be better. Lucky us we only need to adjust
it once now :)
--
:wq Claudio