projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecffe75
)
batman-adv: convert the tt_crc to network order
author
Antonio Quartulli
<ordex@autistici.org>
Sat, 14 Apr 2012 11:15:27 +0000
(13:15 +0200)
committer
Antonio Quartulli
<ordex@autistici.org>
Wed, 18 Apr 2012 07:43:36 +0000
(09:43 +0200)
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>
net/batman-adv/translation-table.c
patch
|
blob
|
history
diff --git
a/net/batman-adv/translation-table.c
b/net/batman-adv/translation-table.c
index
e16a369
..
a38d315
100644
(file)
--- 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)