X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=ofproto%2Fin-band.c;h=1a08fcc0a097c0dee10d4a5dfa8ba7d108dd8167;hb=67680b012be30d9c26eab999b83b08c6eb32dbd2;hp=0e4754cfd282b3e7cdeee5be2e29946567cacdb8;hpb=81a76618be9ea195a1e4a881ba9591728891d10b;p=sliver-openvswitch.git diff --git a/ofproto/in-band.c b/ofproto/in-band.c index 0e4754cfd..1a08fcc0a 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -120,7 +120,7 @@ refresh_remote(struct in_band *ib, struct in_band_remote *r) &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), strerror(retval)); + IP_ARGS(r->remote_addr.sin_addr.s_addr), strerror(retval)); return 1; } if (!next_hop_inaddr.s_addr) { @@ -137,7 +137,7 @@ refresh_remote(struct in_band *ib, struct in_band_remote *r) if (retval) { 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), + next_hop_dev, IP_ARGS(r->remote_addr.sin_addr.s_addr), strerror(retval)); free(next_hop_dev); return 1; @@ -150,7 +150,7 @@ refresh_remote(struct in_band *ib, struct in_band_remote *r) 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), strerror(retval)); } /* If we don't have a MAC address, then refresh quickly, since we probably @@ -256,7 +256,7 @@ in_band_msg_in_hook(struct in_band *in_band, const struct flow *flow, /* Returns true if the rule that would match 'flow' with 'actions' is * allowed to be set up in the datapath. */ bool -in_band_rule_check(const struct flow *flow, +in_band_rule_check(const struct flow *flow, uint32_t local_odp_port, const struct nlattr *actions, size_t actions_len) { /* Don't allow flows that would prevent DHCP replies from being seen @@ -270,7 +270,7 @@ in_band_rule_check(const struct flow *flow, NL_ATTR_FOR_EACH_UNSAFE (a, left, actions, actions_len) { if (nl_attr_type(a) == OVS_ACTION_ATTR_OUTPUT - && nl_attr_get_u32(a) == OVSP_LOCAL) { + && nl_attr_get_u32(a) == local_odp_port) { return true; } } @@ -464,7 +464,7 @@ in_band_create(struct ofproto *ofproto, const char *local_name, int error; *in_bandp = NULL; - error = netdev_open(local_name, "system", &local_netdev); + 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));