Commit 3fe1d9e4 authored by Ondrej Filip's avatar Ondrej Filip
Browse files

Merge branch 'master' of ssh://git.nic.cz/bird

parents 72b2db8d 95127cbb
Loading
Loading
Loading
Loading
+23 −7
Original line number Diff line number Diff line
@@ -1811,7 +1811,7 @@ protocol ospf <name> {
			summary <switch>;
			cost <num>;
		}
		interface <interface pattern> {
		interface <interface pattern> [instance <num>] {
			cost <num>;
			stub <switch>;
			hello <num>;
@@ -1825,6 +1825,7 @@ protocol ospf <name> {
			type [broadcast|bcast|pointopoint|ptp|
				nonbroadcast|nbma|pointomultipoint|ptmp];
			strict nonbroadcast <switch>;
			real broadcast <switch>;
			check link <switch>;
			ecmp weight <num>;
			authentication [none|simple|cryptographic];
@@ -1841,7 +1842,7 @@ protocol ospf <name> {
				<ip> eligible;
			};
		};
		virtual link <id>	{
		virtual link <id> [instance <num>] {
			hello <num>;
			retransmit <num>;
			wait <num>;
@@ -1961,14 +1962,19 @@ protocol ospf <name> {
	 subnetworks of given stub network are suppressed. This might
	 be used, for example, to aggregate generated stub networks.
	 
	<tag>interface <M>pattern</M></tag>
	<tag>interface <M>pattern</M> [instance <m/num/]</tag>
	 Defines that the specified interfaces belong to the area being defined.
	 See <ref id="dsc-iface" name="interface"> common option for detailed description.
	 In OSPFv3, you can specify instance ID for that interface
	 description, so it is possible to have several instances of
	 that interface with different options or even in different areas.

	<tag>virtual link <M>id</M></tag>
	 Virtual link to router with the router id. Virtual link acts as a
         point-to-point interface belonging to backbone. The actual area is
         used as transport area. This item cannot be in the backbone.
	<tag>virtual link <M>id</M> [instance <m/num/]</tag>
	 Virtual link to router with the router id. Virtual link acts
         as a point-to-point interface belonging to backbone. The
         actual area is used as transport area. This item cannot be in
         the backbone. In OSPFv3, you could also use several virtual
         links to one destination with different instance IDs.

	<tag>cost <M>num</M></tag>
	 Specifies output cost (metric) of an interface. Default value is 10.
@@ -2053,6 +2059,16 @@ protocol ospf &lt;name&gt; {
	 If set, don't send hello to any undefined neighbor. This switch
	 is ignored on other than NBMA or PtMP networks. Default value is no.

	<tag>real broadcast <m/switch/</tag>
	 In <cf/type broadcast/ or <cf/type ptp/ network
	 configuration, OSPF packets are sent as IP multicast
	 packets. This option changes the behavior to using
	 old-fashioned IP broadcast packets. This may be useful as a
	 workaround if IP multicast for some reason does not work or
	 does not work reliably. This is a non-standard option and
	 probably is not interoperable with other OSPF
	 implementations. Default value is no.

	<tag>check link <M>switch</M></tag>
	 If set, a hardware link state (reported by OS) is taken into
	 consideration. When a link disappears (e.g. an ethernet cable is
+1 −4
Original line number Diff line number Diff line
@@ -799,10 +799,7 @@ void
rte_dump(rte *e)
{
  net *n = e->net;
  if (n)
  debug("%-1I/%2d ", n->n.prefix, n->n.pxlen);
  else
    debug("??? ");
  debug("KF=%02x PF=%02x pref=%d lm=%d ", n->n.flags, e->pflags, e->pref, now-e->lastmod);
  rta_dump(e->attrs);
  if (e->attrs->proto->proto->dump_attrs)
+0 −3
Original line number Diff line number Diff line
@@ -1031,9 +1031,6 @@ bgp_do_rx_update(struct bgp_conn *conn,
	      if (n = net_find(p->p.table, prefix, pxlen))
		rte_update(p->p.table, n, &p->p, &p->p, NULL);
	    }

	  if (bgp_apply_limits(p) < 0)
	    goto done;
	}
    }

+21 −5
Original line number Diff line number Diff line
@@ -107,7 +107,17 @@ static inline void
check_defcost(int cost)
{
  if ((cost <= 0) || (cost >= LSINFINITY))
   cf_error("Default cost must be in range 1-%d", LSINFINITY);
   cf_error("Default cost must be in range 1-%d", LSINFINITY-1);
}

static inline void
set_instance_id(unsigned id)
{
#ifdef OSPFv3
  OSPF_PATT->instance_id = id;
#else
  cf_error("Instance ID requires OSPFv3");
#endif
}

CF_DECLS
@@ -120,7 +130,7 @@ CF_KEYWORDS(NONE, SIMPLE, AUTHENTICATION, STRICT, CRYPTOGRAPHIC)
CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK)
CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL)
CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY)
CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF)
CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL)

%type <t> opttext
%type <ld> lsadb_args
@@ -218,8 +228,8 @@ ospf_stubnet_item:
 ;

ospf_vlink:
   ospf_vlink_start '{' ospf_vlink_opts '}' { ospf_iface_finish(); }
 | ospf_vlink_start { ospf_iface_finish(); }
   ospf_vlink_start ospf_instance_id '{' ospf_vlink_opts '}' { ospf_iface_finish(); }
 | ospf_vlink_start ospf_instance_id { ospf_iface_finish(); }
 ;

ospf_vlink_opts:
@@ -277,6 +287,7 @@ ospf_iface_item:
 | TYPE PTP { OSPF_PATT->type = OSPF_IT_PTP ; }
 | TYPE POINTOMULTIPOINT { OSPF_PATT->type = OSPF_IT_PTMP ; }
 | TYPE PTMP { OSPF_PATT->type = OSPF_IT_PTMP ; }
 | REAL BROADCAST bool { OSPF_PATT->real_bcast = $3; if (OSPF_VERSION != 2) cf_error("Real broadcast option requires OSPFv2"); }
 | TRANSMIT DELAY expr { OSPF_PATT->inftransdelay = $3 ; if (($3<=0) || ($3>65535)) cf_error("Transmit delay must be in range 1-65535"); }
 | PRIORITY expr { OSPF_PATT->priority = $2 ; if (($2<0) || ($2>255)) cf_error("Priority must be in range 0-255"); }
 | STRICT NONBROADCAST bool { OSPF_PATT->strictnbma = $3 ; }
@@ -364,6 +375,11 @@ ospf_iface_start:
 }
;

ospf_instance_id:
   /* empty */
 | INSTANCE expr { set_instance_id($2); }
 ;

ospf_iface_opts:
   /* empty */
 | ospf_iface_opts ospf_iface_item ';'
@@ -375,7 +391,7 @@ ospf_iface_opt_list:
 ;

ospf_iface:
  ospf_iface_start iface_patt_list ospf_iface_opt_list { ospf_iface_finish(); }
  ospf_iface_start iface_patt_list ospf_instance_id ospf_iface_opt_list { ospf_iface_finish(); }
 ;

opttext:
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ ospf_hello_send(struct ospf_iface *ifa, int kind, struct ospf_neighbor *dirn)
  {
  case OSPF_IT_BCAST:
  case OSPF_IT_PTP:
    ospf_send_to(ifa, AllSPFRouters);
    ospf_send_to_all(ifa);
    break;

  case OSPF_IT_NBMA:
Loading