Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ACL entry netmask set with non-contiguous bits #1143

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions release/models/acl/openconfig-packet-match-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,28 @@ module openconfig-packet-match-types {
decimal notation, or using a type defined by the
ETHERTYPE identity";
}

typedef ipv4-prefix-mask-type {
type union {
type uint8 {
range 0..32;
}
type oc-inet:ipv4-address;
}
description
"The ipv4-prefix mask to be used in acl-entries. Can be in CIDR
formmat or wildcard bits.";
Pull-eckermann marked this conversation as resolved.
Show resolved Hide resolved
Pull-eckermann marked this conversation as resolved.
Show resolved Hide resolved
}

typedef ipv6-prefix-mask-type {
type union {
type uint8 {
range 0..128;
}
type oc-inet:ipv6-address;
}
description
"The ipv6-prefix mask to be used in acl-entries. Can be in CIDR
formmat or wildcard bits.";
Pull-eckermann marked this conversation as resolved.
Show resolved Hide resolved
}
}
40 changes: 32 additions & 8 deletions release/models/acl/openconfig-packet-match.yang
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,15 @@ module openconfig-packet-match {
for IPv4";

leaf source-address {
type oc-inet:ipv4-prefix;
type oc-inet:ipv4-address;
description
"Source IPv4 address prefix.";
"Source IPv4 address.";
}

leaf source-address-mask {
type oc-pkt-match-types:ipv4-prefix-mask-type;
description
"Source IPv4 address prefix mask.";
}

leaf source-address-prefix-set {
Expand All @@ -324,9 +330,15 @@ module openconfig-packet-match {
}

leaf destination-address {
type oc-inet:ipv4-prefix;
type oc-inet:ipv4-address;
Pull-eckermann marked this conversation as resolved.
Show resolved Hide resolved
description
"Destination IPv4 address.";
}

leaf destination-address-mask {
type oc-pkt-match-types:ipv4-prefix-mask-type;
description
"Destination IPv4 address prefix.";
"Destination IPv4 address prefix mask.";
}

leaf destination-address-prefix-set {
Expand Down Expand Up @@ -378,9 +390,15 @@ module openconfig-packet-match {
"Configuration data for IPv6 match fields";

leaf source-address {
type oc-inet:ipv6-prefix;
type oc-inet:ipv6-address;
description
"Source IPv6 address prefix.";
"Source IPv6 address.";
}

leaf source-address-mask {
type oc-pkt-match-types:ipv6-prefix-mask-type;
description
"Source IPv6 address prefix mask.";
}

leaf source-address-prefix-set {
Expand All @@ -400,9 +418,15 @@ module openconfig-packet-match {
}

leaf destination-address {
type oc-inet:ipv6-prefix;
type oc-inet:ipv6-address;
description
"Destination IPv6 address.";
}

leaf destination-address-mask {
type oc-pkt-match-types:ipv6-prefix-mask-type;
description
"Destination IPv6 address prefix.";
"Destination IPv6 address prefix mask.";
}

leaf destination-address-prefix-set {
Expand Down