Fix for communities starting with 0:

Faidon Liambotis paravoid at
Thu Nov 6 13:29:30 UTC 2014

Hi Daryl,

On 09/30/14 05:24, Daryl Collins wrote:
> I'm still developing the odd patch for RtConfig as we encounter issues
> in our environment.  In general I'd be keen to work with the community
> to get as many of our patches as possible (specifically XR support) into
> a new release of IRRToolSet.
> Latest issue we've found is that if you do something like:
> community= {0:20000}
> The output for Cisco IOS & Cisco XR drops the 0:
> Patch to fix is below.

Well, first of all, the code is incorrect here; "high" is an unsigned 
int, so the < 0 check is superfluous. As you can see from the code, 
though this isn't an off-by-one error or some other accidental mistake: 
the code explicitly checks for 0 and 0xFFFF.

RFC 1997 (BGP Communities Attribute) says on the matter: "The community 
attribute values ranging from 0x0000000 through 0x0000FFFF and 
0xFFFF0000 through 0xFFFFFFFF are hereby reserved.". JunOS doesn't 
accept those two values either.

I think this may be a configuration mistake on your part and a too 
relaxed, non-RFC-compliant implementation on Cisco's part.


More information about the irrtoolset mailing list