Commit 44062812 authored by Ondrej Filip's avatar Ondrej Filip
Browse files

Merge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new

parents 6f46465a 1561ee79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,3 +12,4 @@
/configure
/sysdep/autoconf.h.in
/sysdep/autoconf.h.in~
/cscope.*
+4 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ endif
docgoals := docs userdocs progdocs
testgoals := check test tests tests_run
cleangoals := clean distclean testsclean
.PHONY: all daemon cli $(docgoals) $(testgoals) $(cleangoals) tags
.PHONY: all daemon cli $(docgoals) $(testgoals) $(cleangoals) tags cscope
all: daemon cli

daemon: $(daemon)
@@ -162,6 +162,9 @@ endif
tags:
	cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`

cscope:
	cd $(srcdir) ; find $(dirs) -name *.[chY] > cscope.files ; cscope -b

# Install

install: all
+4 −3
Original line number Diff line number Diff line
@@ -22,13 +22,14 @@ protocol direct {

# Feed routes to kernel FIB
protocol kernel {
	ipv4 { export all; };
#	learn;			# Learn all routes from the kernel
	ipv4 { export all; import all; };
	learn;			# Learn all routes from the kernel
#	scan time 10;		# Scan kernel tables every 10 seconds
}

protocol kernel {
	ipv6;
	ipv6 { import all; };
	learn;
}

# Static route feed
+22 −2
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ CF_DECLS
%type <time> expr_us time
%type <a> ipa
%type <net> net_ip4_ net_ip6_ net_ip6 net_ip_ net_ip net_or_ipa
%type <net_ptr> net_ net_any net_vpn4_ net_vpn6_ net_vpn_ net_roa4_ net_roa6_ net_roa_ net_mpls_
%type <net_ptr> net_ net_any net_vpn4_ net_vpn6_ net_vpn_ net_roa4_ net_roa6_ net_roa_ net_ip6_sadr_ net_mpls_
%type <mls> label_stack_start label_stack

%type <t> text opttext
@@ -96,7 +96,7 @@ CF_DECLS
%left '!'
%nonassoc '.'

CF_KEYWORDS(DEFINE, ON, OFF, YES, NO, S, MS, US, PORT, VPN, MPLS)
CF_KEYWORDS(DEFINE, ON, OFF, YES, NO, S, MS, US, PORT, VPN, MPLS, FROM)

CF_GRAMMAR

@@ -206,6 +206,25 @@ net_ip6_: IP6 '/' NUM
	     n->prefix, n->pxlen, ip6_and(n->prefix, ip6_mkmask(n->pxlen)), n->pxlen);
};

net_ip6_sadr_: IP6 '/' NUM FROM IP6 '/' NUM
{
  if ($3 > IP6_MAX_PREFIX_LENGTH)
    cf_error("Invalid prefix length %u", $3);

  if ($7 > IP6_MAX_PREFIX_LENGTH)
    cf_error("Invalid prefix length %u", $7);

  $$ = cfg_alloc(sizeof(net_addr_ip6_sadr));
  net_fill_ip6_sadr($$, $1, $3, $5, $7);

  net_addr_ip6_sadr *n = (void *) $$;
  if (!net_validate_ip6_sadr(n))
    cf_error("Invalid SADR IPv6 prefix %I6/%d from %I6/%d, maybe you wanted %I6/%d from %I6/%d",
	     n->dst_prefix, n->dst_pxlen, n->src_prefix, n->src_pxlen,
	     ip6_and(n->dst_prefix, ip6_mkmask(n->dst_pxlen)), n->dst_pxlen,
	     ip6_and(n->src_prefix, ip6_mkmask(n->src_pxlen)), n->src_pxlen);
};

net_vpn4_: VPN_RD net_ip4_
{
  $$ = cfg_alloc(sizeof(net_addr_vpn4));
@@ -249,6 +268,7 @@ net_:
 | net_vpn_
 | net_roa_
 | net_flow_
 | net_ip6_sadr_
 | net_mpls_
 ;

+1 −10
Original line number Diff line number Diff line
@@ -28,20 +28,15 @@ flow6 table flowtab6;


protocol device {
	scan time 10;
}

protocol kernel kernel4 {
	scan time 20;

	ipv4 {
		export all;
	};
}

protocol kernel kernel6 {
	scan time 20;

	ipv6 {
		export all;
	};
@@ -169,8 +164,6 @@ protocol pipe {
}

protocol ospf v2 ospf4 {
#	ecmp;

	ipv4 {
		import all;
#		export where source = RTS_STATIC;
@@ -186,8 +179,6 @@ protocol ospf v2 ospf4 {


protocol ospf v3 ospf6 {
#	ecmp;

	ipv6 {
		import all;
#		export where source = RTS_STATIC;
@@ -251,7 +242,7 @@ protocol bgp {
	};

	# IPv6 with MPLS labels (2/4)
	ipv6 multicast {
	ipv6 mpls {
		# explicit IPv6 table
		table mtab6;
		import all;
Loading