Skip to content

Commit

Permalink
[pd] Disable PD daemon which caused mDNS disruptions
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsong-cnyn committed Jan 14, 2025
1 parent 047b3a8 commit c93946d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
28 changes: 26 additions & 2 deletions script/_dhcpv6_pd_ref
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,33 @@ dhcpv6_pd_ref_install()
create_dhcpcd_conf_no_pd
create_dhcp6_pd_daemon_service

# The dhcp6_pd_daemon is currently disabled because it restarts dhcpcd
# when the PD state changes. This restart disrupts mDNS, causing
# connectivity issues. The daemon and its associated systemd service
# files are still installed for potential future use.
#
# TODO: Re-enable and start the daemon when a solution is found
# for dhcpcd restarts breaking mDNS.
#
# if have systemctl; then
# sudo systemctl daemon-reload
# sudo systemctl enable ${PD_DAEMON_SERVICE_NAME}
# sudo systemctl start ${PD_DAEMON_SERVICE_NAME}
# fi

# Always enable PD, which is a workaround for the currently disabled
# dhcp6_pd_daemon which caused mDNS disruptions.
sudo cp ${DHCP_CONFIG_PD_PATH} ${DHCP_CONFIG_PATH}

if have systemctl; then
sudo systemctl daemon-reload
sudo systemctl enable ${PD_DAEMON_SERVICE_NAME}
sudo systemctl start ${PD_DAEMON_SERVICE_NAME}

# Restart dhcpcd only if it's running. This is unnecessary when the dhcp6_pd_daemon
# is enabled, as the daemon will handle dhcpcd restarts based on PD state changes.
if systemctl is-active dhcpcd; then
sudo systemctl restart dhcpcd || true
fi

sudo systemctl enable radvd
fi
}
1 change: 1 addition & 0 deletions script/reference-device/dhcpcd.enter-hook
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ config_ra()
sudo tee "${RADVD_CONF}" > /dev/null <<EOF
interface ${WPAN_INTERFACE}
{
IgnoreIfMissing on;
AdvSendAdvert on;
prefix ${1}/${2}
{
Expand Down

0 comments on commit c93946d

Please sign in to comment.