Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 26, 2013 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/5466657 to your computer and use it in GitHub Desktop.
Save Habbie/5466657 to your computer and use it in GitHub Desktop.
--- pdns-2.9.22-rc3/pdns/dnspacket.cc 2008-11-26 21:42:19.000000000 +0100
+++ pdns-2.9.22-rc3-tcp-qid/pdns/dnspacket.cc 2009-02-04 12:20:51.000000000 +0100
@@ -516,8 +516,13 @@
void DNSPacket::spoofID(uint16_t id)
{
+#if BYTE_ORDER == BIG_ENDIAN
+ stringbuffer[1]=id&0xff;
+ stringbuffer[0]=(id>>8)&0xff;
+#else
stringbuffer[1]=(id>>8)&0xff;
stringbuffer[0]=id&0xff;
+#endif
d.id=id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment