Commit 9fb076dc authored by Jan Maria Matejka's avatar Jan Maria Matejka
Browse files

Protocol: Linpool is not needed in preexport hook, removing.

parent 5911740c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -261,22 +261,20 @@ void store_tmp_attrs(rte *e, ea_list *attrs)
 * preexport - pre-filtering decisions before route export
 * @p: protocol instance the route is going to be exported to
 * @e: the route in question
 * @attrs: extended attributes of the route
 * @pool: linear pool for allocation of all temporary data
 *
 * The preexport() hook is called as the first step of a exporting
 * a route from a routing table to the protocol instance. It can modify
 * route attributes and force acceptance or rejection of the route before
 * a route from a routing table to the protocol instance. It can
 * force acceptance or rejection of the route before
 * the user-specified filters are run. See rte_announce() for a complete description
 * of the route distribution process.
 *
 * The standard use of this hook is to reject routes having originated
 * from the same instance and to set default values of the protocol's metrics.
 * from the same instance.
 *
 * Result: 1 if the route has to be accepted, -1 if rejected and 0 if it
 * should be passed to the filters.
 */
int preexport(struct proto *p, rte **e, ea_list **attrs, struct linpool *pool)
int preexport(struct proto *p, rte **e)
{ DUMMY; }

/**
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ struct proto {
  void (*neigh_notify)(struct neighbor *neigh);
  struct ea_list *(*make_tmp_attrs)(struct rte *rt, struct linpool *pool);
  void (*store_tmp_attrs)(struct rte *rt);
  int (*preexport)(struct proto *, struct rte **rt, struct linpool *pool);
  int (*preexport)(struct proto *, struct rte **rt);
  void (*reload_routes)(struct channel *);
  void (*feed_begin)(struct channel *, int initial);
  void (*feed_end)(struct channel *);
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
      else if (d->export_mode)
	{
	  struct proto *ep = ec->proto;
	  int ic = ep->preexport ? ep->preexport(ep, &e, c->show_pool) : 0;
	  int ic = ep->preexport ? ep->preexport(ep, &e) : 0;

	  if (ec->ra_mode == RA_OPTIMAL || ec->ra_mode == RA_MERGED)
	    pass = 1;
+2 −2
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ export_filter(struct channel *c, rte *rt0, rte **rt_free, linpool *pool, int sil

  rte_make_tmp_attrs(&rt, pool);

  v = p->preexport ? p->preexport(p, &rt, pool) : 0;
  v = p->preexport ? p->preexport(p, &rt) : 0;
  if (v < 0)
    {
      if (silent)
@@ -1420,7 +1420,7 @@ rt_examine(rtable *t, net_addr *a, struct proto *p, struct filter *filter, struc

  /* Rest is stripped down export_filter() */
  rte_make_tmp_attrs(&rt, lp);
  int v = p->preexport ? p->preexport(p, &rt, lp) : 0;
  int v = p->preexport ? p->preexport(p, &rt) : 0;
  if (v == RIC_PROCESS)
    v = (f_run(filter, &rt, lp, FF_SILENT) <= F_ACCEPT);

+1 −1
Original line number Diff line number Diff line
@@ -2095,7 +2095,7 @@ babel_prepare_attrs(struct linpool *pool, ea_list *next, uint metric, u64 router


static int
babel_preexport(struct proto *P, struct rte **new, struct linpool *pool UNUSED)
babel_preexport(struct proto *P, struct rte **new)
{
  struct rta *a = (*new)->attrs;

Loading