X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=97aaf9fe50c576270d9a32c905f77734c6cfd9fb;hb=1c2e2d2fc87c9435b6fe33112b0ddaab59f507c5;hp=5fa3a53b0249e2447850a420e2d91a03fb3a259f;hpb=db8077c315f12fd523ace965cc22778ed8d5939a;p=openvswitch diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 5fa3a53b..97aaf9fe 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -326,12 +326,12 @@ lswitch_choose_destination(struct lswitch *sw, const struct flow *flow) /* Learn the source MAC. */ if (mac_learning_may_learn(sw->ml, flow->dl_src, 0)) { struct mac_entry *mac = mac_learning_insert(sw->ml, flow->dl_src, 0); - if (mac_entry_is_new(mac) || mac->port != flow->in_port) { + if (mac_entry_is_new(mac) || mac->port.i != flow->in_port) { VLOG_DBG_RL(&rl, "%016llx: learned that "ETH_ADDR_FMT" is on " "port %"PRIu16, sw->datapath_id, ETH_ADDR_ARGS(flow->dl_src), flow->in_port); - mac->port = flow->in_port; + mac->port.i = flow->in_port; mac_learning_changed(sw->ml, mac); } } @@ -347,7 +347,7 @@ lswitch_choose_destination(struct lswitch *sw, const struct flow *flow) mac = mac_learning_lookup(sw->ml, flow->dl_dst, 0, NULL); if (mac) { - out_port = mac->port; + out_port = mac->port.i; if (out_port == flow->in_port) { /* Don't send a packet back out its input port. */ return OFPP_NONE;