Staging: batman-adv: Clone shared bat packets before modifying them
authorSven Eckelmann <sven.eckelmann@gmx.de>
Fri, 7 May 2010 19:47:07 +0000 (21:47 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 20:42:38 +0000 (13:42 -0700)
commitf347b8736f176681fbfc666bf00165125a3274a5
tree1aca9e9ddf9b3b32843b2e06815b9f35cd2a04cd
parentadaaa0c6ab89e82684389b80002bce893179cf2c
Staging: batman-adv: Clone shared bat packets before modifying them

"tcpdump" and "batctl td" will receive packets with a wrong sequence
number on systems with a different endianess than network byte order.
This happens due to the reordering of bytes in the function which
handles aggregated bat packets. The function which receives the bat
packets must ensure that these buffers aren't shared with anything else
before that function tries to write into it. Otherwise it has to copy
the buffers so it is save again to change them.

Reported-by: Kevin Steen <batman@kevinsteen.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/routing.c