Open vivekrnv opened 1 year ago
@kellyyeh, @jcaiMR, @yxieca PFA
When a single interface add to multiple VLAN groups, in the first VLAN group it will be untagged interface, in the second VLAN and third VLAN group it will be marked as tagged interface. So solution may like:
I don't understand,
When a single interface add to multiple VLAN groups, in the first VLAN group it will be untagged interface, in the second VLAN and third VLAN group it will be marked as tagged interface. So solution may like:
Can't the iface be tagged in all VLAN Groups.
- still use current filter socket logic, only care about Ethernet interface (ignore bridge and Vlan)
- interface to vlan mapping table only care about untagged interface to vlan map
- Tagged interface we get the vlan info from vlan header
Afaik, the kernel strips off the Vlan TAG. if we can get this info from the packet, then this should solve the problem.
- if packets don't have vlan header and can't find VLAN from interface to vlan mapping table, we drop the packet
Yes, it can. What I mentioned here is mainly about mixed case, the point is interface vlan map only for untagged interface.
For kernel strips off vlan, when the packet reaches vlan member interface raw socket, I think the vlan header is not removed yet. But need some testing to confirm that.
originator agreed on the explanation and can close it now...
originator agreed on the explanation and can close it now...
Still an issue, just not a usecase that is used currently. I think it's better to keep this open for documentation.
Description
Happens when the client is a member of multiple Vlans i.e. a trunk VLAN
Steps to reproduce the issue:
topology : enp4s0f0 (host) <-> Ethernet0 (DUT)
root@dut:/home/admin# config vlan add 690 root@dut:/home/admin# config vlan add 691 root@dut:/home/admin# config vlan member add 690 Ethernet0 root@dut:/home/admin# config vlan member add 691 Ethernet0 root@dut:/home/admin# sudo config interface ip add Vlan690 6900:1::1/64 root@dut:/home/admin# sudo config interface ip add Vlan691 6910::1/64
root@host:~# tcpdump -i enp4s0f0 -e -n tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on enp66s0f1, link-type EN10MB (Ethernet), capture size 262144 bytes
12:45:36.548662 0c:42:a1:5a:60:01 > 33:33:00:01:00:02, ethertype 802.1Q (0x8100), length 150: vlan 690, p 0, ethertype IPv6, fe80::e42:a1ff:fe5a:6001.546 > ff02::1:2.547: dhcp6 solicit 12:45:36.550990 1c:34:da:a1:96:80 > 0c:42:a1:5a:60:01, ethertype 802.1Q (0x8100), length 150: vlan 691, p 0, ethertype IPv6, fe80::1e34:daff:fea1:9680.547 > fe80::e42:a1ff:fe5a:6001.546: dhcp6 advertise 12:45:36.551048 0c:42:a1:5a:60:01 > 1c:34:da:a1:96:80, ethertype 802.1Q (0x8100), length 198: vlan 691, p 0, ethertype IPv6, fe80::e42:a1ff:fe5a:6001 > fe80::1e34:daff:fea1:9680: ICMP6, destination unreachable, unreachable port, fe80::e42:a1ff:fe5a:6001 udp port 546, length 140
root@host:~# dhclient -6 enp4s0f0.691 -v
root@dut: sudo tcpdump -n -i Ethernet0 'udp dst port 547' -v 23:49:30.968753 IP6 (flowlabel 0x348c2, hlim 1, next-header UDP (17) payload length: 64) fe80::7efe:90ff:fe12:22ec.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=32b4db (client-ID hwaddr/time type 1 time 724423475 7cfe901222ed) (option-request DNS-server DNS-search-list Client-FQDN SNTP-servers) (elapsed-time 0) (IA_NA IAID:2417107692 T1:3600 T2:5400))
root@dut: sudo tcpdump -n -i Vlan691 'udp dst port 547' -v 23:49:30.968753 IP6 (flowlabel 0x348c2, hlim 1, next-header UDP (17) payload length: 64) fe80::7efe:90ff:fe12:22ec.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=32b4db (client-ID hwaddr/time type 1 time 724423475 7cfe901222ed) (option-request DNS-server DNS-search-list Client-FQDN SNTP-servers) (elapsed-time 0) (IA_NA IAID:2417107692 T1:3600 T2:5400))