learn->idle_timeout = ntohs(nal->idle_timeout);
learn->hard_timeout = ntohs(nal->hard_timeout);
learn->priority = ntohs(nal->priority);
- learn->cookie = ntohll(nal->cookie);
+ learn->cookie = nal->cookie;
learn->table_id = nal->table_id;
learn->fin_idle_timeout = ntohs(nal->fin_idle_timeout);
learn->fin_hard_timeout = ntohs(nal->fin_hard_timeout);
nal->fin_idle_timeout = htons(learn->fin_idle_timeout);
nal->fin_hard_timeout = htons(learn->fin_hard_timeout);
nal->priority = htons(learn->priority);
- nal->cookie = htonll(learn->cookie);
+ nal->cookie = learn->cookie;
nal->flags = htons(learn->flags);
nal->table_id = learn->table_id;
fm->priority = learn->priority;
fm->cookie = htonll(0);
fm->cookie_mask = htonll(0);
- fm->new_cookie = htonll(learn->cookie);
+ fm->new_cookie = learn->cookie;
fm->modify_cookie = fm->new_cookie != OVS_BE64_MAX;
fm->table_id = learn->table_id;
fm->command = OFPFC_MODIFY_STRICT;
} else if (!strcmp(name, "fin_hard_timeout")) {
learn->fin_hard_timeout = atoi(value);
} else if (!strcmp(name, "cookie")) {
- learn->cookie = strtoull(value, NULL, 0);
+ learn->cookie = htonll(strtoull(value, NULL, 0));
} else if (!strcmp(name, "send_flow_rem")) {
learn->flags |= OFPFF_SEND_FLOW_REM;
} else {
ds_put_cstr(s, ",send_flow_rem");
}
if (learn->cookie != 0) {
- ds_put_format(s, ",cookie=%#"PRIx64, learn->cookie);
+ ds_put_format(s, ",cookie=%#"PRIx64, ntohll(learn->cookie));
}
for (spec = learn->specs; spec < &learn->specs[learn->n_specs]; spec++) {
uint16_t hard_timeout; /* Max time before discarding (seconds). */
uint16_t priority; /* Priority level of flow entry. */
uint8_t table_id; /* Table to insert flow entry. */
- uint64_t cookie; /* Cookie for new flow. */
+ ovs_be64 cookie; /* Cookie for new flow. */
enum ofputil_flow_mod_flags flags;
uint16_t fin_idle_timeout; /* Idle timeout after FIN, if nonzero. */
uint16_t fin_hard_timeout; /* Hard timeout after FIN, if nonzero. */