diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-04-14 07:15:27 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-18 03:43:36 -0400 |
commit | 6d2003fc26e280001273d0b9dcc02b90f4536708 (patch) | |
tree | 58a9fbc1927df97ff68e6cfbd0fc31adce3b1ea4 /net/batman-adv | |
parent | ecffe75f934b4e3c5301fe5db278068e0efb0d6b (diff) |
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 <viro@ZenIV.linux.org.uk>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/translation-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index e16a3690bdb..a38d315d3cd 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, | |||
1339 | memcpy(tt_request->dst, dst_orig_node->orig, ETH_ALEN); | 1339 | memcpy(tt_request->dst, dst_orig_node->orig, ETH_ALEN); |
1340 | tt_request->header.ttl = TTL; | 1340 | tt_request->header.ttl = TTL; |
1341 | tt_request->ttvn = ttvn; | 1341 | tt_request->ttvn = ttvn; |
1342 | tt_request->tt_data = tt_crc; | 1342 | tt_request->tt_data = htons(tt_crc); |
1343 | tt_request->flags = TT_REQUEST; | 1343 | tt_request->flags = TT_REQUEST; |
1344 | 1344 | ||
1345 | if (full_table) | 1345 | if (full_table) |