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

DHCP client support #3102

Merged
merged 7 commits into from
Jan 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not try to set up default gateway without an IP address
If the container has no IP address (because it will be assigned via DHCP later),
setting up a default route fails with a warning message.

While this is harmless, the default route should be omitted instead.
  • Loading branch information
kris7t committed Dec 30, 2019
commit 40d6081485d6f3e39f325cede1cef48f225c9cdc
4 changes: 4 additions & 0 deletions src/firejail/network_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ void net_check_cfg(void) {
if (cfg.defaultgw)
check_default_gw(cfg.defaultgw);
else {
// if the first network has no assigned address,
// do not try to set up a gateway, because it will fail
if (cfg.bridge0.arg_ip_none)
return;
// first network is a regular bridge
if (cfg.bridge0.macvlan == 0)
cfg.defaultgw = cfg.bridge0.ip;
Expand Down