aboutsummaryrefslogtreecommitdiff
path: root/lib/flow.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2011-11-09 17:42:17 -0800
committerJustin Pettit <jpettit@nicira.com>2011-11-10 18:03:04 -0800
commit209c0b17d90b8062e5a3cbd80a083ea02e18d880 (patch)
tree2a843de9ebdc6733c4714e5c0c98edab0e6c672c /lib/flow.c
parenteadef313296eac5c2fa99bc1d7a32e514a7989bf (diff)
classifier: Don't check masks when adding IPv4/IPv6 addresses.
The meta-flow code enforces IPv4/IPv6 masks, so there's no reason to do it again in the classifier. This allows a number of functions to be removed, since the only callers were in this classifier code.
Diffstat (limited to 'lib/flow.c')
-rw-r--r--lib/flow.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/lib/flow.c b/lib/flow.c
index f928cbeb..08c76d96 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -764,66 +764,6 @@ flow_wildcards_has_extra(const struct flow_wildcards *a,
|| (a->vlan_tci_mask & b->vlan_tci_mask) != b->vlan_tci_mask);
}
-static bool
-set_nw_mask(ovs_be32 *maskp, ovs_be32 mask)
-{
- if (ip_is_cidr(mask)) {
- *maskp = mask;
- return true;
- } else {
- return false;
- }
-}
-
-/* Sets the IP (or ARP) source wildcard mask to CIDR 'mask' (consisting of N
- * high-order 1-bit and 32-N low-order 0-bits). Returns true if successful,
- * false if 'mask' is not a CIDR mask. */
-bool
-flow_wildcards_set_nw_src_mask(struct flow_wildcards *wc, ovs_be32 mask)
-{
- return set_nw_mask(&wc->nw_src_mask, mask);
-}
-
-/* Sets the IP (or ARP) destination wildcard mask to CIDR 'mask' (consisting of
- * N high-order 1-bit and 32-N low-order 0-bits). Returns true if successful,
- * false if 'mask' is not a CIDR mask. */
-bool
-flow_wildcards_set_nw_dst_mask(struct flow_wildcards *wc, ovs_be32 mask)
-{
- return set_nw_mask(&wc->nw_dst_mask, mask);
-}
-
-static bool
-set_ipv6_mask(struct in6_addr *maskp, const struct in6_addr *mask)
-{
- if (ipv6_is_cidr(mask)) {
- *maskp = *mask;
- return true;
- } else {
- return false;
- }
-}
-
-/* Sets the IPv6 source wildcard mask to CIDR 'mask' (consisting of N
- * high-order 1-bit and 128-N low-order 0-bits). Returns true if successful,
- * false if 'mask' is not a CIDR mask. */
-bool
-flow_wildcards_set_ipv6_src_mask(struct flow_wildcards *wc,
- const struct in6_addr *mask)
-{
- return set_ipv6_mask(&wc->ipv6_src_mask, mask);
-}
-
-/* Sets the IPv6 destination wildcard mask to CIDR 'mask' (consisting of
- * N high-order 1-bit and 128-N low-order 0-bits). Returns true if
- * successful, false if 'mask' is not a CIDR mask. */
-bool
-flow_wildcards_set_ipv6_dst_mask(struct flow_wildcards *wc,
- const struct in6_addr *mask)
-{
- return set_ipv6_mask(&wc->ipv6_dst_mask, mask);
-}
-
/* Sets the wildcard mask for register 'idx' in 'wc' to 'mask'.
* (A 0-bit indicates a wildcard bit.) */
void