Set bridge device "up" after creation and configuration

This commit is contained in:
Tom Marshall 2021-04-22 09:28:16 -07:00
parent d5e32258bd
commit 1a62531645
1 changed files with 7 additions and 0 deletions

7
vmmd
View File

@ -2415,6 +2415,13 @@ if config['network.mode'] == 'bridge':
except:
# XXX: handle errors other than already exists
pass
argv = [find_in_path('ip'),
'link', 'set', config['network.bridge.name'], 'up']
try:
cmd_run(argv)
except:
loge("Cannot activate bridge device")
sys.exit(1)
if 'network.proxy_arp_dev' in config:
pathname = "/proc/sys/net/ipv4/conf/%s/proxy_arp" % (config['network.proxy_arp_dev'])
file_write(pathname, "1")