Skip to content

Port Fix from FRR community for issue https://github.com/FRRouting/frr/issues/18493 in sonic-frr(FRR 10.0.1)#22165

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
sudhanshukumar22:return_duplicate_prefix_list_entry_1
Apr 2, 2025
Merged

Port Fix from FRR community for issue https://github.com/FRRouting/frr/issues/18493 in sonic-frr(FRR 10.0.1)#22165
StormLiangMS merged 1 commit intosonic-net:masterfrom
sudhanshukumar22:return_duplicate_prefix_list_entry_1

Conversation

@sudhanshukumar22
Copy link
Contributor

Why I did it

The fix from FRR (FRRouting/frr#18493) is taken as a patch in sonic(FRR 10.0.1).

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sudhanshukumar22 sudhanshukumar22 force-pushed the return_duplicate_prefix_list_entry_1 branch from f8ef016 to d116122 Compare March 27, 2025 11:18
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sudhanshukumar22 sudhanshukumar22 marked this pull request as ready for review March 27, 2025 11:19
@sudhanshukumar22 sudhanshukumar22 changed the title Fixes https://github.com/FRRouting/frr/issues/18493 Port Fix from FRR community for issue https://github.com/FRRouting/frr/issues/18493 in sonic-frr(FRR 10.0.1) Mar 27, 2025
@StormLiangMS
Copy link
Contributor

hi @sudhanshukumar22, do you have this patch tested?

@sudhanshukumar22
Copy link
Contributor Author

Before the fix:
root@sonic:~# vtysh

Hello, this is FRRouting (version 10.0.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

2025/03/30 06:08:39 [YDG3W-JND95] FD Limit set: 1048576 is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to 100000
sonic# config t
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# do show running-config
Building configuration...

Current configuration:
!
frr version 10.0.1
frr defaults traditional
hostname sonic
log syslog informational
log facility local4
fpm address 127.0.0.1
no fpm use-next-hop-groups
agentx
no service integrated-vtysh-config
!
ip prefix-list PL_LoopbackV4 seq 5 permit 10.1.0.1/32
ip prefix-list PL_LoopbackV4 seq 10 permit 10.1.0.32/32
ip prefix-list PL_LoopbackV4 seq 15 permit 10.1.0.32/32
ip prefix-list PL_LoopbackV4 seq 20 permit 10.1.0.32/32
ip prefix-list PL_LoopbackV4 seq 25 permit 10.1.0.32/32
ip prefix-list DEFAULT_IPV4 seq 5 permit 0.0.0.0/0

After the fix:
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
sonic(config)# do show running-config
Building configuration...

Current configuration:
!
frr version 10.0.1
frr defaults traditional
hostname sonic
log syslog informational
log facility local4
zebra nexthop-group keep 1
fpm address 127.0.0.1
no fpm use-next-hop-groups
agentx
no service integrated-vtysh-config
!
ip prefix-list DEFAULT_IPV4 seq 5 permit 0.0.0.0/0
ip prefix-list PL_LoopbackV4 seq 5 permit 10.1.0.32/32
!
ipv6 prefix-list DEFAULT_IPV6 seq 5 permit ::/0
ipv6 prefix-list DEFAULT_IPV6 seq 10 permit ::/0
ipv6 prefix-list DEFAULT_IPV6 seq 15 permit ::/0

@kperumalbfn
Copy link
Contributor

@sudhanshukumar22 could you please double check for IPV6?

Date: Tue, 25 Mar 2025 13:54:24 +0200
Subject: [PATCH] lib: Return duplicate prefix-list entry

If we do e.g.:

ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32
ip prefix-list PL_LoopbackV4 permit 10.1.0.32/32

We end up, having duplicate records with a different sequence number only.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
@sudhanshukumar22 sudhanshukumar22 force-pushed the return_duplicate_prefix_list_entry_1 branch from d116122 to 51e70e8 Compare March 31, 2025 13:51
@sudhanshukumar22
Copy link
Contributor Author

sonic(config)#
sonic(config)# ipv6 prefix-list MY_DEFAULT_IPV6 permit ::/0
sonic(config)# ipv6 prefix-list MY_DEFAULT_IPV6 permit ::/0
sonic(config)# ipv6 prefix-list MY_DEFAULT_IPV6 permit ::/0
sonic(config)# ipv6 prefix-list MY_DEFAULT_IPV6 permit ::/0
sonic(config)# ipv6 prefix-list MY_DEFAULT_IPV6 permit ::/0
sonic(config)# do show running-config
Building configuration...

Current configuration:
!
frr version 10.0.1
frr defaults traditional
hostname sonic
log syslog informational
log facility local4
zebra nexthop-group keep 1
fpm address 127.0.0.1
no fpm use-next-hop-groups
agentx
no service integrated-vtysh-config
!
ip prefix-list DEFAULT_IPV4 seq 5 permit 0.0.0.0/0
ip prefix-list PL_LoopbackV4 seq 5 permit 10.1.0.1/32
!
ipv6 prefix-list DEFAULT_IPV6 seq 5 permit ::/0
ipv6 prefix-list MY_DEFAULT_IPV6 seq 5 permit ::/0
!

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS
Copy link
Contributor

Hi @sudhanshukumar22 could you check the conflict to 202411? I would suggest to file a separate PR to 202411 branch.

@kperumalbfn
Copy link
Contributor

Thanks @sudhanshukumar22 please create a separate PR for 202411

@sudhanshukumar22
Copy link
Contributor Author

Hi @sudhanshukumar22 could you check the conflict to 202411? I would suggest to file a separate PR to 202411 branch.

Hi @StormLiangMS : Could you provide me a link to the conflict ? I am not able to find it.

@sudhanshukumar22
Copy link
Contributor Author

Thanks @sudhanshukumar22 please create a separate PR for 202411

I have raised PR (#22198).

@StormLiangMS StormLiangMS merged commit 67b053d into sonic-net:master Apr 2, 2025
21 checks passed
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411:

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.

4 participants