Weired problem about setting ipv4.filtering

I was trying to use IPv4 filtering for unmanaged bridge,

Set ipv4.address tells me:
Error: Invalid devices: Device validation failed for "eth0": Cannot use manually specified ipv4.address when using unmanaged parent bridge

and ipv4 filtering tells me:
Error: Invalid devices: Device validation failed for "eth0": IPv4 filtering requires a manually specified ipv4.address when using an unmanaged parent bridge

what should I do? thanks.
lxd 4.21

Did you try setting both at the same time?

Yes.
First: lxc config device set [CTNAME] eth0 ipv4.address [IP_ADDRESS]
And then: lxc config device set [CTNAME] eth0 security.ipv4_filtering=true

Or maybe I should put those two commands in one set config command?

Right, you need them done at the same time.

lxc config device set CTNAME eth0 ipv4.address=ADDRESS security.ipv4_filtering=true

Although this can solve the problem, it makes me feel that this is a very strange setting. The two commands’ input separately conflicts with the non-managed bridge, but why can they be used together?

Because if they run the filtering command, they must set the IP address if they want to use the non-managed bridge according to the command, but setting the IP address indicates that it is not compatible with the non-managed bridge, which is a confusing design.

Specifying the ip address is only useful on an unmanaged bridge when also using ip filtering, as there is no lxd managed dhcp server to create a static dhcp allocation.