-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -808,6 +808,23 @@ char *do_query(const int sock, const char *query) | |
*p = '\0'; | ||
} | ||
|
||
/*APNIC referrals and Inter-RIR transfers: | ||
* 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 commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, you need to check that the record has a |
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Typo. |
||
else if ((p = strstr(buf, "Transferred to the LACNIC region"))) | ||
referral_server = "whois.lacnic.net"; | ||
else if ((p = strstr(buf, "Transferred to the AFRINIC region"))) | ||
referral_server = "whois.afrinic.net"; | ||
if (referral_server && (p = strpbrk(referral_server, "/\r\n"))) | ||
*p = '\0'; | ||
} | ||
|
||
if (hide_line(&hide, buf)) | ||
continue; | ||
|
||
|
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.