Mark wire data structures in netatalk as __packed so that they are
properly (un)padded on the arm platform. With this change, FreeBSD/arm boxes are able to route AppleTalk properly. Submitted/tested by: Nathan Whitehorn <nathanw at uchicago dot edu> Tested on: arm, i386, amd64 Approved by: re (kensmith)
This commit is contained in:
parent
cf7e2eb063
commit
b4f3a844d2
@ -42,7 +42,7 @@ union aapa {
|
||||
u_char an_zero;
|
||||
u_char an_net[2];
|
||||
u_char an_node;
|
||||
} ap_node;
|
||||
} __packed ap_node;
|
||||
};
|
||||
|
||||
struct ether_aarp {
|
||||
@ -51,7 +51,8 @@ struct ether_aarp {
|
||||
union aapa aarp_spu;
|
||||
u_char aarp_tha[6];
|
||||
union aapa aarp_tpu;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
#define aarp_hrd eaa_hdr.ar_hrd
|
||||
#define aarp_pro eaa_hdr.ar_pro
|
||||
#define aarp_hln eaa_hdr.ar_hln
|
||||
|
@ -64,7 +64,7 @@ struct elaphdr {
|
||||
u_char el_dnode;
|
||||
u_char el_snode;
|
||||
u_char el_type;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
#define SZ_ELAPHDR 3
|
||||
|
||||
@ -90,7 +90,7 @@ struct ddpehdr {
|
||||
unsigned dub_hops:4;
|
||||
unsigned dub_pad:2;
|
||||
#endif
|
||||
} du_bits;
|
||||
} __packed du_bits;
|
||||
unsigned du_bytes;
|
||||
} deh_u;
|
||||
u_short deh_dnet;
|
||||
@ -99,7 +99,7 @@ struct ddpehdr {
|
||||
u_char deh_snode;
|
||||
u_char deh_dport;
|
||||
u_char deh_sport;
|
||||
};
|
||||
} __packed;
|
||||
#define deh_pad deh_u.du_bits.dub_pad
|
||||
#define deh_hops deh_u.du_bits.dub_hops
|
||||
#define deh_len deh_u.du_bits.dub_len
|
||||
@ -123,10 +123,11 @@ struct ddpshdr {
|
||||
unsigned dub_len:10;
|
||||
unsigned dub_pad:6;
|
||||
#endif
|
||||
} du_bits;
|
||||
} __packed du_bits;
|
||||
unsigned du_bytes;
|
||||
} dsh_u;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
#define dsh_pad dsh_u.du_bits.dub_pad
|
||||
#define dsh_len dsh_u.du_bits.dub_len
|
||||
#define dsh_dport dsh_u.du_bits.dub_dport
|
||||
|
Loading…
Reference in New Issue
Block a user