From ac235fb7d28da6690f5ef7d7dc37d40bcebbd87a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 9 Apr 2012 23:40:43 +0200 Subject: Fix sending of packets on big endian architectures --- src/fastd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } }; -- cgit v1.2.3