From: Hauke Mehrtens Date: Sat, 9 Apr 2011 15:28:22 +0000 (+0000) Subject: ipupdate: fix endianness-issue X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f0eb1dae67d7146c491bb6d19e0a4b8cb243f4fe;p=openwrt%2Fsvn-archive%2Farchive.git ipupdate: fix endianness-issue Thank you Sven Roederer for the patch. This closes #9066. SVN-Revision: 26546 --- diff --git a/net/ipupdate/patches/100-name_conflict.patch b/net/ipupdate/patches/100-name_conflict.patch index 8790dcd6ad..b0b1c93a4a 100644 --- a/net/ipupdate/patches/100-name_conflict.patch +++ b/net/ipupdate/patches/100-name_conflict.patch @@ -18,7 +18,7 @@ { char** args = NULL; int inc; -@@ -53,7 +53,7 @@ +@@ -53,7 +53,7 @@ char** split(char* str, const char* del, } /* @@ -27,7 +27,7 @@ ** ** remove length elements from array starting at offset ** All trailing elements will be left aligned -@@ -70,7 +70,7 @@ +@@ -70,7 +70,7 @@ char** split(char* str, const char* del, ** Returns the number of elements removed */ @@ -48,7 +48,7 @@ +int array_splice(void**, int, int, int); --- a/ipupdate.c +++ b/ipupdate.c -@@ -295,7 +295,7 @@ +@@ -295,7 +295,7 @@ int DoUpdate(int check) free(zone->keyname); free(server->zones[j]); @@ -57,7 +57,7 @@ continue; } -@@ -317,7 +317,7 @@ +@@ -317,7 +317,7 @@ int DoUpdate(int check) free(server->zones); free(cfg.servers[i]); @@ -66,7 +66,7 @@ continue; } i++; -@@ -414,7 +414,7 @@ +@@ -414,7 +414,7 @@ int checkcname(int *s, struct server *se asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); PostMsgFree(msg); @@ -75,7 +75,7 @@ continue; } -@@ -446,7 +446,7 @@ +@@ -446,7 +446,7 @@ int checkcname(int *s, struct server *se asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); PostMsgFree(msg); @@ -84,7 +84,7 @@ continue; } //append the record to the packet -@@ -488,7 +488,7 @@ +@@ -488,7 +488,7 @@ int checkcname(int *s, struct server *se asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); PostMsgFree(msg); @@ -93,7 +93,7 @@ continue; } -@@ -561,7 +561,7 @@ +@@ -561,7 +561,7 @@ int checkip(int *s, struct server *serve asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); PostMsgFree(msg); @@ -104,7 +104,7 @@ continue; --- a/config.c +++ b/config.c -@@ -873,7 +873,7 @@ +@@ -873,7 +873,7 @@ void cfg_zone(struct server *server, str switch (cfg_readblock(data, &term, &ptr)) { case CFG_QUOTED: zone->hostp = term; diff --git a/net/ipupdate/patches/200-byteorder.patch b/net/ipupdate/patches/200-byteorder.patch new file mode 100644 index 0000000000..48cb9c671b --- /dev/null +++ b/net/ipupdate/patches/200-byteorder.patch @@ -0,0 +1,11 @@ +--- a/include/dns.c ++++ b/include/dns.c +@@ -127,7 +127,7 @@ int dns_t2wtsig(char *pktdata, unsigned + tsig.hitime = 0; + tsig.lotime = htonl(signtime); + tsig.fudge = htons(fudge); +- tsig.macsize = 0x1000; //16 ++ tsig.macsize = htons(16); + memset(tsig.mac, 0, 16); + memcpy(&tsig.id, pktdata, 2); + tsig.error = 0;