git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag sliver-openvswitch-1.10.90-3
[sliver-openvswitch.git]
/
lib
/
learn.c
diff --git
a/lib/learn.c
b/lib/learn.c
index
606ea9e
..
0cc562d
100644
(file)
--- a/
lib/learn.c
+++ b/
lib/learn.c
@@
-355,9
+355,9
@@
learn_execute(const struct ofpact_learn *learn, const struct flow *flow,
case NX_LEARN_DST_OUTPUT:
if (spec->n_bits <= 16
|| is_all_zeros(value.u8, sizeof value - 2)) {
case NX_LEARN_DST_OUTPUT:
if (spec->n_bits <= 16
|| is_all_zeros(value.u8, sizeof value - 2)) {
-
uint16_t port = ntohs(value.be16[7]
);
+
ofp_port_t port = u16_to_ofp(ntohs(value.be16[7])
);
- if (
port < OFPP_MAX
+ if (
ofp_to_u16(port) < ofp_to_u16(OFPP_MAX)
|| port == OFPP_IN_PORT
|| port == OFPP_FLOOD
|| port == OFPP_LOCAL
|| port == OFPP_IN_PORT
|| port == OFPP_FLOOD
|| port == OFPP_LOCAL