Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support APNIC inter-RIR IPv4 transfer whois referrals #152

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

zappiehost
Copy link

Fixes #95

With a rapidly growing amount of inter-RIR transfers FROM the APNIC region to other RIRs (ARIN/RIPE/LACNIC, and probably soon to be Afrinic) its not feasible to manage the list of changing IPs manually, instead we will use the whois server referral system instead for correct queries.

Some examples:

APNIC -> RIPE
Example: 103.251.164.0/22

APNIC -> ARIN
Example: 103.11.64.0/22

APNIC -> LACNIC
Example: 103.212.83.0/24

APNIC -> Afrinic
(Inter-RIR transfers are not support yet, but still programmed in for when and if its supported one day)

@zappiehost
Copy link
Author

@rfc1036 I was wondering if you had the chance to look at this PR that solves issue #95 and if you had any suggestions/feedback

@rfc1036
Copy link
Owner

rfc1036 commented Oct 12, 2023

I provided feedback. You did not reply.

@zappiehost
Copy link
Author

zappiehost commented Oct 12, 2023

I provided feedback. You did not reply.

I cant seem to find this feedback anywhere. I am re looking through both this PR and the original Issue that was raised by the user 2 years ago, but I cant seem to see any comments or additional feedback anywhere here on github. I might be missing it or not looking in the right place, can you please help point me where I can find this feedabck?

@rfc1036
Copy link
Owner

rfc1036 commented Oct 13, 2023

Right in this page, as comments to the code.

@zappiehost
Copy link
Author

Right in this page, as comments to the code.

Nothing is showing up on this PR, I assume this is because you might have missed pressing "Finish review" or "submit comments" on github. You can confirm this by looking at this PR in incognito mode and see there is are no pubicly viewable comments or review.

Can you please confirm if you have "submitted" or "finished" review so that your comments get posted publicly so I can see them and make any relevant changes.

Otherwise if that still doesnt help, I am more than happy to simply get any feedback in comments, as I cant not view any code review thus far on this this PR

@rfc1036 rfc1036 self-assigned this Oct 13, 2023
@@ -808,6 +808,23 @@ char *do_query(const int sock, const char *query)
*p = '\0';
}

/*APNIC referrals and Inter-RIR transfers:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo.

if ((p = strstr(buf, "Transferred to the RIPE region")))
referral_server = "whois.ripe.net";
else if ((p = strstr(buf, "Transferred to the ARIN region")))
referral_server = "whois.arine.net";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo.

* descr: Transferred to the RIPE region on 2023-08-17T09:45:47Z.
* descr: Transferred to the ARIN region on 2023-08-17T09:45:47Z.
*/
if (!referral_server && strneq(buf, "descr:", 6)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

descr is a user-controllable attribute also in the RIPE and AFRINIC regions, so I think that it would be safer to move this code to a dedicated function like query_crsnic or else anybody could cause infinite loops.
Then make_ip_del.pl and make_ip6_del.pl would need to be modified to invoke that function for queries for APNIC networks.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you need to check that the record has a mnt-by: APNIC-STUB attribute to be sure that this is a real redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APNIC IP inter RIR transfert not properly handled
2 participants