Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
19 changes: 19 additions & 0 deletions regexp-tests/openconfig-packet-match-types-test.yang
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,23 @@ module openconfig-packet-match-types-test {
pt:pattern-test-fail "66999..67890";
pt:pattern-test-fail "70000..70000";
}

leaf fragment-offset-range {
type oc-pkt-match-types:fragment-offset-range;
pt:pattern-test-pass "0..0";
pt:pattern-test-pass "0..8191";
pt:pattern-test-pass "8191..8191";
pt:pattern-test-pass "100..200";
pt:pattern-test-pass "00..00";
pt:pattern-test-pass "0000..0000";
pt:pattern-test-pass "1234..5678";
pt:pattern-test-pass "7999..8191";
pt:pattern-test-fail "100.200";
pt:pattern-test-fail "0.8191";
pt:pattern-test-fail "0..8192";
pt:pattern-test-fail "8192..8192";
pt:pattern-test-fail "9999..9999";
pt:pattern-test-fail "10000..10000";
pt:pattern-test-fail "-1..10";
}
}
4 changes: 2 additions & 2 deletions release/models/acl/openconfig-packet-match-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ module openconfig-packet-match-types {
type string {
pattern
'(0{0,3}[0-9]|0{0,2}[1-9][0-9]|0?[1-9][0-9]{2}|[1-7][0-9]{3}|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1])\\.\\.(0{0,3}[0-9]|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1])\.\.(0{0,3}[0-9]|'
+ '0{0,2}[1-9][0-9]|0?[1-9][0-9]{2}|[1-7][0-9]{3}|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1])';
oc-ext:posix-pattern
'^((0{0,3}[0-9]|0{0,2}[1-9][0-9]|0?[1-9][0-9]{2}|[1-7][0-9]{3}|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1])\\.\\.(0{0,3}[0-9]|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1])\.\.(0{0,3}[0-9]|'
+ '0{0,2}[1-9][0-9]|0?[1-9][0-9]{2}|[1-7][0-9]{3}|'
+ '80[0-9]{2}|81[0-8][0-9]|819[0-1]))$';
}
Comment thread
charanjith-anet marked this conversation as resolved.
Expand Down
Loading