Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with /etc/dhcpcd.conf #578

Closed
zbchristian opened this issue May 8, 2020 · 0 comments · Fixed by #582
Closed

Problem with /etc/dhcpcd.conf #578

zbchristian opened this issue May 8, 2020 · 0 comments · Fixed by #582

Comments

@zbchristian
Copy link
Collaborator

zbchristian commented May 8, 2020

Hi billz,
there is an inconsistency of the creation of the file /etc/dhcpcd.conf, which can result in problems with the AP functionality as well as the client connection.
/etc/dhcpcd.conf is written by includes/hostapd.php as well as by ajax/networking/gen_int_config.php. The first writes to dhcpcd.conf, when the hotspot settings are saved and the latter, when settings for a network interface are saved. The 2 function do not respect the output of the other, so they just overwrite the content of dhcpcd.conf. Therefore it depends on the order of the calls, what is actually stored in dhcpcd.conf.

I fixed this for me now, but its just a quick hack to get my setup with two wlan cards going. A consistent solution, probably a single function called for both cases, is needed.

There is another issue in get_int_config.php: in my case the file "defaults" is read last, which puts the settings of the interfaces (e.g. static ip assignment) in front of the default settings. This disables the dhcpcd defaults and leads to the effect, that the uplink dns servers are no longer used by dnsmasq. Only the statically assigned dns servers are still available.
I fixed this by putting
$strConfFile = file_get_contents(RASPI_CONFIG_NETWORKING.'/defaults')."\n";

in front of the foreach loop and removing the else statement, which handles the defaults file.

Best
Christian

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 a pull request may close this issue.

1 participant