ofproto: Fix treatment of out-of-band controllers.
authorBen Pfaff <blp@nicira.com>
Thu, 27 May 2010 16:34:23 +0000 (09:34 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 27 May 2010 16:34:23 +0000 (09:34 -0700)
This code was treated every controller as in-band, but obviously that's not
correct.

Reported-by: Jan Medved <jmedved@juniper.net>
ofproto/ofproto.c

index 069d5e5184630ef21c4aaca7a0c1af84ed3f476e..d8215a85d5bb83375a066559c85faa57fe280cb7 100644 (file)
@@ -546,6 +546,10 @@ update_in_band_remotes(struct ofproto *ofproto)
     HMAP_FOR_EACH (ofconn, struct ofconn, hmap_node, &ofproto->controllers) {
         struct sockaddr_in *sin = &addrs[n_addrs];
 
+        if (ofconn->band == OFPROTO_OUT_OF_BAND) {
+            continue;
+        }
+
         sin->sin_addr.s_addr = rconn_get_remote_ip(ofconn->rconn);
         if (sin->sin_addr.s_addr) {
             sin->sin_port = rconn_get_remote_port(ofconn->rconn);