[PATCH v2] Fix a couple of obvious 2-byte ASn limits

Timo Koehler tkoehler at acm.org
Tue Jun 22 11:41:41 UTC 2010

no problem, code is attached. Use with care - it is based on 4.8.5 and
also includes the asdot representation thing..


Faidon Liambotis wrote:
> Timo Koehler wrote:
>> correct. I vaguely remember that someone already published a rudimentary
>> patch for 4-byte ASN support back in 2008.
> Yes and it's been merged for some time and released with 5.0.0, but it's
> obviously incomplete/buggy.
>> At that time I also wrote a patch for this, based on 4.8.5, including
>> your changes and some more but never published my code because of some
>> copyright problems at that time.
> Are those still a problem for you? Perhaps you could share the code?
>> Not sure which code base you work but in 4.8.5 I wrote this:
> svn trunk, i.e. 5.0.0+
>> // RE_INVALID_AS is used as default peerAS. The valid_peer_as
>> // flag is used to indicate a non-default peerAS.
>> +const unsigned int RE_INVALID_AS = RANGE_TOP;
> 5.0.0 had this as RANGE_TOP + 1 which is more correct, since RANGE_TOP
> (4294967295) is a valid AS. RANGE_TOP + 1 overflows though, which is why
> I decided to set RE_INVALID_AS to 0 instead (which is a reserved AS).
>> And it is used in src/re2dfa/regexp_nf.hh:
>>     rd_fm* dfa(ASt peerAS = RE_INVALID_AS);
> Right, it's only used in assignments and equality comparisons, that's
> why 0 equally works.
>> rangelist.hh I also fixed a number of class constructors, like:
>> -      Range(int l, int h)   : low(l),     high(h)      {}
>> +      Range(unsigned int l, unsigned int h) : low(l), high(h) {}
>> Let me know in case you need my asn32 code to compare against yours.
> Oh, nice catch. I think we're missing those, if the copyright issues
> that you mentioned are resolved perhaps you should share the changes.
> I'll handle the polishing and rebasing to trunk if you don't want to.
> Thanks,
> Faidon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff_4.8.5_bgp_asn32.patch
Type: text/x-patch
Size: 59085 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/irrtoolset/attachments/20100622/39d06eb0/attachment.bin>

More information about the irrtoolset mailing list