log syslog all;
# log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug };

router id 62.44.96.163;

protocol device {
}

protocol direct {
        ipv4;                   # Connect to default IPv4 table
        ipv6;                   # ... and to default IPv6 table
}

protocol kernel {
        ipv4 {                  # Connect protocol to IPv4 table by channel
              export all;       # Export to protocol.
        };
}

protocol kernel {
        ipv6 {                  # Connect protocol to IPv6 table by channel
              export all;       # Export to protocol.
        };
}

function is_distributable_ipv4_network() {
  return net ~ [
     62.44.96.143/32
  ];
}

function is_distributable_ipv6_network() {
  return net ~ [
     2001:67c:20d0:ff::143/128
  ];
}

filter export_ospf_v2
{
       if (is_distributable_ipv4_network()) && (source = RTS_DEVICE) then accept; else reject;
}

filter export_ospf_v3
{
       if (is_distributable_ipv6_network()) && (source = RTS_DEVICE) then accept; else reject;
}

protocol ospf v2 {
        ipv4 {
           import filter {
              ospf_metric1 = 50;
              accept;
           };
           export filter export_ospf_v2;
        };
        area 62.44.96.160 {
                interface "eth1" {
                        type broadcast;         # Detected by default
                        cost 10;                # Interface metric
                        hello 5;                # Default hello perid 10 is too long
                };
        };
}

protocol ospf v3 {
        ipv6 {
           import filter {
              ospf_metric1 = 50;
              accept;
           };
           export filter export_ospf_v3;
        };
	area 62.44.96.160 {
		interface "eth1" {
			type broadcast;		# Detected by default
			cost 10;		# Interface metric
			hello 5;		# Default hello perid 10 is too long
		};
	};
}