projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Send one less byte from an ANS_KEY request.
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
fc23c8e
..
4935dc2
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-738,7
+738,7
@@
int ans_key_h(conn_list_t *cl)
conn_list_t *fw, *gk;
char *key;
cp
conn_list_t *fw, *gk;
char *key;
cp
- if(read(cl->meta_socket, &((char*)(&tmp))[1], sizeof(tmp)-
2
) <= 0)
+ if(read(cl->meta_socket, &((char*)(&tmp))[1], sizeof(tmp)-
3
) <= 0)
{
syslog(LOG_ERR, "%d: Receive failed: %m", __LINE__);
return -1;
{
syslog(LOG_ERR, "%d: Receive failed: %m", __LINE__);
return -1;
@@
-789,7
+789,7
@@
cp
syslog(LOG_DEBUG, "Forwarding public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
tmp.type = ANS_KEY;
syslog(LOG_DEBUG, "Forwarding public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
tmp.type = ANS_KEY;
- if(write(fw->nexthop->meta_socket, &tmp, sizeof(tmp) -
1
) < 0)
+ if(write(fw->nexthop->meta_socket, &tmp, sizeof(tmp) -
2
) < 0)
{
syslog(LOG_ERR, "send failed: %s:%d: %m", __FILE__, __LINE__);
return -1;
{
syslog(LOG_ERR, "send failed: %s:%d: %m", __FILE__, __LINE__);
return -1;