in_band_create() can fail if something goes wrong with the network device
that represents the local port. In that case update_in_band_remotes()
should not call in_band_set_remotes(), but it did anyway. This commit fixes
it.
Reported-by: Tom Everman <teverman@google.com>
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);