WAN disconnect not detected

The issue below was observed on ZBT WE826-T and Nexx WT3020 running 18.06.4, 18.06.5 and Snapshot.

Once WAN cable is disconnected the corresponding wan interface (configured as DHCP) stays up with IP address assigned, default route via that interface is still present.

Cable connected:

kern.info kernel: [  832.516739] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
daemon.notice netifd: wan (1239): udhcpc: sending select for 192.168.x.x
daemon.notice netifd: wan (1239): udhcpc: lease of 192.168.x.x obtained, lease time 72656
daemon.notice netifd: Interface 'wan' is now up

Cable disconnected:

kern.info kernel: [  901.923859] mtk_soc_eth 10100000.ethernet eth0: port 0 link down

and nothing more.

# ifstatus wan
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 1118,
	"l3_device": "eth0.2",
	"proto": "dhcp",
	"device": "eth0.2",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "192.168.x.x",
			"mask": 24

Is this a netifd problem or we just lacking a script to handle link on-to-off transition?

Depending on the device, it may be the switch port that goes up and down, as there is often a “permanently up” link between the switch and the CPU

Exactly, this is the switch port associated with the wan interface.
Found the relevant discussion and possible workaround just a few minutes ago: