diff --git a/net/address/address.go b/net/address/address.go index 291a3227..71e00716 100644 --- a/net/address/address.go +++ b/net/address/address.go @@ -19,7 +19,7 @@ func NewRange(start Address, size Offset) Range { return Range{Start: start, End: Add(start, size)} } func (r Range) Size() Offset { return Subtract(r.End, r.Start) } -func (r Range) String() string { return fmt.Sprintf("[%s-%s)", r.Start, r.End) } +func (r Range) String() string { return fmt.Sprintf("%s-%s", r.Start, r.End-1) } func (r Range) Overlaps(or Range) bool { return !(r.Start >= or.End || r.End <= or.Start) } func (r Range) Contains(addr Address) bool { return addr >= r.Start && addr < r.End } diff --git a/site/ipam.md b/site/ipam.md index 35bb66c3..7f19ffc5 100644 --- a/site/ipam.md +++ b/site/ipam.md @@ -214,7 +214,7 @@ reports on the current status of the weave router and IP allocator: Service: ipam Consensus: waiting(quorum: 2, known: 0) - Range: [10.32.0.0-10.48.0.0) + Range: 10.32.0.0-10.47.255.255 DefaultSubnet: 10.32.0.0/12 ... @@ -225,7 +225,3 @@ guide](troubleshooting.html#weave-status) for full details. The 'Service: ipam' section displays the consensus state as well as the total allocation range and default subnet. - -Note that the 'Range' is written using interval notation - '[' means -the start of the range is included and ')' means the end of the range -is not included. diff --git a/site/troubleshooting.md b/site/troubleshooting.md index 9f691c1f..bc5bbb2b 100644 --- a/site/troubleshooting.md +++ b/site/troubleshooting.md @@ -81,7 +81,7 @@ $ weave status Service: ipam Consensus: achieved - Range: [10.32.0.0-10.48.0.0) + Range: 10.32.0.0-10.47.255.255 DefaultSubnet: 10.32.0.0/12 Service: dns