1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-13 15:13:23 +00:00

Improve option retrieve-vlan

This commit is contained in:
Gerhard Rieger 2023-07-27 21:18:23 +02:00
parent 6125ed4e4e
commit 40350ecc79
6 changed files with 29 additions and 12 deletions

View file

@ -235,7 +235,8 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
Debug3("xioread(FD=%d, ...): auxdata: flag=%d, vlan-id=%d",
pipe->fd, pipe->para.socket.ancill_flag.packet_auxdata,
pipe->para.socket.ancill_data_packet_auxdata.tp_vlan_tci);
if (pipe->para.socket.ancill_flag.packet_auxdata &&
if (pipe->para.socket.retrieve_vlan &&
pipe->para.socket.ancill_flag.packet_auxdata &&
pipe->para.socket.ancill_data_packet_auxdata.tp_vlan_tci != 0) {
int offs = 12; /* packet type id in Ethernet header */
Debug1("xioread(%d, ...): restoring VLAN id from auxdata->tp_vlan_tci",