File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -412,12 +412,23 @@ module Interface = struct
412412 Ip. set_ipv6_link_local_addr name
413413 )
414414 | DHCP6 ->
415+ let gateway =
416+ Option. fold ~none: []
417+ ~some: (fun n -> [`gateway n])
418+ ! config.gateway_interface
419+ in
420+ let dns =
421+ Option. fold ~none: []
422+ ~some: (fun n -> [`dns n])
423+ ! config.dns_interface
424+ in
415425 if Dhclient. is_running ~ipv6: true name then
416426 ignore (Dhclient. stop ~ipv6: true name) ;
417427 Sysctl. set_ipv6_autoconf name false ;
418428 Ip. flush_ip_addr ~ipv6: true name ;
419429 Ip. set_ipv6_link_local_addr name ;
420- ignore (Dhclient. ensure_running ~ipv6: true name [] )
430+ let options = gateway @ dns in
431+ ignore (Dhclient. ensure_running ~ipv6: true name options)
421432 | Autoconf6 ->
422433 if Dhclient. is_running ~ipv6: true name then
423434 ignore (Dhclient. stop ~ipv6: true name) ;
You can’t perform that action at this time.
0 commit comments