Problem with if statements containing && or || expressions

mikma.bird at lists.m7n.se mikma.bird at lists.m7n.se
Sat Jan 4 21:46:52 CET 2020


Hello,

I'm having problems with if statements containing &&, or ||. Why do the 
config file below cause the following error?

$ ./bird -d -l
bird: filters, line 8: Argument 2 of AND must be of type bool, got type int
bird: bird.conf:15:12 Runtime error while evaluating expression; see log 
for details

# bird.conf
function dummy()
{
         return 1;
}

function test()
{
         if (dummy() != 0) && true then {
                 print "Success";
         }

         return 0;
}

eval test();

protocol device {
         interface "*";
}

/Mikael


More information about the Bird-users mailing list