refresh patches before applying upcoming fix
[openwrt/svn-archive/archive.git] / ipv6 / send / patches / 003-keysig_8bytes_alignment.patch
1 This patch aligns the structure describing the RSA signature
2 option to 8 bytes. Before that, send was padding with N bytes
3 (4 on 32-bits architectures) using a cast in sendd/proto_sig.c :
4
5 so = (struct snd_opt_sig *)(nd_so);
6
7 which would align to the number of bytes representing a pointer
8 on your architecture.
9
10 --- a/sendd/snd_proto.h
11 +++ b/sendd/snd_proto.h
12 @@ -69,7 +69,7 @@ struct snd_opt_sig {
13 uint32_t reserved; /* opt hdr + reserved */
14 uint8_t keyhash[SND_KEYHASH_LEN];
15 uint8_t sig[0];
16 -};
17 +} __attribute__((aligned(8)));
18
19 struct snd_opt_timestamp {
20 uint8_t type;