tests: net: socket: af_packet: fix TSN socket recv IP pkt

test_packet_sockets_dgram create ETH_P_TSN sockets but
send and recv ETH_P_IP packet.

Fix it by sending ETH_P_TSN packet.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This commit is contained in:
Fengming Ye 2024-05-30 11:43:24 +09:00 committed by Henrik Brix Andersen
commit a3034d1802

View file

@ -328,7 +328,7 @@ ZTEST(socket_packet, test_packet_sockets_dgram)
memset(&dst, 0, sizeof(dst));
dst.sll_family = AF_PACKET;
dst.sll_protocol = htons(ETH_P_IP);
dst.sll_protocol = htons(ETH_P_TSN);
memcpy(dst.sll_addr, lladdr1, sizeof(lladdr1));
ret = zsock_sendto(sock2, data_to_send, sizeof(data_to_send), 0,