X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=260f5d76abd81055c2a56573a0980b5effd6e8d1;hb=ca069229880ba47ba100b62ed34c0c226355b0c6;hp=8ace3ba23fa339a0ab81511abb312ce468c19703;hpb=67a4917b07031b387beafaedce413b4207214059;p=openvswitch diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 8ace3ba2..260f5d76 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -113,7 +113,7 @@ lswitch_create(struct rconn *rconn, bool learn_macs, struct lswitch *sw; size_t i; - sw = xcalloc(1, sizeof *sw); + sw = xzalloc(sizeof *sw); sw->max_idle = max_idle; sw->datapath_id = 0; sw->last_features_request = time_now() - 1; @@ -283,8 +283,8 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn, process_stats_reply }, { - OFPT_FLOW_EXPIRED, - sizeof(struct ofp_flow_expired), + OFPT_FLOW_REMOVED, + sizeof(struct ofp_flow_removed), NULL }, }; @@ -337,7 +337,6 @@ send_features_request(struct lswitch *sw, struct rconn *rconn) /* Send OFPT_SET_CONFIG. */ osc = make_openflow(sizeof *osc, OFPT_SET_CONFIG, &b); - osc->flags = htons(OFPC_SEND_FLOW_EXP); osc->miss_send_len = htons(OFP_DEFAULT_MISS_SEND_LEN); queue_tx(sw, rconn, b);