chiark / gitweb /
test-example: Provide a fuzzer for the slip decoder
[secnet.git] / site.c
diff --git a/site.c b/site.c
index b14b8e8f60ee1987f07aa1822db693fd9d65af68..c8206d03943a7f4617f89209ff65750e593d7431 100644 (file)
--- a/site.c
+++ b/site.c
@@ -1630,7 +1630,7 @@ static bool_t site_incoming(void *sst, struct buffer_if *buf,
        if (st->state==SITE_RUN || st->state==SITE_RESOLVE ||
            st->state==SITE_WAIT) {
            /* We should definitely process it */
-           transport_record_peer(st,&st->setup_peers,source,"msg1");
+           transport_compute_setupinit_peers(st,0,source);
            if (process_msg1(st,buf,source,&named_msg)) {
                slog(st,LOG_SETUP_INIT,"key setup initiated by peer");
                bool_t entered=enter_new_state(st,SITE_SENTMSG2);
@@ -1696,7 +1696,7 @@ static bool_t site_incoming(void *sst, struct buffer_if *buf,
               because our peer's forgotten the key */
            if (get_uint32(buf->start+4)==st->current.remote_session_id) {
                bool_t initiated;
-               initiated = initiate_key_setup(st,"received a NAK",0);
+               initiated = initiate_key_setup(st,"received a NAK",source);
                if (!initiated) generate_send_prod(st,source);
            } else {
                slog(st,LOG_SEC,"bad incoming NAK");