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
48 changes: 48 additions & 0 deletions release/models/acl/openconfig-packet-match.yang
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,18 @@ module openconfig-packet-match {
"Source IPv4 address prefix.";
}

leaf masked-source-address {
type oc-inet:ipv4-address;
description
"Source IPv4 address used with a mask.";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend adding more detailed descriptions to these leafs, namely:

  1. indicate that masked-source-address and source-mask are always used together, but mutually exclusive with source-address
  2. indicate that source-address is the preferred method of configuring ACLs as suggested by @robshakir

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the last commit.

}

leaf destination-source-mask {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destination or source?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the last commit.

type oc-inet:ipv4-address;
description
"Source IPv4 address mask.";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify that this is a wildcard mask. Maybe even better to add wildcard to the name of the leaf.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the last commit.

}

leaf source-address-prefix-set {
type leafref {
path "/oc-sets:defined-sets/oc-sets:ipv4-prefix-sets"
Expand All @@ -329,6 +341,18 @@ module openconfig-packet-match {
"Destination IPv4 address prefix.";
}

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

leaf destination-address-mask {
type oc-inet:ipv4-address;
description
"Destination IPv4 address mask.";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify that this is a wildcard mask. Maybe even better to add wildcard to the name of the leaf.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the last commit.

}

leaf destination-address-prefix-set {
type leafref {
path "/oc-sets:defined-sets/oc-sets:ipv4-prefix-sets"
Expand Down Expand Up @@ -383,6 +407,18 @@ module openconfig-packet-match {
"Source IPv6 address prefix.";
}

leaf masked-source-address {
type oc-inet:ipv6-address;
description
"Source IPv6 address used with a mask.";
}

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

leaf source-address-prefix-set {
type leafref {
path "/oc-sets:defined-sets/oc-sets:ipv6-prefix-sets"
Expand All @@ -405,6 +441,18 @@ module openconfig-packet-match {
"Destination IPv6 address prefix.";
}

leaf masked-destination-address {
type oc-inet:ipv6-address;
description
"Destination IPv6 address used with a mask.";
}

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

leaf destination-address-prefix-set {
type leafref {
path "/oc-sets:defined-sets/oc-sets:ipv6-prefix-sets"
Expand Down
Loading