git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0226bbc
)
Use proper byte order for dl_type of 802.2, non-SNAP frames.
author
Ben Pfaff
<blp@nicira.com>
Thu, 14 Aug 2008 18:05:50 +0000
(11:05 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 14 Aug 2008 18:06:18 +0000
(11:06 -0700)
datapath/flow.c
patch
|
blob
|
history
lib/flow.c
patch
|
blob
|
history
diff --git
a/datapath/flow.c
b/datapath/flow.c
index
36316a9
..
afd91bf
100644
(file)
--- a/
datapath/flow.c
+++ b/
datapath/flow.c
@@
-256,7
+256,7
@@
int flow_extract(struct sk_buff *skb, uint16_t in_port,
if (snap_get_ethertype(skb, &key->dl_type) != -EINVAL) {
nh_ofs += sizeof(struct snap_hdr);
} else {
- key->dl_type =
OFP_DL_TYPE_NOT_ETH_TYPE
;
+ key->dl_type =
htons(OFP_DL_TYPE_NOT_ETH_TYPE)
;
nh_ofs += sizeof(struct llc_pdu_un);
}
}
diff --git
a/lib/flow.c
b/lib/flow.c
index
f534f57
..
5eea06b
100644
(file)
--- a/
lib/flow.c
+++ b/
lib/flow.c
@@
-133,7
+133,7
@@
flow_extract(struct buffer *packet, uint16_t in_port, struct flow *flow)
flow->dl_type = h->snap.snap_type;
buffer_pull(&b, sizeof *h);
} else {
- flow->dl_type =
OFP_DL_TYPE_NOT_ETH_TYPE
;
+ flow->dl_type =
htons(OFP_DL_TYPE_NOT_ETH_TYPE)
;
buffer_pull(&b, sizeof(struct llc_header));
}
}