summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-09 23:40:43 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-09 23:40:43 +0200
commitac235fb7d28da6690f5ef7d7dc37d40bcebbd87a (patch)
tree7d07d28bc63084c0fb5ccc866d227b43723bf68d
parent1ed4ac93ae35534397bc8267f255c380ef3193c4 (diff)
downloadfastd-0.3.tar
fastd-0.3.zip
Fix sending of packets on big endian architecturesv0.3
-rw-r--r--src/fastd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c
index b2cc196..ba8c6e8 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -296,8 +296,10 @@ static void handle_tasks(fastd_context *ctx) {
exit_bug(ctx, "unsupported address family");
}
+ uint8_t packet_type = task->send.packet_type;
+
struct iovec iov[2] = {
- { .iov_base = &task->send.packet_type, .iov_len = 1 },
+ { .iov_base = &packet_type, .iov_len = 1 },
{ .iov_base = task->send.buffer.data, .iov_len = task->send.buffer.len }
};