From: Martin Hundebøll Date: Thu, 14 Mar 2013 20:30:21 +0000 (+0100) Subject: batman-adv: Fix endianness errors for network coding X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~65^2~281^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6a0b495ffee1301c239da49818008e7de3c2ae1;p=pandora-kernel.git batman-adv: Fix endianness errors for network coding Add a htonl() in network_coding.c when reading the sequence number from received ogm_packet, to avoid wrong byte ordering when comparing with a host value. This bug was introduced in 3ed7ada3f0bbcd058567bc0a8f9729a73eba7db6 ("batman-adv: network coding - detect coding nodes and remove these after timeout"). Change the type of coded_packet->coded_len from uint16 to __be16 to avoid wrong assumptions about endianness in later uses. Introduced in c3289f3650d34b60296000a629c99f2488f7c3dd ("batman-adv: network coding - code and transmit packets if possible"). Reported-by: Fengguang Wu Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- Reading git-diff-tree failed