Skip to content

Commit

Permalink
Swap dist and port fields in axfr-get.c
Browse files Browse the repository at this point in the history
The tinydns fields are in the reverse order to those presented in the SRV rdata.

Closes balena#1
  • Loading branch information
patch0 authored Mar 20, 2017
1 parent d857838 commit 08931eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions axfr-get.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ unsigned int doit(char *buf,unsigned int len,unsigned int pos)
x_getname(buf,len,pos,&d1);
if (!dns_domain_todot_cat(&line,d1)) return 0;
if (!stralloc_cats(&line,".:")) return 0;
if (!stralloc_catulong0(&line,dist,0)) return 0;
if (!stralloc_catulong0(&line,port,0)) return 0;
if (!stralloc_cats(&line,":")) return 0;
if (!stralloc_catulong0(&line,weight,0)) return 0;
if (!stralloc_cats(&line,":")) return 0;
if (!stralloc_catulong0(&line,port,0)) return 0;
if (!stralloc_catulong0(&line,dist,0)) return 0;
}
else if (byte_equal(data,2,DNS_T_NAPTR)) {
uint16 order, preference;
Expand Down

0 comments on commit 08931eb

Please sign in to comment.