3ebc1a876cb01079f6f1b6604ee3d18d1e9a5217
[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 Index: sendd-0.2/sendd/snd_proto.h
11 ============================================================
12 --- sendd-0.2/sendd/snd_proto.h 2008-04-18 16:21:46.000000000 +0200
13 +++ sendd-0.2.new/sendd/snd_proto.h 2008-10-05 16:08:34.000000000 +0200
14 @@ -69,7 +69,7 @@
15 uint32_t reserved; /* opt hdr + reserved */
16 uint8_t keyhash[SND_KEYHASH_LEN];
17 uint8_t sig[0];
18 -};
19 +} __attribute__((aligned(8)));
20
21 struct snd_opt_timestamp {
22 uint8_t type;