linux/net/batman-adv
Martin Hundebøll e6a0b495ff 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 <fengguang.wu@intel.com>
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2013-03-27 10:27:31 +01:00
..
Kconfig batman-adv: network coding - add the initial infrastructure code 2013-03-13 22:53:48 +01:00
Makefile batman-adv: network coding - add the initial infrastructure code 2013-03-13 22:53:48 +01:00
bat_algo.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
bat_iv_ogm.c batman-adv: network coding - detect coding nodes and remove these after timeout 2013-03-13 22:53:49 +01:00
bitarray.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
bitarray.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
bridge_loop_avoidance.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
bridge_loop_avoidance.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
debugfs.c batman-adv: network coding - detect coding nodes and remove these after timeout 2013-03-13 22:53:49 +01:00
debugfs.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
distributed-arp-table.c batman-adv: replace redundant primary_if_get calls 2013-03-13 22:53:47 +01:00
distributed-arp-table.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
gateway_client.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
gateway_client.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
gateway_common.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
gateway_common.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
hard-interface.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
hard-interface.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
hash.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
hash.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
icmp_socket.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
icmp_socket.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
main.c batman-adv: network coding - add the initial infrastructure code 2013-03-13 22:53:48 +01:00
main.h batman-adv: network coding - code and transmit packets if possible 2013-03-13 22:53:50 +01:00
network-coding.c batman-adv: Fix endianness errors for network coding 2013-03-27 10:27:31 +01:00
network-coding.h batman-adv: network coding - save overheard and tx packets for decoding 2013-03-13 22:53:50 +01:00
originator.c batman-adv: network coding - detect coding nodes and remove these after timeout 2013-03-13 22:53:49 +01:00
originator.h hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
packet.h batman-adv: Fix endianness errors for network coding 2013-03-27 10:27:31 +01:00
ring_buffer.c batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
ring_buffer.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
routing.c batman-adv: network coding - save overheard and tx packets for decoding 2013-03-13 22:53:50 +01:00
routing.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
send.c batman-adv: network coding - save overheard and tx packets for decoding 2013-03-13 22:53:50 +01:00
send.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
soft-interface.c batman-adv: network coding - receive coded packets and decode them 2013-03-13 22:53:51 +01:00
soft-interface.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
sysfs.c batman-adv: network coding - add the initial infrastructure code 2013-03-13 22:53:48 +01:00
sysfs.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
translation-table.c batman-adv: don't use !! in bool conversion 2013-03-13 22:53:48 +01:00
translation-table.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
types.h batman-adv: network coding - receive coded packets and decode them 2013-03-13 22:53:51 +01:00
unicast.c batman-adv: don't use !! in bool conversion 2013-03-13 22:53:48 +01:00
unicast.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00
vis.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
vis.h batman-adv: update copyright years 2013-01-19 21:18:12 +08:00