Port #4 is a VLAN trunk with two networks on it.
root@router:~# brctl show
bridge name bridge id STP enabled interfaces
br-dmz 7fff.c4411ef3b880 no lan4.4
br-lan 7fff.c4411ef3b880 no wlan0
lan2
lan4.5
wlan1
lan3
lan1
From a device on wifi (wlan1) ping works to a port #4 connected device
ping 192.168.5.7
PING 192.168.5.7 (192.168.5.7) 56(84) bytes of data.
64 bytes from 192.168.5.7: icmp_seq=1 ttl=64 time=3.26 ms
64 bytes from 192.168.5.7: icmp_seq=2 ttl=64 time=2.94 m
From a device on br-lan ping does not work to a port #4 connected device
ping 192.168.5.7
PING 192.168.5.7 (192.168.5.7) 56(84) bytes of data.
From 192.168.5.4 icmp_seq=1 Destination Host Unreachable
From 192.168.5.4 icmp_seq=2 Destination Host Unreachable
From 192.168.5.4 icmp_seq=3 Destination Host Unreachable
The opposite is true as well. The 192.168.5.7 host is able to ping hosts which are on wifi and not those on br-lan
/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdca:ff61:062b::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan3'
list ports 'lan4.5'
list ports 'lan1'
list ports 'lan2'
config interface 'lan'
option ifname 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.5.1'
list dns_search 'example.com'
config interface 'wan'
option ifname 'wan'
option proto 'dhcp'
option peerdns '0'
list dns '208.67.222.123'
list dns '208.67.220.123'
config interface 'wan6'
option ifname 'wan'
option proto 'dhcpv6'
config device
option type 'bridge'
option name 'br-dmz'
list ports 'lan4.4'
config interface 'DMZ'
option ifname 'br-dmz'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.4.1'
config device
option type '8021q'
option ifname 'lan4'
option vid '4'
option name 'lan4.4'
config device
option type '8021q'
option ifname 'lan4'
option vid '5'
option name 'lan4.5'
System is a Belkin RT3200 running Firmware Version OpenWrt SNAPSHOT r16769-ddcb970274 / LuCI Master git-21.124.24916-0faf9a4
It seems to be something with ARP as a tcpdump doesn't show a reply to the arp query unless one of the IPs is on wifi
10:38:40.849210 ARP, Request who-has 192.168.5.7 tell 192.168.5.132, length 46
10:38:41.849221 ARP, Request who-has 192.168.5.7 tell 192.168.5.132, length 46
10:38:46.070638 ARP, Request who-has 192.168.5.239 tell 192.168.5.7, length 42
10:38:46.167480 ARP, Reply 192.168.5.239 is-at ac:12:03:77:f4:7f, length 28
10:38:49.649370 ARP, Request who-has 192.168.5.7 tell 192.168.5.132, length 46
....
10:42:55.319736 ARP, Request who-has 192.168.5.7 tell 192.168.5.239, length 28
10:42:55.319929 ARP, Reply 192.168.5.7 is-at 18:c0:4d:02:30:1a, length 42
Is there anything wrong in the configs?