Don't pad NMRP packets to 64 bytes

This commit is contained in:
Joseph C. Lehner 2022-06-17 13:13:49 +02:00
parent 0b1d1e0a4a
commit 5cfb5e105f

2
nmrp.c
View file

@ -254,7 +254,7 @@ static uint8_t *ethsock_get_hwaddr_fake(struct ethsock* sock)
static int pkt_send(struct ethsock *sock, struct nmrp_pkt *pkt)
{
return ethsock_send(sock, pkt, sizeof(*pkt));
return ethsock_send(sock, pkt, sizeof(pkt->eh) + ntohs(pkt->msg.len));
}
static int pkt_recv(struct ethsock *sock, struct nmrp_pkt *pkt)