aboutsummaryrefslogtreecommitdiff
path: root/src/exit
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-01-17 19:30:12 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-01-17 19:30:12 +0000
commit54b312343894bbd7ad76e9b0498f0782d72287b4 (patch)
treeb33c36503906c1ea96f11896db1d95603468e9a4 /src/exit
parentbfc680da48ff87b791390fad2a664f1e8990eebe (diff)
-move IPv6 header initialization to tun library
git-svn-id: https://gnunet.org/svn/gnunet@19215 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/exit')
-rw-r--r--src/exit/gnunet-daemon-exit.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index a4a0f967d1..664a86f235 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -1159,12 +1159,11 @@ prepare_ipv6_packet (const void *payload, size_t payload_length,
return;
}
- pkt6->version = 6;
- pkt6->next_header = protocol;
- pkt6->payload_length = htons ((uint16_t) (len + sizeof (struct GNUNET_TUN_IPv6Header)));
- pkt6->hop_limit = 255;
- pkt6->destination_address = dst_address->address.ipv6;
- pkt6->source_address = src_address->address.ipv6;
+ GNUNET_TUN_initialize_ipv6_header (pkt6,
+ protocol,
+ len,
+ &dst_address->address.ipv6,
+ &src_address->address.ipv6);
switch (protocol)
{