I'm trying to understand the behavior of firewall. why IPv4 & IPv6 have different behavior for same configuration.
WWAN is added explicitly. Out of scope for this use case.
No IPv6 tunnel interface. br-lan->eth0 br-wan->eth1
No other traffic/forwarding rules set
Didn't understand last point, Not only global but zone are also set to be DROP. What gets the precedence here GLOBAL or ZONE settings?
I've read your post multiple times but having trouble understanding what you want to achieve / expect to see.
So you're pinging your OpenWrt device's wan interface and you expect OpenWrt to discard the ICMP echo replies it generates locally to respond to the incoming pings? Or whats the reason of dropping OUTPUT and not INPUT?
The firewall program will stage a generic related accept rule in output:
This means that replies related to established flows are always allowed, regardless of the global policy. The likely reason why IPv4 worked and IPv6 not is that your output drop policy discarded unrelated but important ICMPv6 messages like neighbour discovery packets which prevents IPv6 from working properly.
I was testing/understanding firewall in general, nothing particular to achieve. Initially i just tried with IPv4 and saw its working.
Like you mentioned since the packet hit INPUT chain and connection tracking do mark the flow in accepted criteria and henceforth OUTPUT chain is not hit. Probably to enable packet traversal faster?
However when testing with IPv6, ICMPv6 drop happen which created a mismatch in behavior if seen from a top level.