Skip to content

Commit

Permalink
Auth notifications for unknown peers
Browse files Browse the repository at this point in the history
  • Loading branch information
leninalive committed Sep 6, 2024
1 parent b2423dd commit 7e96dc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/peer-approver/notification-listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ static int get_endpoint(struct nlattr *peer[], char **endpoint_ip)

static int run_callback(char *ifname, char *pubkey, char *endpoint_ip, bool advanced_security)
{
char** new_argv = malloc((cb_argc + 1) * sizeof *new_argv);
char** new_argv = malloc((cb_argc + 2) * sizeof *new_argv);

for (int i = 2; i < cb_argc - 2; i++) {
new_argv[i - 2] = cb_argv[i];
for (int i = 2; i < cb_argc - 3; i++) {
new_argv[i - 1] = cb_argv[i];
}
new_argv[cb_argc - 4] = ifname;
new_argv[cb_argc - 3] = pubkey;
Expand Down Expand Up @@ -189,7 +189,7 @@ int main(int argc, char *argv[])
cleanup_and_exit(EXIT_FAILURE);
}

cb_argc = argc + 2;
cb_argc = argc + 3;
cb_argv = argv;

signal(SIGTERM, signal_handler);
Expand Down

0 comments on commit 7e96dc0

Please sign in to comment.