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

[staticroutebfd] use lowercase IPv6 address as cache key when nexthop IPv6 address is uppercase in the config_db #15764

Closed
baorliu opened this issue Jul 8, 2023 · 0 comments · Fixed by #15765

Comments

@baorliu
Copy link
Contributor

baorliu commented Jul 8, 2023

Description

when IPv6 address with uppercase letter (A-F) in the static route nexthop list, staticroutebfd does not covert it to lowercase before using it as a key in local cache.
Because the BFD session key in the redis STATE_DB is lowercase, so when staticroutebfd get a state update event from BFD state table, it cannot find it in local cache because of different letter case.
need to convert the IPv6 address to lowercase before create BFD session and using it as a cache key

Steps to reproduce the issue:

  1. static route configuration
        "2603:10e2:400::4/128": {
            "advertise": "false",
            "bfd": "true",
            "ifname": "PortChannel06,PortChannel05,PortChannel02,PortChannel01",
            "nexthop": "2603:10E2:400:6::2,2603:10E2:400:5::2,2603:10E2:400:2::2,2603:10E2:400:1::2"
        },
  1. make bfd session up by creating BFD session in the peer system
  2. show ipv6 route static

Describe the results you received:

static route for 603:10e2:400::4/128 is not installed

Describe the results you expected:

static route for 603:10e2:400::4/128 to be installed

Output of show version:

SONiC Software Version: SONiC.azure_cisco_msft_202205.0-dirty-20230615.161325
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: 6b5301c99
Build date: Thu Jun 15 23:24:29 UTC 2023

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

prsunny pushed a commit that referenced this issue Jul 10, 2023
*use lower case for IPv6 address as internal key and bfd session key. fixes #15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this issue Sep 20, 2023
*use lower case for IPv6 address as internal key and bfd session key. fixes sonic-net#15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this issue Feb 1, 2024
*use lower case for IPv6 address as internal key and bfd session key. fixes sonic-net#15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
mssonicbld pushed a commit that referenced this issue Feb 3, 2024
*use lower case for IPv6 address as internal key and bfd session key. fixes #15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant