Provide broadcast IP while configuring interface ip address#1007
Merged
lguohan merged 2 commits intosonic-net:masterfrom Aug 3, 2019
Merged
Provide broadcast IP while configuring interface ip address#1007lguohan merged 2 commits intosonic-net:masterfrom
lguohan merged 2 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Vasant Patil <[email protected]>
prsunny
reviewed
Jul 31, 2019
cfgmgr/intfmgr.cpp
Outdated
|
|
||
| string alias(keys[0]); | ||
| IpPrefix ip_prefix(keys[1]); | ||
| IpPrefix ipPrefix(keys[1]); |
Collaborator
There was a problem hiding this comment.
I think this change is irrelevant. If no specific reason, keep the original convention. I mean, is_lo and other params are not following this style.
Contributor
Author
There was a problem hiding this comment.
Hi Sunny,
I thought so as well, but I do see couple of variables in this function in camelCase(appKey, fvVector). Is there any coding standard guidelines? Now, I can change those two variables as app_key and fv_vector or change is_lo to isLo. Please suggest and point me to a coding standard guidelines doc if we have one.
Contributor
Author
There was a problem hiding this comment.
For now, I just reverted my changes for ip_prefix varibale.
prsunny
approved these changes
Aug 1, 2019
Contributor
|
retest this please |
1 similar comment
Contributor
|
retest this please |
praveen-li
pushed a commit
to praveen-li/sonic-swss
that referenced
this pull request
Aug 24, 2020
…t#1007) RB=1741922 G=lnos-reviewers R=pchaudhary,pmao,rmolina,samaity,sfardeen,zxu A= Problem: When SONiC CLI command is used to display summary of interface(s), broadcast address is always 0.0.0.0 irrespective of prefix length Solution: When interface ip address is added using the command "ip addr add ...", we can specify the broadcast address as well. I did NOT set broadcast addr for interface with point-to-point link addresses(/31, and /127) Signed-off-by: Vasant Patil [email protected]
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-swss
that referenced
this pull request
Mar 1, 2023
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…t#1007) Problem: When SONiC CLI command is used to display summary of interface(s), broadcast address is always 0.0.0.0 irrespective of prefix length Solution: When interface ip address is added using the command "ip addr add ...", we can specify the broadcast address as well. I did NOT set broadcast addr for interface with point-to-point link addresses(/31, and /127) Signed-off-by: Vasant Patil [email protected]
jianyuewu
pushed a commit
to jianyuewu/sonic-swss
that referenced
this pull request
Dec 24, 2025
Becuase we see error message "This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see actions/runner-images#11101".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Vasant Patil [email protected]
Problem: When SONiC CLI command is used to display summary of interface(s), broadcast address is always 0.0.0.0 irrespective of prefix length
Solution: When interface ip address is added using the command "ip addr add ...", we can specify the broadcast address as well. I did NOT set broadcast addr for interface with point-to-point link addresses(/31, and /127)
Testing:
admin@lnos-x1-a-csw06:~$ show interfaces summary Vlan100
Vlan100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.1.0 netmask 255.255.255.0 broadcast 10.1.1.255
inet6 fe80::2e0:ecff:fe3b:d72f prefixlen 64 scopeid 0x20
ether 00:e0:ec:3b:d7:2f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5 bytes 650 (650.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
admin@lnos-x1-a-csw06:~$
vapatil@server05:~$
=========== Interface with /31 prefix legth ================
admin@lnos-x1-a-csw06:~$ show interface summary Ethernet124
Ethernet124: flags=4099<UP,BROADCAST,MULTICAST> mtu 9100
inet 10.0.0.62 netmask 255.255.255.254 broadcast 0.0.0.0
ether 00:e0:ec:3b:d7:2f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
=========== Interface with /24 prefix legth ================
admin@lnos-x1-a-csw06:~$ show interface summary Vlan100
Vlan100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.1.0 netmask 255.255.255.0 broadcast 10.1.1.255
inet6 fe80::2e0:ecff:fe3b:d72f prefixlen 64 scopeid 0x20
ether 00:e0:ec:3b:d7:2f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 768 (768.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
admin@lnos-x1-a-csw06:~$
What I did
Why I did it
How I verified it
Details if related