commit
077d7d4895
4 changed files with 5 additions and 5 deletions
|
@ -19,7 +19,7 @@ var (
|
|||
// ErrIfaceName error is returned when a new name could not be generated.
|
||||
ErrIfaceName = errors.New("Failed to find name for new interface")
|
||||
|
||||
// ErrNoIPAddr error is returned when bridge has no IPv4 addrss configured.
|
||||
// ErrNoIPAddr error is returned when bridge has no IPv4 address configured.
|
||||
ErrNoIPAddr = errors.New("Bridge has no IPv4 address configured")
|
||||
)
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ func electBridgeIPv4(config *Configuration) (*net.IPNet, error) {
|
|||
nameservers = append(nameservers, getNameserversAsCIDR(resolvConf)...)
|
||||
}
|
||||
|
||||
// Try to automatically elect appropriate brige IPv4 settings.
|
||||
// Try to automatically elect appropriate bridge IPv4 settings.
|
||||
for _, n := range bridgeNetworks {
|
||||
if err := netutils.CheckNameserverOverlaps(nameservers, n); err == nil {
|
||||
if err := netutils.CheckRouteOverlaps(n); err == nil {
|
||||
|
|
|
@ -122,7 +122,7 @@ func getDynamicPortRange() (start int, end int, err error) {
|
|||
}
|
||||
|
||||
// RequestPort requests new port from global ports pool for specified ip and proto.
|
||||
// If port is 0 it returns first free port. Otherwise it cheks port availability
|
||||
// If port is 0 it returns first free port. Otherwise it checks port availability
|
||||
// in pool and return that port or error if port is already busy.
|
||||
func (p *PortAllocator) RequestPort(ip net.IP, proto string, port int) (int, error) {
|
||||
p.mutex.Lock()
|
||||
|
|
|
@ -25,7 +25,7 @@ var (
|
|||
ErrUnknownBackendAddressType = errors.New("unknown container address type not supported")
|
||||
// ErrPortMappedForIP refers to a port already mapped to an ip address
|
||||
ErrPortMappedForIP = errors.New("port is already mapped to ip")
|
||||
// ErrPortNotMapped refers to an unampped port
|
||||
// ErrPortNotMapped refers to an unmapped port
|
||||
ErrPortNotMapped = errors.New("port is not mapped")
|
||||
)
|
||||
|
||||
|
@ -45,7 +45,7 @@ func New() *PortMapper {
|
|||
return NewWithPortAllocator(portallocator.New())
|
||||
}
|
||||
|
||||
// NewWithPortAllocator returns a new instance of PortMapper wich will use the specified PortAllocator
|
||||
// NewWithPortAllocator returns a new instance of PortMapper which will use the specified PortAllocator
|
||||
func NewWithPortAllocator(allocator *portallocator.PortAllocator) *PortMapper {
|
||||
return &PortMapper{
|
||||
currentMappings: make(map[string]*mapping),
|
||||
|
|
Loading…
Add table
Reference in a new issue