X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=7cca951b40fcb14289b2d421507acbe777cefa2d;hb=87103e1fccd88e0fc8a64d774ddb620deeb90678;hp=1010948357e1c763f23eb3f0a83fd9998f272782;hpb=7cf8b2660f9813fe080a3f4fcc975099cb36417a;p=openvswitch diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 10109483..7cca951b 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -19,6 +19,7 @@ #include "ofproto.h" #include #include +#include #include #include #include @@ -545,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); @@ -568,7 +573,9 @@ update_in_band_remotes(struct ofproto *ofproto) in_band_create(ofproto, ofproto->dpif, ofproto->switch_status, &ofproto->in_band); } - in_band_set_remotes(ofproto->in_band, addrs, n_addrs); + if (ofproto->in_band) { + in_band_set_remotes(ofproto->in_band, addrs, n_addrs); + } ofproto->next_in_band_update = time_msec() + 1000; } else { in_band_destroy(ofproto->in_band);