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
ofproto: Fix potential leak during flow mods.
[sliver-openvswitch.git]
/
lib
/
dpif-netdev.h
diff --git
a/lib/dpif-netdev.h
b/lib/dpif-netdev.h
index
4096785
..
af4a969
100644
(file)
--- a/
lib/dpif-netdev.h
+++ b/
lib/dpif-netdev.h
@@
-34,8
+34,8
@@
enum { DP_NETDEV_HEADROOM = 2 + VLAN_HEADER_LEN };
static inline void dp_packet_pad(struct ofpbuf *b)
{
static inline void dp_packet_pad(struct ofpbuf *b)
{
- if (
b->size
< ETH_TOTAL_MIN) {
- ofpbuf_put_zeros(b, ETH_TOTAL_MIN -
b->size
);
+ if (
ofpbuf_size(b)
< ETH_TOTAL_MIN) {
+ ofpbuf_put_zeros(b, ETH_TOTAL_MIN -
ofpbuf_size(b)
);
}
}
}
}