passt: Add epoll event indication and passt/pasta mode in socket debug message
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
3df5debf37
commit
9d19f5bc73
1 changed files with 3 additions and 1 deletions
4
passt.c
4
passt.c
|
@ -85,7 +85,9 @@ char *ip_proto_str[IPPROTO_SCTP + 1] = {
|
||||||
static void sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
|
static void sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
|
||||||
struct timespec *now)
|
struct timespec *now)
|
||||||
{
|
{
|
||||||
debug("%s packet from socket %i", IP_PROTO_STR(ref.proto), ref.s);
|
debug("%s: %s packet from socket %i (events: 0x%08x)",
|
||||||
|
c->mode == MODE_PASST ? "passt" : "pasta",
|
||||||
|
IP_PROTO_STR(ref.proto), ref.s, events);
|
||||||
|
|
||||||
if (!c->no_tcp && ref.proto == IPPROTO_TCP)
|
if (!c->no_tcp && ref.proto == IPPROTO_TCP)
|
||||||
tcp_sock_handler( c, ref, events, now);
|
tcp_sock_handler( c, ref, events, now);
|
||||||
|
|
Loading…
Reference in a new issue