Skip to content

Commit

Permalink
batman-adv: convert the tt_crc to network order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonio Quartulli committed Apr 18, 2012
1 parent ecffe75 commit 6d2003f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6d2003f

Please sign in to comment.