projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xenserverd: Give XAPI a grace period before refreshing network UUIDs.
[openvswitch]
/
lib
/
dhcp.c
diff --git
a/lib/dhcp.c
b/lib/dhcp.c
index f0c36442dca39da56eec1c688aaa3e29b4cbf302..e16176ba1bf32ee83059e6a6aa9e85df833e5aab 100644
(file)
--- a/
lib/dhcp.c
+++ b/
lib/dhcp.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008 Nicira Networks.
+ * Copyright (c) 2008
, 2010
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-497,7
+497,7
@@
dhcp_option_equals(const struct dhcp_option *a, const struct dhcp_option *b)
{
return ((a->data != NULL) == (b->data != NULL)
&& a->n == b->n
{
return ((a->data != NULL) == (b->data != NULL)
&& a->n == b->n
- &&
!memcmp(a->data, b->data, a->n
));
+ &&
(!a->data || !memcmp(a->data, b->data, a->n)
));
}
/* Replaces 'ds' by a string representation of 'msg'. If 'multiline' is
}
/* Replaces 'ds' by a string representation of 'msg'. If 'multiline' is
@@
-674,7
+674,7
@@
dhcp_parse(struct dhcp_msg *msg, const struct ofpbuf *b_)
msg->giaddr = dhcp->giaddr;
memcpy(msg->chaddr, dhcp->chaddr, ETH_ADDR_LEN);
msg->giaddr = dhcp->giaddr;
memcpy(msg->chaddr, dhcp->chaddr, ETH_ADDR_LEN);
- cookie = ofpbuf_try_pull(&b, sizeof cookie);
+ cookie = ofpbuf_try_pull(&b, sizeof
*
cookie);
if (cookie) {
if (ntohl(*cookie) == DHCP_OPTS_COOKIE) {
uint8_t overload;
if (cookie) {
if (ntohl(*cookie) == DHCP_OPTS_COOKIE) {
uint8_t overload;