Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ If the sources have been obtained from the CVS/SVN repository you will need the
autotools and automake packages. Autoconf must be at least version 2.52 and
automake must be at least version 1.6.

To install Yersinia:
To install Yersinia on Kali Linux 2024 'Everything' install:

sudo apt update && sudo apt upgrade && sudo apt install autoconf automake autotools-dev libnet1-dev libgtk2.0-dev libpcap-dev
./autogen.sh
./configure
make
Expand Down
12 changes: 6 additions & 6 deletions src/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ admin_th_listen(void *arg)
else
{
write_log(0,"\n Connection accepted for %s\n", inet_ntoa(*ip_addr));
if ( pthread_create( &tid, NULL, &admin_th_network_peer, (void *)sock2 ) < 0)
if (pthread_create(&tid, NULL, &admin_th_network_peer, (void *)(intptr_t)sock2) < 0)
{
n=errno;
thread_error("pthread_create admin_th_listen",n);
Expand Down Expand Up @@ -330,13 +330,13 @@ admin_th_network_peer(void *sock)
if (pthread_mutex_lock(&terms->mutex) != 0)
thread_error("th_network_peer pthread_mutex_lock",errno);

fail = term_add_node(&term_node, TERM_VTY, sock, pthread_self());
fail = term_add_node(&term_node, TERM_VTY, (int32_t)(intptr_t)sock, pthread_self());

if (fail == -1)
{
if (pthread_mutex_unlock(&terms->mutex) != 0)
thread_error("th_network_peer pthread_mutex_unlock",errno);
admin_th_network_peer_exit(term_node, sock);
admin_th_network_peer_exit(term_node, (int)(intptr_t)sock);
}

if (term_node == NULL)
Expand All @@ -346,7 +346,7 @@ admin_th_network_peer(void *sock)

if (pthread_mutex_unlock(&terms->mutex) != 0)
thread_error("th_network_peer pthread_mutex_unlock",errno);
admin_th_network_peer_exit(term_node, sock);
admin_th_network_peer_exit(term_node, (int)(intptr_t)sock);
}

pthread_mutex_lock(&term_node->thread.finished);
Expand Down Expand Up @@ -377,14 +377,14 @@ admin_th_network_peer(void *sock)
thread_error("getpeername",errno);
if (pthread_mutex_unlock(&terms->mutex) != 0)
thread_error("th_vty_peer pthread_mutex_unlock",errno);
admin_th_network_peer_exit(term_node, sock);
admin_th_network_peer_exit(term_node, (int)(intptr_t)sock);
}

if (init_attribs(term_node) < 0)
{
if (pthread_mutex_unlock(&terms->mutex) != 0)
thread_error("th_vty_peer pthread_mutex_unlock",errno);
admin_th_network_peer_exit(term_node, sock);
admin_th_network_peer_exit(term_node, (int)(intptr_t)sock);
}

term_node->from_port = ntohs(name.sin_port);
Expand Down