[PATCH] uml: fix UML network driver endianness bugs
ifa->ifa_address and ifa->ifa_mask are defined as __u32, but used as if they were char[4]. Network code uses htons() to convert it. So UML's method to access these fields is wrong for bigendians (e.g. s390) I replaced bytewise copying by memcpy(), maybe even that might be removed, if ifa->ifa_address/mask may be used immediately. Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
4f0272415a
commit
0e76422ca5
@ -25,7 +25,7 @@ struct net_user_info {
|
||||
};
|
||||
|
||||
extern void ether_user_init(void *data, void *dev);
|
||||
extern void dev_ip_addr(void *d, char *buf, char *bin_buf);
|
||||
extern void dev_ip_addr(void *d, unsigned char *bin_buf);
|
||||
extern void set_ether_mac(void *d, unsigned char *addr);
|
||||
extern void iter_addresses(void *d, void (*cb)(unsigned char *,
|
||||
unsigned char *, void *),
|
||||
|
Reference in New Issue
Block a user