mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
* Allow disabling IPv6 Simply ignores any IPv6 addresses in the lease and doesn't offer them to the RPC Also fixed display issue for IPv6 link local address. Fixes https://github.com/orgs/jetkvm/projects/7/views/1?pane=issue&itemId=122761546&issue=jetkvm%7Ckvm%7C685 * Don't listen on disabled addresses in mDNS or web server. * We have to set the IPv4 and IPv6 modes on the server.
27 lines
457 B
Go
27 lines
457 B
Go
package kvm
|
|
|
|
import (
|
|
"github.com/jetkvm/kvm/internal/mdns"
|
|
)
|
|
|
|
var mDNS *mdns.MDNS
|
|
|
|
func initMdns() error {
|
|
m, err := mdns.NewMDNS(&mdns.MDNSOptions{
|
|
Logger: logger,
|
|
LocalNames: []string{
|
|
networkState.GetHostname(),
|
|
networkState.GetFQDN(),
|
|
},
|
|
ListenOptions: config.NetworkConfig.GetMDNSMode(),
|
|
})
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
// do not start the server yet, as we need to wait for the network state to be set
|
|
mDNS = m
|
|
|
|
return nil
|
|
}
|