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 49235a0 commit 2113d7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/peer-approver/notification-listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static int run_callback(char *ifname, char *pubkey, char *endpoint_ip, bool adva
{
char** new_argv = malloc((cb_argc + 2) * sizeof *new_argv);

new_argv[0] = cb_argv[1];
for (int i = 2; i < cb_argc - 3; i++) {
new_argv[i - 1] = cb_argv[i];
}
Expand All @@ -126,6 +127,7 @@ static int run_callback(char *ifname, char *pubkey, char *endpoint_ip, bool adva
new_argv[cb_argc - 2] = endpoint_ip;
new_argv[cb_argc - 1] = (advanced_security ? "on\0" : "off\0");
new_argv[cb_argc] = NULL;
//prerr("Calling ")
int ret = execv(cb_argv[1], new_argv);
free(new_argv);
return ret;
Expand Down

0 comments on commit 2113d7c

Please sign in to comment.