Read only the AS's objects in RIPE, APNIC and AFRINIC answers (closes #168) #175

Merged
clawbot merged 1 commits from issue-168-apnic-as-block into next 2026-10-27 02:12:50 +01:00
Collaborator

Fixes #168.

APNIC starts its answer for an AS with the as-block object of the block the AS is in. The parser kept the first value of each field across the whole answer, so it stored the block's last-modified date as the AS's.

For RIPE, APNIC and AFRINIC answers, the parser now reads only the aut-num object and the organisation object it names. A blank line ends an object, and the object's first line gives its class. ARIN and LACNIC answers are parsed as before.

What the diff does not show:

  • RIPE's answers also start with an as-block object. Its created and last-modified dates replaced the AS's, so RIPE's test answer now starts with one. This host is refused by RIPE, so I saw that shape in a third-party copy of a RIPE answer, not from RIPE itself.
  • The AFRINIC answers I fetched, for two ASes, had no as-block object. The same rule covers AFRINIC anyway.
  • APNIC's answer also holds an irt object. Its address was added to the organisation's address and is now left out. The abuse address now comes from the answer's abuse contact comment, which gives the same address in APNIC's answer.
  • Judgement call: a date that the aut-num object lacks can still come from the organisation object. None of the answers I saw has that case.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/routewatch/issues/168. APNIC starts its answer for an AS with the `as-block` object of the block the AS is in. The parser kept the first value of each field across the whole answer, so it stored the block's last-modified date as the AS's. For RIPE, APNIC and AFRINIC answers, the parser now reads only the `aut-num` object and the organisation object it names. A blank line ends an object, and the object's first line gives its class. ARIN and LACNIC answers are parsed as before. What the diff does not show: - RIPE's answers also start with an `as-block` object. Its created and last-modified dates replaced the AS's, so RIPE's test answer now starts with one. This host is refused by RIPE, so I saw that shape in a third-party copy of a RIPE answer, not from RIPE itself. - The AFRINIC answers I fetched, for two ASes, had no `as-block` object. The same rule covers AFRINIC anyway. - APNIC's answer also holds an `irt` object. Its address was added to the organisation's address and is now left out. The abuse address now comes from the answer's abuse contact comment, which gives the same address in APNIC's answer. - Judgement call: a date that the `aut-num` object lacks can still come from the organisation object. None of the answers I saw has that case. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 02:02:23 +01:00
clawbot self-assigned this 2026-10-27 02:02:23 +01:00
clawbot added 1 commit 2026-10-27 02:02:23 +01:00
APNIC and RIPE start their answer for an AS with the as-block object of
the block the AS is in. The parser kept the first value of each field
across the whole answer, so it stored the block's dates as the AS's.

The parser now reads an answer from RIPE, APNIC or AFRINIC object by
object. It takes the fields from the aut-num object and the organisation
object it names, and leaves out every other object. The irt object's
address therefore no longer joins the organisation's. ARIN and LACNIC
answers are parsed as before.

Model: opus-5-5
Author
Collaborator

PASS: #175 meets the definition of done of #168 and is ready to merge into next.

Unverified: the as-block object at the start of the RIPE test answer was not checked against RIPE's own server, which refuses this host.

Model: opus-5-5

PASS: https://git.eeqj.de/sneak/routewatch/pulls/175 meets the definition of done of https://git.eeqj.de/sneak/routewatch/issues/168 and is ready to merge into `next`. Unverified: the `as-block` object at the start of the RIPE test answer was not checked against RIPE's own server, which refuses this host. Model: opus-5-5
clawbot merged commit 57469b6370 into next 2026-10-27 02:12:50 +01:00
clawbot deleted branch issue-168-apnic-as-block 2026-10-27 02:12:50 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#175