/* What to do to an in_band_rule. */
enum in_band_op {
ADD, /* Add the rule to ofproto's flow table. */
- DELETE /* Delete the rule from ofproto's flow table. */
+ DEL /* Delete the rule from ofproto's flow table. */
};
/* A rule to add to or delete from ofproto's flow table. */
&next_hop_inaddr, &next_hop_dev);
if (retval) {
VLOG_WARN("cannot find route for controller ("IP_FMT"): %s",
- IP_ARGS(r->remote_addr.sin_addr.s_addr), strerror(retval));
+ IP_ARGS(r->remote_addr.sin_addr.s_addr),
+ ovs_strerror(retval));
return 1;
}
if (!next_hop_inaddr.s_addr) {
VLOG_WARN_RL(&rl, "cannot open netdev %s (next hop "
"to controller "IP_FMT"): %s",
next_hop_dev, IP_ARGS(r->remote_addr.sin_addr.s_addr),
- strerror(retval));
+ ovs_strerror(retval));
free(next_hop_dev);
return 1;
}
r->remote_mac);
if (retval) {
VLOG_DBG_RL(&rl, "cannot look up remote MAC address ("IP_FMT"): %s",
- IP_ARGS(next_hop_inaddr.s_addr), strerror(retval));
+ IP_ARGS(next_hop_inaddr.s_addr), ovs_strerror(retval));
}
/* If we don't have a MAC address, then refresh quickly, since we probably
/* Mark all the existing rules for deletion. (Afterward we will re-add any
* rules that are still valid.) */
HMAP_FOR_EACH (ib_rule, hmap_node, &ib->rules) {
- ib_rule->op = DELETE;
+ ib_rule->op = DEL;
}
if (ib->n_remotes && !eth_addr_is_zero(ib->local_mac)) {
switch (rule->op) {
case ADD:
ofproto_add_flow(ib->ofproto, &rule->match, rule->priority,
- ofpacts.data, ofpacts.size);
+ ofpbuf_data(&ofpacts), ofpbuf_size(&ofpacts));
break;
- case DELETE:
+ case DEL:
if (ofproto_delete_flow(ib->ofproto,
&rule->match, rule->priority)) {
/* ofproto doesn't have the rule anymore so there's no reason
error = netdev_open(local_name, "internal", &local_netdev);
if (error) {
VLOG_ERR("failed to initialize in-band control: cannot open "
- "datapath local port %s (%s)", local_name, strerror(error));
+ "datapath local port %s (%s)",
+ local_name, ovs_strerror(error));
return error;
}