From 93519c04f9e7cba11a8cbc7706b4ba065306a496 Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Tue, 15 Dec 2009 06:13:52 -0800
Subject: [PATCH] Fixed control network/user datapath networks.

---
 mininet.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mininet.py b/mininet.py
index cc484d43..81470846 100755
--- a/mininet.py
+++ b/mininet.py
@@ -400,11 +400,9 @@ def nameGen( prefix ):
 # For the user datapath, we create an explicit control network.
 # Note: Instead of routing, we could bridge or use "in-band" control
    
-def configRoutedControlNetwork( controller, switches, 
-   ipGen=ipGen, ipStart=( 10, 123, 0, 1 ) ):
+def configureRoutedControlNetwork( controller, switches, ips):
    """Configure a routed control network on controller and switches,
       for use with the user datapath."""
-   ips = ipGen( ipStart )
    cip = ips.next()
    print controller.name, '<->',
    for switch in switches:
@@ -468,9 +466,11 @@ def __init__( self,
          exit( 1 )
       # Create network, but don't start things up yet!
       self.prepareNet()
-   def configureControlNetwork( self ):
+   def configureControlNetwork( self,
+      ipGen=ipGen, ipStart = (10, 0, 123, 1 ) ):
+      ips = apply( ipGen, ipStart )
       configureRoutedControlNetwork( self.controllers[ 0 ],
-         self.switches)
+         self.switches, ips = ips)
    def configHosts( self ):
       configHosts( self.hosts, self.hostIps )
    def prepareNet( self ):
-- 
GitLab