Skip to content

Conversation

@fsbruva
Copy link
Contributor

@fsbruva fsbruva commented Nov 14, 2021

Modify dns_get_record to test for query result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno macro, and have it consult
statp->res_h_errno when OS has res_nsearch().

Fixes #81618

This approach is more complete than #7650, because it deals with the
general case for any subsequent or future calls to php_dns_errno().

Test borrowed from #7650.

Will need to be backported to 8.1, 7.3 and 7.4 branches.

Modify dns_get_record to test for query result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno function, and have it consult
statp->res_h_errno when OS has res_nsearch().

Fixes #81618
@devnexen
Copy link
Member

devnexen commented Nov 14, 2021

might be better if you branch from PHP-7.3 instead of master. might say php_dns_errno is more a macro tough.

@fsbruva
Copy link
Contributor Author

fsbruva commented Nov 14, 2021

say php_dns_errno is more a macro tough.

Good catch about macro - edited.

might be better if you branch from PHP-7.3 instead of master.

Oops, you're right.. I see the git workflow now. Let me see about correcting that.

@fsbruva fsbruva changed the base branch from master to PHP-7.3 November 14, 2021 12:48
@fsbruva fsbruva changed the base branch from PHP-7.3 to master November 14, 2021 12:49
@fsbruva
Copy link
Contributor Author

fsbruva commented Nov 14, 2021

I'll rebase, then shift the PR base...

@fsbruva
Copy link
Contributor Author

fsbruva commented Nov 14, 2021

Nevermind. I'll submit a PR for a commit off the 7.3 branch.

@fsbruva fsbruva closed this Nov 14, 2021
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.

2 participants