diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-19 22:56:22 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-19 22:56:22 +0900 |
commit | 3683f556df1324b1ce575dd5932d174d75512f7a (patch) | |
tree | 8920396a04fed596c9532f941839499106a3df7d /src/gnsrecord | |
parent | cfdf9ea8c1246979f48174628872e79cfb1657a2 (diff) | |
download | gnunet-3683f556df1324b1ce575dd5932d174d75512f7a.tar.gz gnunet-3683f556df1324b1ce575dd5932d174d75512f7a.zip |
GNS: Make string formats more comaptible with DNS zonefiles
Diffstat (limited to 'src/gnsrecord')
-rw-r--r-- | src/gnsrecord/plugin_gnsrecord_dns.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c index 649133cd1..e8c24501c 100644 --- a/src/gnsrecord/plugin_gnsrecord_dns.c +++ b/src/gnsrecord/plugin_gnsrecord_dns.c | |||
@@ -100,7 +100,7 @@ dns_value_to_string (void *cls, | |||
100 | return NULL; | 100 | return NULL; |
101 | } | 101 | } |
102 | GNUNET_asprintf (&result, | 102 | GNUNET_asprintf (&result, |
103 | "rname=%s mname=%s %u,%u,%u,%u,%u", | 103 | "%s %s ( %u %u %u %u %u )", |
104 | soa->rname, | 104 | soa->rname, |
105 | soa->mname, | 105 | soa->mname, |
106 | soa->serial, | 106 | soa->serial, |
@@ -169,7 +169,7 @@ dns_value_to_string (void *cls, | |||
169 | return NULL; | 169 | return NULL; |
170 | } | 170 | } |
171 | GNUNET_asprintf (&result, | 171 | GNUNET_asprintf (&result, |
172 | "%u,%s", | 172 | "%u %s", |
173 | (unsigned int) mx->preference, | 173 | (unsigned int) mx->preference, |
174 | mx->mxhost); | 174 | mx->mxhost); |
175 | GNUNET_DNSPARSER_free_mx (mx); | 175 | GNUNET_DNSPARSER_free_mx (mx); |
@@ -503,7 +503,7 @@ dns_string_to_value (void *cls, | |||
503 | size_t off; | 503 | size_t off; |
504 | 504 | ||
505 | if (7 != sscanf (s, | 505 | if (7 != sscanf (s, |
506 | "rname=%253s mname=%253s %u,%u,%u,%u,%u", | 506 | "%253s %253s ( %u %u %u %u %u )", |
507 | soa_rname, | 507 | soa_rname, |
508 | soa_mname, | 508 | soa_mname, |
509 | &soa_serial, | 509 | &soa_serial, |
@@ -567,7 +567,7 @@ dns_string_to_value (void *cls, | |||
567 | unsigned int mx_pref; | 567 | unsigned int mx_pref; |
568 | size_t off; | 568 | size_t off; |
569 | 569 | ||
570 | if (2 != sscanf (s, "%u,%253s", &mx_pref, mxhost)) | 570 | if (2 != sscanf (s, "%u %253s", &mx_pref, mxhost)) |
571 | { | 571 | { |
572 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 572 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
573 | _ ("Unable to parse MX record `%s'\n"), | 573 | _ ("Unable to parse MX record `%s'\n"), |