projects
/
6bed4
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c87df
)
Code improvement, minor.
author
Rick van Rein
<rick@openfortress.nl>
Thu, 4 Jun 2020 10:53:17 +0000
(10:53 +0000)
committer
Rick van Rein
<rick@openfortress.nl>
Thu, 4 Jun 2020 10:53:17 +0000
(10:53 +0000)
src/6bed4peer.c
patch
|
blob
|
history
diff --git
a/src/6bed4peer.c
b/src/6bed4peer.c
index
21b6aaf
..
251f474
100644
(file)
--- a/
src/6bed4peer.c
+++ b/
src/6bed4peer.c
@@
-921,8
+921,7
@@
void handle_4to6_plain (ssize_t v4datalen, struct sockaddr_in *sin) {
#ifdef PEER_USE_TAP
v4ether.h_proto = htons (ETH_P_IPV6);
memcpy (v4ether.h_dest, v6lladdr, 6);
- v4ether.h_source [0] = ntohs (sin->sin_port) & 0xff;
- v4ether.h_source [1] = ntohs (sin->sin_port) >> 8;
+ memcpy (v4ether.h_source + 0, &sin->sin_port, 2);
memcpy (v4ether.h_source + 2, &sin->sin_addr, 4);
#endif
syslog (LOG_INFO, "Writing IPv6, result = %zd\n",