projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Previous fix fixed. Meta protocol should be really flawless from now on!
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
0a27692
..
c6b6fec
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-616,7
+616,9
@@
cp
syslog(LOG_DEBUG, "Forwarding request for public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
syslog(LOG_DEBUG, "Forwarding request for public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
- if(write(fw->nexthop->meta_socket, cl->buffer, strlen(cl->buffer)) < 0)
+ cl->buffer[cl->reqlen-1] = '\n';
+
+ if(write(fw->nexthop->meta_socket, cl->buffer, cl->reqlen) < 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;
@@
-711,7
+713,9
@@
cp
syslog(LOG_DEBUG, "Forwarding public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
syslog(LOG_DEBUG, "Forwarding public key to " IP_ADDR_S,
IP_ADDR_V(fw->nexthop->vpn_ip));
- if((write(fw->nexthop->meta_socket, cl->buffer, strlen(cl->buffer))) < 0)
+ cl->buffer[cl->reqlen-1] = '\n';
+
+ if((write(fw->nexthop->meta_socket, cl->buffer, cl->reqlen)) < 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;