From: Antonio Quartulli Date: Sat, 14 Apr 2012 11:15:27 +0000 (+0200) Subject: batman-adv: convert the tt_crc to network order X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6d2003fc26e280001273d0b9dcc02b90f4536708;p=linux-beck.git batman-adv: convert the tt_crc to network order Before sending out a TT_Request packet we must convert the tt_crc field value to network order (since it is 16bits long). Reported-by: Al Viro Signed-off-by: Antonio Quartulli --- diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index e16a3690bdb2..a38d315d3cd6 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -1339,7 +1339,7 @@ static int send_tt_request(struct bat_priv *bat_priv, memcpy(tt_request->dst, dst_orig_node->orig, ETH_ALEN); tt_request->header.ttl = TTL; tt_request->ttvn = ttvn; - tt_request->tt_data = tt_crc; + tt_request->tt_data = htons(tt_crc); tt_request->flags = TT_REQUEST; if (full_table)