projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto: Finalize all ofoperations in a given ofgroup at the same time.
[openvswitch]
/
lib
/
packets.c
diff --git
a/lib/packets.c
b/lib/packets.c
index 833074cc5fc863f582929a88916d1de453c79be0..57291674ac5db6ce38d6bb0379e93dc2560f994c 100644
(file)
--- a/
lib/packets.c
+++ b/
lib/packets.c
@@
-350,7
+350,10
@@
ipv6_create_mask(int mask)
/* Given the IPv6 netmask 'netmask', returns the number of bits of the IPv6
* address that it specifies, that is, the number of 1-bits in 'netmask'.
/* Given the IPv6 netmask 'netmask', returns the number of bits of the IPv6
* address that it specifies, that is, the number of 1-bits in 'netmask'.
- * 'netmask' must be a CIDR netmask (see ipv6_is_cidr()). */
+ * 'netmask' must be a CIDR netmask (see ipv6_is_cidr()).
+ *
+ * If 'netmask' is not a CIDR netmask (see ipv6_is_cidr()), the return value
+ * will still be in the valid range but isn't otherwise meaningful. */
int
ipv6_count_cidr_bits(const struct in6_addr *netmask)
{
int
ipv6_count_cidr_bits(const struct in6_addr *netmask)
{
@@
-358,8
+361,6
@@
ipv6_count_cidr_bits(const struct in6_addr *netmask)
int count = 0;
const uint8_t *netmaskp = &netmask->s6_addr[0];
int count = 0;
const uint8_t *netmaskp = &netmask->s6_addr[0];
- assert(ipv6_is_cidr(netmask));
-
for (i=0; i<16; i++) {
if (netmaskp[i] == 0xff) {
count += 8;
for (i=0; i<16; i++) {
if (netmaskp[i] == 0xff) {
count += 8;