1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

typo: fix misspells in code and comments

Signed-off-by: Yang Li <idealhack@gmail.com>
This commit is contained in:
Yang Li 2018-05-29 17:07:06 +08:00
parent 350fc8fc17
commit f9f3b1bdeb
2 changed files with 4 additions and 4 deletions

View file

@ -706,8 +706,8 @@ func (d *driver) createNetwork(config *networkConfiguration) error {
// Enable IPv6 Forwarding
{enableIPv6Forwarding, setupIPv6Forwarding},
// Setup Loopback Adresses Routing
{!d.config.EnableUserlandProxy, setupLoopbackAdressesRouting},
// Setup Loopback Addresses Routing
{!d.config.EnableUserlandProxy, setupLoopbackAddressesRouting},
// Setup IPTables.
{d.config.EnableIPTables, network.setupIPTables},

View file

@ -64,13 +64,13 @@ func setupGatewayIPv4(config *networkConfiguration, i *bridgeInterface) error {
return nil
}
func setupLoopbackAdressesRouting(config *networkConfiguration, i *bridgeInterface) error {
func setupLoopbackAddressesRouting(config *networkConfiguration, i *bridgeInterface) error {
sysPath := filepath.Join("/proc/sys/net/ipv4/conf", config.BridgeName, "route_localnet")
ipv4LoRoutingData, err := ioutil.ReadFile(sysPath)
if err != nil {
return fmt.Errorf("Cannot read IPv4 local routing setup: %v", err)
}
// Enable loopback adresses routing only if it isn't already enabled
// Enable loopback addresses routing only if it isn't already enabled
if ipv4LoRoutingData[0] != '1' {
if err := ioutil.WriteFile(sysPath, []byte{'1', '\n'}, 0644); err != nil {
return fmt.Errorf("Unable to enable local routing for hairpin mode: %v", err)