bgp / stayrtr

RPKI-To-Router server implementation in Go
BSD 3-Clause "New" or "Revised" License
91 stars 13 forks source link

Str to int #14

Closed job closed 3 years ago

job commented 3 years ago
randomthingsandstuff commented 3 years ago

Discussed with @job, no objections from my side.

ties commented 3 years ago

Quick reply here (busy day/quick reply from mobile, so bound to be incorrect): I think I read there were some issues with routers receiving packers via rtr with a host part that is non-zero.

This pr fixes the 'prefix length invalid, causing a router to have issues' case but it may be good to double check that the parsing does make sure that the host part is zero. I think rejecting the file is likely better then masking the host part to zero.

To follow up on this: I checked the packets sent after a SLURM file changes that containers a prefix where the host part is non-zero. Stayrtr sends the correct prefix if the host-part is non-zero in the json:

...
"prefixAssertions": [
...
      {
        "asn": 65002,
        "prefix": "10.2.6.128/24",
        "maxPrefixLength": 26
      }
    ]
...

Screenshot from 2021-08-01 18-40-32