Skip to content

[teamsyncd]: Add team_ifindex2ifname return value check#500

Merged
lguohan merged 1 commit intosonic-net:masterfrom
stcheng:ifname
May 10, 2018
Merged

[teamsyncd]: Add team_ifindex2ifname return value check#500
lguohan merged 1 commit intosonic-net:masterfrom
stcheng:ifname

Conversation

@stcheng
Copy link
Copy Markdown
Contributor

@stcheng stcheng commented May 10, 2018

Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG shuche@microsoft.com

/* Skip if interface is not found */
if (!team_ifindex2ifname(m_team, ifindex, ifname, MAX_IFNAME))
{
SWSS_LOG_INFO("Interface ifindex:%d is not found", ifindex);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

%u

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

team member interface ifindex(%u) cannot be found.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
@lguohan lguohan merged commit eef687e into sonic-net:master May 10, 2018
lguohan pushed a commit that referenced this pull request May 10, 2018
Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
@stcheng stcheng deleted the ifname branch May 11, 2018 04:21
yangbashuang pushed a commit to CentecNetworks/sonic-swss that referenced this pull request May 12, 2018
Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Signed-off-by: Wenda Ni <wenni@microsoft.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
…#500)

* Add support for port remove and port create

* Fix aspell dictionary

* Remove invalid comments

* fix merge issues
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
When run "make modules_prepare", it prompts an ask as below:
Microsoft Network Devices (NET_VENDOR_MICROSOFT) [Y/n/?] (NEW)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants