Re: [RFC] ebtable_replace alignment padding
Bart De Schuymer <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 17 June 2004 01:02, Stephen Hemminger wrote: > Sparse found this problem. The data portion of ebt_entries structure is > aligned to ebt_replace. But ebt_replace comes out to 62 bytes (on i386). > > The simple fix is to pad ebt_replace so it is 64 bytes, but not sure if > breaks anything. "__attribute__ ((aligned (__alignof__(struct ebt_replace))))" is there to make sure the data that is appended to the structs starts at a good alignment. This is needed on machines like the Sparc, for which data needs to be aligned. So I don't think there is any problem. I see no reason why ebt_replace should have a size that is a power of 2. cheers, Bart ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com