In ancient email thread, I believe on infradead.org, between âdirkâ and âjoâ, âjoâ explained that the procd interface trigger âinterface.*â is equivalent to listening for âinterface.downâ + âinterface.upâ events.
After replacing âinterface.*â with âinterface.downâ and adding a second trigger for âinterface.upâ,
"triggers": [
[
"interface.up",
[
"if",
[
"eq",
"interface",
"lan"
],
[
"run_script",
"/etc/init.d/https-dns-proxy",
"reload",
"up"
]
],
1000
],
[
"interface.down",
[
"if",
[
"eq",
"interface",
"lan"
],
[
"run_script",
"/etc/init.d/https-dns-proxy",
"stop",
"down"
]
],
1000
],
procd does invoke the âinterface.downâ trigger when the interface is set down (root@pWPW10-1:~# ubus -v call network.interface.lan down) but not on âinterface.upâ events (root@pWPW10-1:~# ubus -v call network.interface.lan up).
This is confirmed by monitoring the ubus âinvokeâ method - root@pWPW10-1:~# ubus -m invoke monitor >/tmp/lan_events.txt.
root@pWPW10-1:~# grep -e http /tmp/lan_events.txt
<- 03d05ccd #8ac6a30f invoke: {"objid":-1966693617,"method":"delete","data":{"name":"https-dns-proxy","instance":"down"}}
-> 820aa895 #03d05ccd invoke: {"objid":-1966693617,"method":"delete","data":{"name":"https-dns-proxy","instance":"down"},"user":"root","group":"root"}
ubus id invoking procd {âobjidâ:1,âŠ} for both events -
<- 8639c9da #00000001 invoke: {"objid":1,"method":"send","data":{"id":"network.interface","data":{"action":"ifdown","interface":"lan"}}}
-> 820aa895 #8639c9da invoke: {"objid":1116470396,"method":"interface.down","data":{"interface":"lan","up":false,"pending":false,"available":true,"autostart":false,"dynamic":false,"proto":"dhcp","device":"br-lan","data":{"dhcpserver":"192.168.2.249","hostname":"pWPW10-1","leasetime":14400}},"no_reply":true,"user":"root","group":"root"}
<- 8639c9da #00000001 invoke: {"objid":1,"method":"send","data":{"id":"network.interface","data":{"action":"ifdown","interface":"lan"}}}
-> 820aa895 #8639c9da invoke: {"objid":1116470396,"method":"interface.down","data":{"interface":"lan","up":false,"pending":false,"available":true,"autostart":false,"dynamic":false,"proto":"dhcp","device":"br-lan","data":{"dhcpserver":"192.168.2.249","hostname":"pWPW10-1","leasetime":14400}},"no_reply":true,"user":"root","group":"root"}
<- 30e4e364 #00000001 invoke: {"objid":1,"method":"register","data":{"object":1225318724,"pattern":"ubus.object.add"}}
<- 1077c4ad #67703481 invoke: {"objid":1735406721,"method":"config_set","data":{"config":
,"phy":"phy0","radio":-1,"num_global_macaddr":1,"macaddr_base":"","defer":true}}
<- cafea0f7 #00000001 invoke: {"objid":1,"method":"register","data":{"object":541236989,"pattern":"ubus.object.add"}}
<- 672ac31e #67703481 invoke: {"objid":1735406721,"method":"config_set","data":{"config":
,"phy":"phy1","radio":-1,"num_global_macaddr":1,"macaddr_base":"","defer":true}}
<- 2a66c1d2 #00000001 invoke: {"objid":1,"method":"register","data":{"object":-583809852,"pattern":"ubus.object.add"}}
<- e9823bd4 #67703481 invoke: {"objid":1735406721,"method":"config_set","data":{"config":
,"phy":"phy1","radio":-1,"num_global_macaddr":1,"macaddr_base":"","defer":true}}
<- 8639c9da #00000001 invoke: {"objid":1,"method":"send","data":{"id":"network.interface","data":{"action":"ifup","interface":"lan"}}}
-> 820aa895 #8639c9da invoke: {"objid":1116470396,"method":"interface.update","data":{"interface":"lan","up":true,"pending":false,"available":true,"autostart":true,"dynamic":false,"uptime":0,"l3_device":"br-lan","proto":"dhcp","device":"br-lan","updated":["addresses","routes","data"],"metric":0,"dns_metric":0,"delegation":false,"ipv4-address":[{"address":"192.168.2.31","mask":24}],"ipv6-address":
,"ipv6-prefix":
,"ipv6-prefix-assignment":
,"route":[{"target":"0.0.0.0","mask":0,"nexthop":"192.168.2.254","source":"192.168.2.31/32"}],"dns-server":["192.168.2.249"],"dns-search":["wpw10.lan"],"neighbors":
,"inactive":{"ipv4-address":
,"ipv6-address":
,"route":
,"dns-server":
,"dns-search":
,"neighbors":
},"data":{"dhcpserver":"192.168.2.249","hostname":"pWPW10-1","leasetime":14400}},"no_reply":true,"user":"root","group":"root"}
<- 11ca811c #00000001 invoke: {"objid":1,"method":"register","data":{"object":353147778,"pattern":"ubus.object.add"}}
<- 8b716252 #d62d142e invoke: {"objid":-701688786,"method":"config_set","data":{"phy":"phy1","radio":-1,"config":"/var/run/hostapd-phy1.conf","prev_config":"/var/run/hostapd-phy1.conf.prev"}}
<- 68bc0640 #00000001 invoke: {"objid":1,"method":"register","data":{"object":96395886,"pattern":"ubus.object.add"}}
<- bece1239 #67703481 invoke: {"objid":1735406721,"method":"phy_status","data":{"phy":"phy1","radio":-1}}
<- 264335de #00000001 invoke: {"objid":1,"method":"register","data":{"object":1032773891,"pattern":"ubus.object.add"}}
<- 2e5d0475 #d62d142e invoke: {"objid":-701688786,"method":"config_set","data":{"phy":"phy0","radio":-1,"config":"/var/run/hostapd-phy0.conf","prev_config":"/var/run/hostapd-phy0.conf.prev"}}
but procd does not trigger its listeners.
Where / what is the appropriate channel / method for reporting this behaviour?