Re: Segmentation fault on 2.0.5

2019-08-14 Thread Radu Anghel

On 13.08.2019 17:45, Maria Jan Matejka wrote:

define myvar = false;

function something () {
 if myvar then {
 return false;
 }

 return true;
}

protocol device DEVICE {

}

Could this be because of the new filter code or something else?


Hello

Thanks for bugreport. Yes, it is the new filter code, most likely
it is a bug in handling of statically eliminable (constant-false)
if statements without else branch.

Similar issue also happens for empty blocks:

   if true then { }



What about the attached patch?
Maria



Hi,

I can confirm that the patch works for my setup.

Thank you,

Radu


Segmentation fault on 2.0.5

2019-08-10 Thread Radu Anghel
Hello,

I recently upgraded BIRD from 2.0.4 to 2.0.5 and with the same (pretty
large) .conf I got Segmentation fault.

Until today I didn't have time to debug it, but here it goes:

With this simple .conf I get seg fault on 2.0.5 while 2.0.4 works as
expected. (if I define myvar = true it doesn't crash on 2.0.5)

log syslog all;

define myvar = false;

function something () {
if myvar then {
return false;
}

return true;
}

protocol device DEVICE {

}

Could this be because of the new filter code or something else?

Radu




Re: RPKI / roa_check() question - BIRD 2.0.2

2018-04-11 Thread Radu Anghel
Thank you, it works with last_nonaggregated, I don't know how I didn't
notice that in the doc.

Radu

On 11.04.2018 20:06, Matthias Waehlisch wrote:
> Hi Radu,
> 
>   the path includes an AS-set ({30884 65004 65005}).
> 
> "Both first and last return zero if there is no appropriate ASN, for 
> example if the path contains an AS set element as the first (or the 
> last) part. If the path ends with an AS set, last_nonaggregated may be 
> used to get last ASN before any AS set. "
> 
>   AS-sets are deprecated: https://tools.ietf.org/html/rfc6472
> 
>   Strictly speaking, you you don't know which AS in AS-set is the actual 
> origin.
> 
> 
> 
> Cheers
>   matthias
> 
> 
> On Wed, 11 Apr 2018, Radu Anghel wrote:
> 
>> Hello,
>>
>> I have found this while doing RPKI validation:
>>
>> net = 94.127.104.0/21
>> bgp_path = 48112 6830 174 13110 {30884 65004 65005}
>> BGP.aggregator: 10.253.27.1 AS13110 (don't know how to read this from a var)
>>
>> roa_check(rpki4, net, bgp_path.last) returns ROA_INVALID because BIRD
>> thinks bgp_path.last = 0
>>
>> There is a valid ROA for 94.127.104.0/21 and AS13110, so I guess the
>> validation should be done on the aggregator AS.
>>
>> Could you tell me what is the corect way to handle this?
>>
>> TIA,
>> Radu
>>
> 
> 


RPKI / roa_check() question - BIRD 2.0.2

2018-04-11 Thread Radu Anghel
Hello,

I have found this while doing RPKI validation:

net = 94.127.104.0/21
bgp_path = 48112 6830 174 13110 {30884 65004 65005}
BGP.aggregator: 10.253.27.1 AS13110 (don't know how to read this from a var)

roa_check(rpki4, net, bgp_path.last) returns ROA_INVALID because BIRD
thinks bgp_path.last = 0

There is a valid ROA for 94.127.104.0/21 and AS13110, so I guess the
validation should be done on the aggregator AS.

Could you tell me what is the corect way to handle this?

TIA,
Radu


Re: bird 2.0.0 issues

2017-12-14 Thread Radu Anghel
On 14.12.2017 23:44, Ondrej Zajicek wrote:
> On Thu, Dec 14, 2017 at 09:19:32PM +0200, Radu Anghel wrote:
> 
> Hi
> 
> Tested add-path between old and new BIRD, works for me. Does the problem
> appear even with fixed channel definitions? It is possible that it is
> also related, like add-path announced in capabilities due to the second
> channel (with add-path), but incoming update dispatched by the first one
> (without).
> 

Sorry I didn't test it yesterday also, add-path works for me too with
only one channel definition, so #3 was the same.

Thanks,

Radu


Re: bird 2.0.0 issues

2017-12-14 Thread Radu Anghel
On 14.12.2017 21:09, Ondrej Zajicek wrote:
> Hi
> 
> You have doubled channel definitions, one with implicit arguments
> ('ipv4;'), and one with explicit arguments ('ipv4 { ... }'). That is
> likely a cause of issue #2. We definitely should add a check for that.
> Could you try config file with only one channel of each type per
> protocol?
> 
> It may be also issue #1, or perhaps it is problem with newer Linux
> kernels (i checked up to 4.13). But regardless of Linux API, we still
> should get at least periodic 'Scanning routing table' messages.
> 
> Issue #3 is most likely a bug in BGP, i will check that.
> 

Hi,

I can confirm that keeping only one channel definition fixes both #1 and
#2. A check warning/rejecting this would be nice :)

Thanks,

Radu


Re: bird 2.0.0 issues

2017-12-14 Thread Radu Anghel
On 14.12.2017 20:31, Ondrej Zajicek wrote:
> Hello
> 
> Thanks for reports Could you send me your config file? If you add 'debug
> all' to your Kernel protocol, what you see in logs?
> 

Nothing is logged if I enable debug all to the kernel protocol, total
silence. I'm attaching my current config.

Thanks,

Radu
log syslog all;
# log "/tmp/bird.log" all;

#timeformat protocol "%s";

router id 1.2.3.4;

define myASN = 65533;

protocol device DEVICE {
scan time 3600;
}

protocol kernel KERNEL4 {
debug all;
#learn;
ipv4;
scan time 60;
ipv4 { 
import all;
export filter { if proto = "STATIC4" then accept; reject; };
};
}

protocol kernel KERNEL6 {
debug all;
#learn;
ipv6;
scan time 60;
ipv6 {
import all;
export filter { if proto = "STATIC6" then accept; reject; };
};
}

protocol static STATIC4 {
ipv4;

route 10.0.0.0/24 via "eth0";
}

protocol static STATIC6 {
ipv6;

route 2001:db8::/64 via "eth0";
}

protocol bgp RC4 {
debug { events };
disabled off;

local as myASN;

ipv4;

neighbor x.x.x.x as 48112;

multihop 2;

passive off;

ipv4 {
next hop self;
import all;
export none;

#   add paths on;
};
}

protocol bgp RC6 {
debug { events };
disabled off;

local as myASN;

ipv6;

neighbor ::: as 48112;

multihop 2;

passive off;

ipv6 {
next hop self;
import all;
export none;

#add paths on;
};
}


bird 2.0.0 issues

2017-12-14 Thread Radu Anghel
Hello,

I just installed bird 2.0.0 on a test machine to try it out and I have
some issues:
(CentOS 7 / kernel 4.14.5-1.el7.elrepo.x86_64)

1) the kernel protcol sees no routes (both ipv4 and ipv6) and doesn't
export any routes

2) each time I change the config and do a 'birdc conf' it resets all BGP
sessions and logs

bird: Cannot reconfigure channel XXX.ipv4
bird: Cannot remove channel XXX.ipv4
bird: Restarting protocol XXX

3) can't establish BGP with bird 1.6.3 if I have add paths on; on the
session - 2.0.0 says: "BGP Error: Malformed attribute list" and 1.6.3:
"Socket: Connection closed". add paths on; works between two bird 2.0.0.

Could these be caused by kernel or *lib versions or are these bugs in bird?

Thanks,

Radu