diff --git a/pkg/server/ipmgr_linux.go b/pkg/server/ipmgr_linux.go index 940a00e..9feb677 100644 --- a/pkg/server/ipmgr_linux.go +++ b/pkg/server/ipmgr_linux.go @@ -57,6 +57,7 @@ func (svc *Server) IdxFromIP(ip net.IP) int { return int(ipInt - ipStartInt) } +// TODO(shawnlu): Implement it with hash map, username as input to count hash func (svc *Server) PopIPFromPool() (net.IP, error) { for idx := 0; idx < svc.IPCount; idx++ { if svc.IPIdxInPool(idx) { diff --git a/scripts/setup_dev_env.sh b/scripts/setup_dev_env.sh index ee2dec5..ac45b9c 100755 --- a/scripts/setup_dev_env.sh +++ b/scripts/setup_dev_env.sh @@ -1,5 +1,5 @@ ip l add br-test type bridge -ip a add 10.66.0.254/24 dev br-test +ip a add 10.67.0.254/24 dev br-test ip l set br-test up ip netns add c1 @@ -8,7 +8,7 @@ ip l add hTc1 type veth peer name c1Th ip l set hTc1 master br-test ip l set hTc1 up ip l set c1Th netns c1 -ip netns exec c1 ip a add 10.66.0.1/24 dev c1Th +ip netns exec c1 ip a add 10.67.0.1/24 dev c1Th ip netns exec c1 ip l set c1Th up ip netns add c2 @@ -17,7 +17,7 @@ ip l add hTc2 type veth peer name c2Th ip l set hTc2 master br-test ip l set hTc2 up ip l set c2Th netns c2 -ip netns exec c2 ip a add 10.66.0.2/24 dev c2Th +ip netns exec c2 ip a add 10.67.0.2/24 dev c2Th ip netns exec c2 ip l set c2Th up ip netns add n1