Skip to content

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#328

Merged
mssonicbld merged 2 commits into
Azure:202603from
mssonicbld:sonicbld/202603-merge
May 14, 2026
Merged

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#328
mssonicbld merged 2 commits into
Azure:202603from
mssonicbld:sonicbld/202603-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* 3136803b - (origin/202511) [acl-loader] Include `IP_TYPE=IP` in `IP_PROTOCOL` rules (#4540) (2026-05-14) [mssonicbld]<br>```

mssonicbld and others added 2 commits May 14, 2026 03:13
If we don't include IP_TYPE as a qualifier in the IP_PROTOCOL rules then we might end up matching non-IP packets with matching values in the IP_PROTOCOL offset (10-bytes after ETH header).

Fixes: sonic-net/sonic-mgmt#23960

#### What I did
In acl-loader include `IP_TYPE=IP` qualifier on any rules that use `IP_PROTOCOL` as a qualifier.

#### How I did it
Modify the openconfig->db_schema function `convert_ip` to add `IP_TYPE=IP` if the rule being converted has `IP_PROTOCOL` in it.

#### How to verify it
I configured an ACL with an IP_PROTOCOL qualifying rule and saw that the `IP_TYPE=IP` was added to it (See RULE_7):
```
> acl-loader update full /etc/sonic/acl-erspan.json --table_name EVERFLOW --session_name test_session_1

> show acl rule
Table Rule Priority Action Match Status
-------- ------- ---------- ------------------------------ ---------------------------- --------
EVERFLOW RULE_1 9999 MIRROR INGRESS: test_session_1 SRC_IP: 20.0.0.10/32 Active
EVERFLOW RULE_2 9998 MIRROR INGRESS: test_session_1 DST_IP: 30.0.0.10/32 Active
EVERFLOW RULE_3 9997 MIRROR INGRESS: test_session_1 DST_IP: 192.168.0.2/32 Active
EVERFLOW RULE_4 9996 MIRROR INGRESS: test_session_1 L4_SRC_PORT: 4661 Active
EVERFLOW RULE_5 9995 MIRROR INGRESS: test_session_1 L4_DST_PORT: 4661 Active
EVERFLOW RULE_6 9994 MIRROR INGRESS: test_session_1 ETHER_TYPE: 4660 Active
EVERFLOW RULE_7 9993 MIRROR INGRESS: test_session_1 IP_PROTOCOL: 126 Active
 IP_TYPE: IP
EVERFLOW RULE_8 9992 MIRROR INGRESS: test_session_1 L4_SRC_PORT_RANGE: 4672-4681 Active
EVERFLOW RULE_9 9991 MIRROR INGRESS: test_session_1 L4_DST_PORT_RANGE: 4672-4681 Active
EVERFLOW RULE_10 9990 MIRROR INGRESS: test_session_1 DSCP: 51 Active
```

I also reran `test_everflow_fwd_recircle_port_queue_check` on a system that always failed due to packets matching RULE_7 and now the test passes.

#### Previous command output (if the output of a command-line utility has changed)
No change

#### New command output (if the output of a command-line utility has changed)
No change

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld mssonicbld merged commit 1ae0209 into Azure:202603 May 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant