mirror of https://github.com/dswd/vpncloud.git
Ignore first 4 bits of VLAN header
This commit is contained in:
parent
0677c7682e
commit
2656820f37
|
@ -36,6 +36,7 @@ impl Protocol for Frame {
|
||||||
src.copy_within(..6, 2);
|
src.copy_within(..6, 2);
|
||||||
dst.copy_within(..6, 2);
|
dst.copy_within(..6, 2);
|
||||||
cursor.read_exact(&mut src[..2]).map_err(|_| Error::Parse("Vlan frame is too short"))?;
|
cursor.read_exact(&mut src[..2]).map_err(|_| Error::Parse("Vlan frame is too short"))?;
|
||||||
|
src[0] &= 0x0f;
|
||||||
dst[..2].copy_from_slice(&src[..2]);
|
dst[..2].copy_from_slice(&src[..2]);
|
||||||
Ok((Address { data: src, len: 8 }, Address { data: dst, len: 8 }))
|
Ok((Address { data: src, len: 8 }, Address { data: dst, len: 8 }))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue