Commit 75d98b60 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

Merge branch 'master' into int-new

parents ace3072e d6cf9961
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -587,6 +587,7 @@ val_format_str(struct f_val v) {
static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS;

#define runtime(fmt, ...) do { \
    if (!(f_flags & FF_SILENT)) \
      log_rl(&rl_runtime_err, L_ERR "filters, line %d: " fmt, what->lineno, ##__VA_ARGS__); \
    res.type = T_RETURN; \
    res.val.i = F_ERROR; \
@@ -903,7 +904,8 @@ interpret(struct f_inst *what)
    break;
  case P('p',','):
    ONEARG;
    if (what->a2.i == F_NOP || (what->a2.i != F_NONL && what->a1.p))
    if ((what->a2.i == F_NOP || (what->a2.i != F_NONL && what->a1.p)) &&
	!(f_flags & FF_SILENT))
      log_commit(*L_INFO, &f_buf);

    switch (what->a2.i) {
@@ -1793,6 +1795,7 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc


  if (res.type != T_RETURN) {
    if (!(f_flags & FF_SILENT))
      log_rl(&rl_runtime_err, L_ERR "Filter %s did not return accept nor reject. Make up your mind", filter->name);
    return F_ERROR;
  }
+1 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ struct f_trie
#define NEW_F_VAL struct f_val * val; val = cfg_alloc(sizeof(struct f_val));

#define FF_FORCE_TMPATTR 1		/* Force all attributes to be temporary */
#define FF_SILENT 2			/* Silent filter execution */

/* Bird Tests */
struct f_bt_test_suite {
+2 −1
Original line number Diff line number Diff line
@@ -156,7 +156,8 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
	       * command may change the export filter and do not update routes.
	       */
	      int do_export = (ic > 0) ||
		(f_run(ec->out_filter, &e, &tmpa, c->show_pool, FF_FORCE_TMPATTR) <= F_ACCEPT);
		(f_run(ec->out_filter, &e, &tmpa, c->show_pool,
		       FF_FORCE_TMPATTR | FF_SILENT) <= F_ACCEPT);

	      if (do_export != (d->export_mode == RSEM_EXPORT))
		goto skip;
+4 −2
Original line number Diff line number Diff line
@@ -387,7 +387,8 @@ export_filter_(struct channel *c, rte *rt0, rte **rt_free, ea_list **tmpa, linpo
    }

  v = filter && ((filter == FILTER_REJECT) ||
		 (f_run(filter, &rt, tmpa, pool, FF_FORCE_TMPATTR) > F_ACCEPT));
		 (f_run(filter, &rt, tmpa, pool,
			FF_FORCE_TMPATTR | (silent ? FF_SILENT : 0)) > F_ACCEPT));
  if (v)
    {
      if (silent)
@@ -1419,7 +1420,8 @@ rt_examine(rtable *t, net_addr *a, struct proto *p, struct filter *filter)
  ea_list *tmpa = rte_make_tmp_attrs(rt, rte_update_pool);
  int v = p->import_control ? p->import_control(p, &rt, &tmpa, rte_update_pool) : 0;
  if (v == RIC_PROCESS)
    v = (f_run(filter, &rt, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) <= F_ACCEPT);
    v = (f_run(filter, &rt, &tmpa, rte_update_pool,
	       FF_FORCE_TMPATTR | FF_SILENT) <= F_ACCEPT);

   /* Discard temporary rte */
  if (rt != n->routes)
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ struct bgp_config {
  unsigned error_delay_time_min;	/* Time to wait after an error is detected */
  unsigned error_delay_time_max;
  unsigned disable_after_error;		/* Disable the protocol when error is detected */
  u32 disable_after_cease;		/* Disable it when cease is received, bitfield */

  char *password;			/* Password used for MD5 authentication */
  int check_link;			/* Use iface link state for liveness detection */
Loading