X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fmgmt.c;h=e6e7d4ef6ea7eb1458fcc93cb8aeb504f2f92e26;hb=f35409904bc4a0a695a4aecb2435933d8a8187fe;hp=45c3580243d39c721de193d02f2323677b3b7253;hpb=7e40e21d8fa139638240bf53b92fdf9843ce0b78;p=openvswitch diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index 45c35802..e6e7d4ef 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -526,20 +526,6 @@ send_config_update_ack(uint32_t xid, bool success) send_openflow_buffer(buffer); } -static void -send_ofmp_error_msg(uint32_t xid, uint16_t type, uint16_t code, - const void *data, size_t len) -{ - struct ofpbuf *buffer; - struct ofmp_error_msg *oem; - - oem = make_ofmp_xid(sizeof(*oem)+len, OFMPT_ERROR, xid, &buffer); - oem->type = htons(type); - oem->code = htons(code); - memcpy(oem->data, data, len); - send_openflow_buffer(buffer); -} - static void send_error_msg(uint32_t xid, uint16_t type, uint16_t code, const void *data, size_t len) @@ -654,6 +640,14 @@ recv_ofmp_config_update(uint32_t xid, const struct ofmp_header *ofmph, /* xxx cfg_lock can fail for other reasons, such as being * xxx locked... */ VLOG_WARN_RL(&rl, "config update failed due to bad cookie\n"); + + /* Check if our local view matches the controller, in which + * case, it is likely that there were local modifications + * without our being told to reread the config file. */ + if (!memcmp(cfg_cookie, ofmpcu->cookie, sizeof cfg_cookie)) { + VLOG_WARN_RL(&rl, "config appears to have been locally modified " + "without having told ovs-vswitchd to reload"); + } send_config_update_ack(xid, false); return 0; }