Skip to content

main: tear down the DNS ifb device on exit - #9

Open
choppyc79 wants to merge 1 commit into
openwrt:masterfrom
choppyc79:dns-ifb-cleanup
Open

main: tear down the DNS ifb device on exit#9
choppyc79 wants to merge 1 commit into
openwrt:masterfrom
choppyc79:dns-ifb-cleanup

Conversation

@choppyc79

Copy link
Copy Markdown

qosify_dns_init() creates the ifb-dns netdev, but qosify_dns_stop() is
never called, so the device and its default qdisc survive a clean
shutdown of the daemon:

/etc/init.d/qosify stop

tc qdisc show dev ifb-dns

qdisc fq_codel 0: dev ifb-dns root refcnt 2 limit 10240p flows 1024 [...]

Per-interface ifb devices are already removed via interface_clear_qdisc(),
so ifb-dns is the only leftover. It is most visible after removing the
package, since nothing recreates or cleans it up afterwards.

Call qosify_dns_stop() after qosify_iface_stop(), so that the filters
redirecting to ifb-dns are gone before the device itself is deleted.
This also closes the raw packet socket and frees the cname cache.

Signed-off-by: Ash Clarke clarkeaj@hotmail.co.uk

qosify_dns_init() creates the ifb-dns netdev, but qosify_dns_stop() is
never called, so the device and its default qdisc survive a clean
shutdown of the daemon:

  # /etc/init.d/qosify stop
  # tc qdisc show dev ifb-dns
  qdisc fq_codel 0: dev ifb-dns root refcnt 2 limit 10240p flows 1024 [...]

Per-interface ifb devices are already removed via interface_clear_qdisc(),
so ifb-dns is the only leftover. It is most visible after removing the
package, since nothing recreates or cleans it up afterwards.

Call qosify_dns_stop() after qosify_iface_stop(), so that the filters
redirecting to ifb-dns are gone before the device itself is deleted.
This also closes the raw packet socket and frees the cname cache.

Signed-off-by: Ash Clarke <clarkeaj@hotmail.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant