projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Moved connlist stuff to the proper header file.
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
71b1367
..
89e89fa
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.4
7 2000/10/29 00:02:1
9 guus Exp $
+ $Id: protocol.c,v 1.28.4.4
9 2000/10/29 01:08:0
9 guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-111,6
+111,12
@@
cp
request_name[request], cl->name, cl->hostname);
}
request_name[request], cl->name, cl->hostname);
}
+ if((cl->allow_request != ALL) && (cl->allow_request != request))
+ {
+ syslog(LOG_ERR, _("Unauthorized request from %s (%s)"), cl->name, cl->hostname);
+ return -1;
+ }
+
if(request_handlers[request](cl))
/* Something went wrong. Probably scriptkiddies. Terminate. */
{
if(request_handlers[request](cl))
/* Something went wrong. Probably scriptkiddies. Terminate. */
{
@@
-435,7
+441,8
@@
cp
int send_ack(conn_list_t *cl)
{
cp
int send_ack(conn_list_t *cl)
{
cp
- cl->allow_request = ACK;
+ if(cl->status.outgoing)
+ cl->allow_request = ACK;
cp
return send_request(cl, "%d", ACK);
}
cp
return send_request(cl, "%d", ACK);
}
@@
-1074,8
+1081,8
@@
cp
BF_set_key(cl->cipher_pktkey, keylength, pktkey);
*/
BF_set_key(cl->cipher_pktkey, keylength, pktkey);
*/
-
cl
->status.validkey = 1;
-
cl
->status.waitingforkey = 0;
+
from
->status.validkey = 1;
+
from
->status.waitingforkey = 0;
}
else
{
}
else
{