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

Tunnel UDP SRC PORT security #1455

Merged
merged 1 commit into from
Aug 11, 2022
Merged
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
2 changes: 1 addition & 1 deletion inc/saidebugcounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ typedef enum _sai_in_drop_reason_t
/**
* @brief Packet decapsulation failed
*
* e.g.: need to decap too many bytes, remaining packet is too short
* e.g.: need to decap too many bytes, remaining packet is too short, UDP port out of defined range
*/
SAI_IN_DROP_REASON_DECAP_ERROR,

Expand Down
14 changes: 14 additions & 0 deletions inc/saitunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,20 @@ typedef enum _sai_tunnel_attr_t
*/
SAI_TUNNEL_ATTR_DECAP_QOS_TC_TO_PRIORITY_GROUP_MAP,

/**
* @brief Drop tunnel packets with not allowed UDP source port
*
* Upon enabling this feature, if the tunnel packet ingresses with
* UDP source port outside of range defined for this tunnel, it
* will be dropped.
*
* @type bool
* @flags CREATE_AND_SET
* @default false
* @validonly SAI_TUNNEL_ATTR_TYPE == SAI_TUNNEL_TYPE_VXLAN and SAI_TUNNEL_ATTR_VXLAN_UDP_SPORT_MODE == SAI_TUNNEL_VXLAN_UDP_SPORT_MODE_USER_DEFINED
*/
SAI_TUNNEL_ATTR_VXLAN_UDP_SPORT_SECURITY,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add either a new drop reason or a comment to include this in the existing tunnel decap drop reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


/**
* @brief End of attributes
*/
Expand Down