projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovsdb: Fix ovsdb-server crash when specifying nonexistent file.
[openvswitch]
/
ofproto
/
pktbuf.c
diff --git
a/ofproto/pktbuf.c
b/ofproto/pktbuf.c
index 6baa78ea235e81a88e62a259cc98c281c8f55cfb..c103c7ffb0715f8478d4480de914406ffc0de472 100644
(file)
--- a/
ofproto/pktbuf.c
+++ b/
ofproto/pktbuf.c
@@
-63,7
+63,7
@@
pktbuf_capacity(void)
struct pktbuf *
pktbuf_create(void)
{
struct pktbuf *
pktbuf_create(void)
{
- return x
calloc(1,
sizeof *pktbuf_create());
+ return x
zalloc(
sizeof *pktbuf_create());
}
void
}
void
@@
-165,7
+165,7
@@
pktbuf_retrieve(struct pktbuf *pb, uint32_t id, struct ofpbuf **bufferp,
if (!pb) {
VLOG_WARN_RL(&rl, "attempt to send buffered packet via connection "
"without buffers");
if (!pb) {
VLOG_WARN_RL(&rl, "attempt to send buffered packet via connection "
"without buffers");
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_B
AD_COOKIE
);
+ return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_B
UFFER_UNKNOWN
);
}
p = &pb->packets[id & PKTBUF_MASK];
}
p = &pb->packets[id & PKTBUF_MASK];
@@
-183,10
+183,10
@@
pktbuf_retrieve(struct pktbuf *pb, uint32_t id, struct ofpbuf **bufferp,
error = ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BUFFER_EMPTY);
}
} else if (id >> PKTBUF_BITS != COOKIE_MAX) {
error = ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BUFFER_EMPTY);
}
} else if (id >> PKTBUF_BITS != COOKIE_MAX) {
- COVERAGE_INC(pktbuf_b
ad_cookie
);
+ COVERAGE_INC(pktbuf_b
uffer_unknown
);
VLOG_WARN_RL(&rl, "cookie mismatch: %08"PRIx32" != %08"PRIx32,
id, (id & PKTBUF_MASK) | (p->cookie << PKTBUF_BITS));
VLOG_WARN_RL(&rl, "cookie mismatch: %08"PRIx32" != %08"PRIx32,
id, (id & PKTBUF_MASK) | (p->cookie << PKTBUF_BITS));
- error = ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_B
AD_COOKIE
);
+ error = ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_B
UFFER_UNKNOWN
);
} else {
COVERAGE_INC(pktbuf_null_cookie);
VLOG_INFO_RL(&rl, "Received null cookie %08"PRIx32" (this is normal "
} else {
COVERAGE_INC(pktbuf_null_cookie);
VLOG_INFO_RL(&rl, "Received null cookie %08"PRIx32" (this is normal "