determining ipv4 or ipv6 net in filter

Robert Blayzor rblayzor.bulk at inoc.net
Mon Jan 27 20:27:24 CET 2020


Migrating from BIRD 1.6 to 2.0 and I would like to consolidate some BGP
filters and use them for IPv4 or IPv6 sessions....

What is the best way to enumerate if a net is IPv4 or IPv6 if you wanted
to make a if/then/else on.. ie:

filter MY_FILTER {
    if ((MYAS, 888) ~ bgp_community) then {
      if (< Is IPv4 ?>) then {
        do this...;
        accept;
      } else if (< Is IPv6 ?> then {
        do that...;
        accept;
      } else {
        reject;
      }
    }
    reject;
}


TIA

-- 
inoc.net!rblayzor
XMPP: rblayzor.AT.inoc.net
PGP:  https://pgp.inoc.net/rblayzor/


More information about the Bird-users mailing list