Commit 3b0ff09a authored by Jan Moskyto Matejka's avatar Jan Moskyto Matejka
Browse files

Merge branch 'int-new' into bash-completion

parents a109ef6b a1f5e514
Loading
Loading
Loading
Loading
+25 −7
Original line number Diff line number Diff line
@@ -1596,13 +1596,12 @@ networks. Babel is conceptually very simple in its operation and "just works"
in its default configuration, though some configuration is possible and in some
cases desirable.

<p>While the Babel protocol is dual stack (i.e., can carry both IPv4 and IPv6
routes over the same IPv6 transport), BIRD presently implements only the IPv6
subset of the protocol. No Babel extensions are implemented, but the BIRD
implementation can coexist with implementations using the extensions (and will
just ignore extension messages).
<p>The Babel protocol is dual stack; i.e., it can carry both IPv4 and IPv6
routes over the same IPv6 transport. For sending and receiving Babel packets,
only a link-local IPv6 address is needed.

<p>The Babel protocol implementation in BIRD is currently in alpha stage.
<p>BIRD does not implement any Babel extensions, but will coexist with
implementations using extensions (and will just ignore extension messages).

<sect1>Configuration
<label id="babel-config">
@@ -1623,6 +1622,8 @@ protocol babel [<name>] {
		rx buffer <number>;
		tx length <number>;
		check link <switch>;
		next hop ipv4 <address>;
		next hop ipv6 <address>;
	};
}
</code>
@@ -1680,6 +1681,18 @@ protocol babel [<name>] {
      routes received from them are withdrawn. It is possible that some
      hardware drivers or platforms do not implement this feature. Default:
      yes.

      <tag><label id="babel-next-hop-ipv4">next hop ipv4 <m/address/</tag>
      Set the next hop address advertised for IPv4 routes advertised on this
      interface. If not set, the first IPv4 address found on the interface will
      be used, so it should only be necessary to set this option if this
      auto-detection fails or finds the wrong address.

      <tag><label id="babel-next-hop-ipv6">next hop ipv6 <m/address/</tag>
      Set the next hop address advertised for IPv6 routes advertised on this
      interface. If not set, the same link-local address that is used as the
      source for Babel packets will be used. In normal operation, it should not
      be necessary to set this option.
</descrip>

<sect1>Attributes
@@ -1708,7 +1721,12 @@ protocol babel {
	# configured on local interfaces, plus re-distribute all routes received
	# from other babel peers.

	ipv4 {
		export where (source = RTS_DEVICE) || (source = RTS_BABEL);
	};
	ipv6 {
		export where (source = RTS_DEVICE) || (source = RTS_BABEL);
	};
}
</code>

+4 −0
Original line number Diff line number Diff line
@@ -366,12 +366,16 @@ struct nexthop {
  ip_addr gw;				/* Next hop */
  struct iface *iface;			/* Outgoing interface */
  struct nexthop *next;
  byte flags;
  byte weight;
  byte labels_orig;			/* Number of labels before hostentry was applied */
  byte labels;				/* Number of all labels */
  u32 label[0];
};

#define RNF_ONLINK		0x1	/* Gateway is onlink regardless of IP ranges */


struct rte_src {
  struct rte_src *next;			/* Hash chain */
  struct proto *proto;			/* Protocol the source is based on */
+5 −1
Original line number Diff line number Diff line
@@ -171,7 +171,9 @@ nexthop__same(struct nexthop *x, struct nexthop *y)
{
  for (; x && y; x = x->next, y = y->next)
  {
    if (!ipa_equal(x->gw, y->gw) || (x->iface != y->iface) || (x->weight != y->weight) || (x->labels != y->labels))
    if (!ipa_equal(x->gw, y->gw) || (x->iface != y->iface) ||
	(x->flags != y->flags) || (x->weight != y->weight) ||
	(x->labels != y->labels))
      return 0;

    for (int i = 0; i < x->labels; i++)
@@ -193,6 +195,8 @@ nexthop_compare_node(struct nexthop *x, struct nexthop *y)
  if (!y)
    return -1;

  /* Should we also compare flags ? */

  r = ((int) y->weight) - ((int) x->weight);
  if (r)
    return r;
+5 −2
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, ea_list *tm
    for (nh = &(a->nh); nh; nh = nh->next)
    {
      char mpls[MPLS_MAX_LABEL_STACK*12 + 5], *lsp = mpls;
      char *onlink = (nh->flags & RNF_ONLINK) ? " onlink" : "";

      if (nh->labels)
        {
@@ -80,9 +81,11 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, ea_list *tm
      *lsp = '\0';

      if (a->nh.next)
	cli_printf(c, -1007, "\tvia %I%s on %s weight %d", nh->gw, mpls, nh->iface->name, nh->weight + 1);
	cli_printf(c, -1007, "\tvia %I%s on %s%s weight %d",
		   nh->gw, mpls, nh->iface->name, onlink, nh->weight + 1);
      else
	cli_printf(c, -1007, "\tvia %I%s on %s", nh->gw, mpls, nh->iface->name);
	cli_printf(c, -1007, "\tvia %I%s on %s%s",
		   nh->gw, mpls, nh->iface->name, onlink);
    }

  if (d->verbose)
+4 −1
Original line number Diff line number Diff line
@@ -1819,7 +1819,10 @@ no_nexthop:
      }
    }
    if (ipa_nonzero(nh->gw))
    {
      nhp->gw = nh->gw;			/* Router nexthop */
      nhp->flags |= (nh->flags & RNF_ONLINK);
    }
    else if (ipa_nonzero(he->link))
      nhp->gw = he->link;		/* Device nexthop with link-local address known */
    else
Loading