From: Justin Pettit Date: Wed, 3 Jun 2009 20:44:46 +0000 (-0700) Subject: vswitch: Send NACK for bad cookie on update attempt. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=294792f2ebaed4bb42e7532b83742bf06b8b1c45;p=openvswitch vswitch: Send NACK for bad cookie on update attempt. When the controller sends an update to the switch through the management channel, a cookie is used to detect changes. If the controller's idea of the state of the config file differed from the switch's, the switch would send an error message. This commit changes to behavior to not send an error message, and instead send a negative acknowledgement for the request. --- diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index c6dd38d0..b981e5b2 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -498,11 +498,8 @@ recv_ofmp_config_update(uint32_t xid, const struct ofmp_header *ofmph) if (cfg_lock(ofmpcu->cookie, 0)) { /* xxx cfg_lock can fail for other reasons, such as being * xxx locked... */ - /* xxx This error message should probably send diff info. */ VLOG_WARN_RL(&rl, "config update failed due to bad cookie\n"); - //send_config_update_ack(xid, false); - send_ofmp_error_msg(xid, OFMPET_BAD_CONFIG, OFMPBCC_OLD_COOKIE, - ofmph, htons(ofmph->header.header.length)); + send_config_update_ack(xid, false); return 0; }