chiark / gitweb /
WIP DNS bugfixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Aug 2011 11:59:53 +0000 (12:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Aug 2011 15:44:05 +0000 (16:44 +0100)
Makefile.in
dns-bitenc-test.c
dns-transp-common.c

index 0d1ff1aab78f7f40495f9a07ad5ecaefe1175ea1..22fbf4959be1cd08d13e00e039c85df999819fcf 100644 (file)
@@ -38,7 +38,7 @@ CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -Werror \
        -Wpointer-arith -Wformat=2 -Winit-self \
        -Wswitch-enum -Wunused-variable -Wbad-function-cast \
        -Wno-strict-aliasing -fno-strict-aliasing
-ALL_CFLAGS:=@DEFS@ -I$(srcdir) -I. $(CFLAGS)
+ALL_CFLAGS:=@DEFS@ -I$(srcdir) -I. $(CFLAGS) $(CMDLINE_CFLAGS)
 CPPFLAGS:=@CPPFLAGS@
 LDFLAGS:=@LDFLAGS@
 LDLIBS:=@LIBS@
index a11ecd9b37144b9489afc6e187a08a0843e03d55..19536ac1aab55676b3fa6fdf0e3e6750a55ea5a1 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, const char **argv) {
 
     const uint8_t *pr;
     for (pr=pktbegin; pr<packet+sizeof(packet); pr++)
-       printf("%02x",*pr);
+       printf(" %02x",*pr);
     printf("\n");
 
     const uint8_t *domainend;
index 1b8eb860809658c8cdce69fcd8d6ea8896a329b8..55b14c8ec904b9c1c193009a51066350199ed9f4 100644 (file)
@@ -31,7 +31,7 @@ int dnsdomainenc_start(struct dnsdomainenc *be, uint8_t *buf, int buflen,
     be->npending=0;
     be->bufstop=buf+1;
     be->out=buf+buflen;
-    for (i=mydompathlen-1; i>=0; i++) {
+    for (i=mydompathlen-1; i>=0; i--) {
        const char *lab=mydompath[i];
        int ll=strlen(lab);
        if (ll>63) return FAKERCODE_MYDOMAINLABELTOOLONG;