Browse code

network: fix a typo in udp cleanup path

Fix #3224 - Port already in use error when running a container

Signed-off-by: Tzu-Jung Lee <roylee17@gmail.com>

Tzu-Jung Lee authored on 2013/12/21 10:30:21
Showing 1 changed files
... ...
@@ -628,7 +628,7 @@ func (iface *NetworkInterface) Release() {
628 628
 				log.Printf("Unable to release port %s", nat)
629 629
 			}
630 630
 		} else if nat.Port.Proto() == "udp" {
631
-			if err := iface.manager.tcpPortAllocator.Release(ip, hostPort); err != nil {
631
+			if err := iface.manager.udpPortAllocator.Release(ip, hostPort); err != nil {
632 632
 				log.Printf("Unable to release port %s: %s", nat, err)
633 633
 			}
634 634
 		}