minor: assignIP → assignOverlayAddr
This commit is contained in:
parent
abb832d159
commit
b2a7551a53
|
@ -87,7 +87,7 @@ func newCluster(config *config, wg *wgState) (*cluster, error) {
|
||||||
mlConfig.Events = &memberlist.ChannelEventDelegate{Ch: cluster.events}
|
mlConfig.Events = &memberlist.ChannelEventDelegate{Ch: cluster.events}
|
||||||
mlConfig.Delegate = &cluster
|
mlConfig.Delegate = &cluster
|
||||||
|
|
||||||
wg.assignIP((*net.IPNet)(config.OverlayNet), cluster.localName)
|
wg.assignOverlayAddr((*net.IPNet)(config.OverlayNet), cluster.localName)
|
||||||
|
|
||||||
ml.UpdateNode(1 * time.Second) // we currently do not update after creation
|
ml.UpdateNode(1 * time.Second) // we currently do not update after creation
|
||||||
return &cluster, nil
|
return &cluster, nil
|
||||||
|
|
|
@ -52,7 +52,7 @@ func newWGConfig(iface string, port int) (*wgState, error) {
|
||||||
return &wgState, nil
|
return &wgState, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (wg *wgState) assignIP(ipnet *net.IPNet, name string) {
|
func (wg *wgState) assignOverlayAddr(ipnet *net.IPNet, name string) {
|
||||||
// TODO: this is way too brittle and opaque
|
// TODO: this is way too brittle and opaque
|
||||||
ip := []byte(ipnet.IP)
|
ip := []byte(ipnet.IP)
|
||||||
bits, size := ipnet.Mask.Size()
|
bits, size := ipnet.Mask.Size()
|
||||||
|
|
Loading…
Reference in New Issue