When i am connecting my laptop cable to lan4 and wan cable to wan port,
DHCP request coming from laptop is also visible on wan network.
as well as dhcp server which is starting by default on br-lan is assigning dhcp leases on wan network as well.
Note:- I am using vanilla openwrt with openwrt 21.02 branch.
.config is generated is as well vanilla.
i have made 2 changes in dts for gmac as below .config file
@frollic dteam_pbr_d1 is supported and still available in main branch,
As well i will try to compile a build for openwrt 23 to check, but if u can point out what to troubleshoot and what can be the issue for dhcp leak, it would be great.
I can not migrate to openwrt 23 as there are much applications running on openwrt 21 in my case which doesn't have compatibility with openwrt 23 being kernel change, fw changes and much more.
Seems like your switch config is incorrect and is treating all your ports as a single LAN. Whether that's your config or a software issue is hard to tell since you don't include any other information.
Is port 0 or port 6 your CPU port?
The CPU port needs to be tagged on each vlan.
(Maybe it is the root course of your issue regarding where the traffic is visible/passing through.)