You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... expects rr.Data to be set, which is only the case for raw RR structs. But then, when checking whether it's an MX or SRV exactly the opposite is assumed.
So I'm pretty sure that anyone using this either never or exclusively uses MX and SRV records.
... expects rr.Data to be set, which is only the case for raw RR structs. But then, when checking whether it's an MX or SRV exactly the opposite is assumed.
rr is a raw RR struct, so rr.Data is set. MX and SRV record types require special handling because the preference for MX records and the priority for SRV records must be sent to the INWX API in separate fields.
Could you provide an example where this currently leads to an issue?
You know I think this might've been a combination of me working a bit too quickly while some other bugs were tripping me up.
I think I didn't see that both record and rr was being used, where record is expected to a parsed record.
Passing parsed records to this lib works just fine. Apologies for the confusion. Closing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #30.
I honestly am not quite sure how this worked before. This function:
inwx/provider.go
Lines 232 to 252 in ab63b13
... expects
rr.Datato be set, which is only the case for rawRRstructs. But then, when checking whether it's anMXorSRVexactly the opposite is assumed.So I'm pretty sure that anyone using this either never or exclusively uses MX and SRV records.
Here's the libdns RR struct https://github.com/libdns/libdns/blob/d3609c6996e67a8186b81cb4c797dd8c48d5017c/record.go#L111-L114
And here's the MX struct https://github.com/libdns/libdns/blob/d3609c6996e67a8186b81cb4c797dd8c48d5017c/rrtypes.go#L114-L132