Revision ea2ae6dd nest/rt-table.c

View differences:

nest/rt-table.c
978 978
    {
979 979
      struct ea_list *tmpa, *old_tmpa;
980 980
      struct proto *p0 = e->attrs->proto;
981
      struct proto *p1 = d->import_protocol;
981
      struct proto *p1 = d->export_protocol;
982 982
      struct proto *p2 = d->show_protocol;
983 983
      d->rt_counter++;
984 984
      ee = e;
......
986 986
      old_tmpa = tmpa = p0->make_tmp_attrs ? p0->make_tmp_attrs(e, rte_update_pool) : NULL;
987 987
      ok = (d->filter == FILTER_ACCEPT || f_run(d->filter, &e, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) <= F_ACCEPT);
988 988
      if (p2 && p2 != p0) ok = 0;
989
      if (ok && d->import_mode)
989
      if (ok && d->export_mode)
990 990
	{
991 991
	  int ic = (p1->import_control ? p1->import_control(p1, &e, &tmpa, rte_update_pool) : 0);
992 992
	  if (ic < 0)
993 993
	    ok = 0;
994
	  else if (!ic && d->import_mode > 1)
994
	  else if (!ic && d->export_mode > 1)
995 995
	    {
996 996
	      if (p1->out_filter == FILTER_REJECT ||
997 997
		  p1->out_filter && f_run(p1->out_filter, &e, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) > F_ACCEPT)
......
1033 1033
	  cli_printf(c, 8004, "Stopped due to reconfiguration");
1034 1034
	  goto done;
1035 1035
	}
1036
      if (d->import_protocol &&
1037
	  d->import_protocol->core_state != FS_HAPPY &&
1038
	  d->import_protocol->core_state != FS_FEEDING)
1036
      if (d->export_protocol &&
1037
	  d->export_protocol->core_state != FS_HAPPY &&
1038
	  d->export_protocol->core_state != FS_FEEDING)
1039 1039
	{
1040 1040
	  cli_printf(c, 8005, "Protocol is down");
1041 1041
	  goto done;

Also available in: Unified diff