-
Notifications
You must be signed in to change notification settings - Fork 118
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
base: next
Are you sure you want to change the base?
Conversation
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? |
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 |
@@ -808,6 +808,23 @@ char *do_query(const int sock, const char *query) | |||
*p = '\0'; | |||
} | |||
|
|||
/*APNIC referrals and Inter-RIR transfers: |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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)