char *name;
/* Passing default value for creation of the rconn */
- rconn = rconn_create(ofservice->probe_interval, 0,
- ofservice->dscp, 0);
+ rconn = rconn_create(ofservice->probe_interval, 0, ofservice->dscp,
+ vconn_get_allowed_versions(vconn));
name = ofconn_make_name(mgr, vconn_get_name(vconn));
rconn_connect_unreliably(rconn, vconn, name);
free(name);
\f
/* OpenFlow configuration. */
-static void add_controller(struct connmgr *, const char *target, uint8_t dscp);
+static void add_controller(struct connmgr *, const char *target, uint8_t dscp,
+ uint32_t allowed_versions);
static struct ofconn *find_controller_by_target(struct connmgr *,
const char *target);
static void update_fail_open(struct connmgr *);
void
connmgr_set_controllers(struct connmgr *mgr,
const struct ofproto_controller *controllers,
- size_t n_controllers)
+ size_t n_controllers, uint32_t allowed_versions)
{
bool had_controllers = connmgr_has_controllers(mgr);
struct shash new_controllers;
if (!find_controller_by_target(mgr, c->target)) {
VLOG_INFO("%s: added primary controller \"%s\"",
mgr->name, c->target);
- add_controller(mgr, c->target, c->dscp);
+ add_controller(mgr, c->target, c->dscp, allowed_versions);
}
} else if (!pvconn_verify_name(c->target)) {
if (!ofservice_lookup(mgr, c->target)) {
VLOG_INFO("%s: added service controller \"%s\"",
mgr->name, c->target);
- ofservice_create(mgr, c->target, 0, c->dscp);
+ ofservice_create(mgr, c->target, allowed_versions, c->dscp);
}
} else {
VLOG_WARN_RL(&rl, "%s: unsupported controller \"%s\"",
/* Creates a new controller for 'target' in 'mgr'. update_controller() needs
* to be called later to finish the new ofconn's configuration. */
static void
-add_controller(struct connmgr *mgr, const char *target, uint8_t dscp)
+add_controller(struct connmgr *mgr, const char *target, uint8_t dscp,
+ uint32_t allowed_versions)
{
char *name = ofconn_make_name(mgr, target);
struct ofconn *ofconn;
- ofconn = ofconn_create(mgr, rconn_create(5, 8, dscp, 0),
+ ofconn = ofconn_create(mgr, rconn_create(5, 8, dscp, allowed_versions),
OFCONN_PRIMARY, true);
ofconn->pktbuf = pktbuf_create();
rconn_connect(ofconn->rconn, target, name);
uint64_t ofproto_get_datapath_id(const struct ofproto *);
void ofproto_set_datapath_id(struct ofproto *, uint64_t datapath_id);
void ofproto_set_controllers(struct ofproto *,
- const struct ofproto_controller *, size_t n);
+ const struct ofproto_controller *, size_t n,
+ uint32_t allowed_versions);
void ofproto_set_fail_mode(struct ofproto *, enum ofproto_fail_mode fail_mode);
void ofproto_reconnect_controllers(struct ofproto *);
void ofproto_set_extra_in_band_remotes(struct ofproto *,