minor: assignIP → assignOverlayAddr

This commit is contained in:
Leo Antunes 2019-03-27 21:37:54 +01:00
parent abb832d159
commit b2a7551a53
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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()