ipupdate: fix endianness-issue
Thank you Sven Roederer for the patch. This closes #9066. git-svn-id: svn://svn.openwrt.org/openwrt/packages@26546 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b132ab2cc8
commit
79c65d72a0
@ -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;
|
||||
|
11
net/ipupdate/patches/200-byteorder.patch
Normal file
11
net/ipupdate/patches/200-byteorder.patch
Normal file
@ -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;
|
Loading…
x
Reference in New Issue
Block a user