Now that over 65535 AS numbers have been allocated, a 4-byte AS number is required. This "AS4" system is now in use at RIPE and we intend to deploy it. The version 5 patch available from the website linked above has two Changelog hunks which will fail to apply. However, with those removed, it applies to the current version in portage and works correctly. I will attach this version of the patch. Please consider this for inclusion.
Created attachment 117822 [details, diff] 0.99.6-as4.patch
Fixed in 0.99.7. Enable bgpas4 USE flag if you want to enable support for 32-bit AS numbers.