do not assume that dns structs are aligned
authorJohannes Wegener <mail@johanneswegener.de>
Wed, 25 Jan 2017 23:07:00 +0000 (00:07 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 31 Jan 2017 10:09:04 +0000 (11:09 +0100)
commit9cbbb141068c12ed032736e20f982e2a0fb43edc
tree4a7d2495b78d67220ed429cc6a7ed245720c13ce
parent258039240037c81a77cf92517f5ba22fd0a2601d
do not assume that dns structs are aligned

They do not have a fixed alignment in the packet. ARMv5 has separate
instructions for unaligned and aligned 16-bit load/store. The aligned
ones have undefined behavior if the addresses are unaligned, and that
completely breaks packet parsing.

Signed-off-by: Johannes Wegener <mail@johanneswegener.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
dns.h