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

zebra: fix update nexthop-group fib flag value #16332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pguibert6WIND
Copy link
Member

A nexthop-group does not display the 'fib' flag
value of its nexthops.

nexthop-group A
nexthop 192.168.1.55 loop1
exit

observed:

ubuntu2204# show nexthop-group rib 181818168 json
{
"181818168":{
"type":"sharp",
"refCount":1,
"uptime":"00:00:17",
"vrf":"default",
"valid":true,
"installed":true,
"depends":[
528
],
"nexthops":[
{
"flags":3,
"fib":true,
"ip":"192.168.1.55",
"afi":"ipv4",
"interfaceIndex":3,
"interfaceName":"loop1",
"vrf":"default",
"active":true,
"weight":1
}
]
}
}

expected:

ubuntu2204# show nexthop-group rib 181818168 json
{
"181818168":{
"type":"sharp",
"refCount":1,
"uptime":"00:00:25",
"vrf":"default",
"valid":true,
"installed":true,
"depends":[
574
],
"nexthops":[
{
"flags":3,
"fib":true,
"ip":"192.168.1.55",
"afi":"ipv4",
"interfaceIndex":3,
"interfaceName":"loop1",
"vrf":"default",
"active":true,
"weight":1
}
]
}
}

Fix this by refreshing the fib flag value of its nexthops, when the dataplane result indicate the nexthop-group is installed.

@donaldsharp
Copy link
Member

the before and after output looks the same to me. Can you fix or better highlight what I am missing?

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

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

Need to understand what the actual problem is a bit better

continue;
if (CHECK_FLAG(nhop->flags, NEXTHOP_FLAG_RECURSIVE))
continue;
SET_FLAG(nhop->flags, NEXTHOP_FLAG_FIB);
Copy link
Member

Choose a reason for hiding this comment

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

I want this flag set after we receive the correct response from the kernel / dplane that it has been properly installed. This is not the correct place to make this change. I thought we already did this though, so I am a bit confused here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved at the place where zebra_nhg_handle_install() is called.

This is for nexthop-groups. I have some issues with duplicate flag.
(see #16028 )

@pguibert6WIND pguibert6WIND force-pushed the nexthop_group_update_fib_flag branch from 567c57b to 257b34a Compare July 2, 2024 16:28
@github-actions github-actions bot added size/XS and removed size/S labels Jul 2, 2024
@pguibert6WIND pguibert6WIND force-pushed the nexthop_group_update_fib_flag branch from 257b34a to 589e240 Compare July 2, 2024 19:18
@github-actions github-actions bot added size/S and removed size/XS labels Jul 2, 2024
@ton31337
Copy link
Member

ton31337 commented Jul 3, 2024

@Mergifyio backport dev/10.1

Copy link

mergify bot commented Jul 3, 2024

backport dev/10.1

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

@pguibert6WIND
Copy link
Member Author

@chiragshah6 , any feedback ?

pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 5, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

expected:

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Fix this by refreshing the fib flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

Link: FRRouting#16332

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 5, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

expected:

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Fix this by refreshing the fib flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

Link: FRRouting#16332

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 7, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

expected:

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Fix this by refreshing the fib flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

Link: FRRouting#16332

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
@pguibert6WIND pguibert6WIND force-pushed the nexthop_group_update_fib_flag branch 2 times, most recently from e1a9b08 to 731f74e Compare July 8, 2024 13:42
@github-actions github-actions bot added size/M and removed size/S labels Jul 8, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
@mergify mergify bot mentioned this pull request Jul 8, 2024
@pguibert6WIND pguibert6WIND force-pushed the nexthop_group_update_fib_flag branch from 731f74e to 21722d9 Compare July 8, 2024 13:44
@github-actions github-actions bot added size/S and removed size/M labels Jul 8, 2024
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 8, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 10, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Jul 11, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
@ton31337
Copy link
Member

@Mergifyio backport stable/10.1

Copy link

mergify bot commented Jul 27, 2024

backport stable/10.1

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Sep 9, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Sep 10, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Sep 10, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Sep 27, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Sep 30, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Oct 1, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
pguibert6WIND added a commit to pguibert6WIND/frr that referenced this pull request Oct 2, 2024
A nexthop-group does not display the 'fib' flag
value of its nexthops.

> nexthop-group A
>  nexthop 192.168.1.55 loop1
> exit

observed:

> ubuntu2204# show nexthop-group rib 181818168 json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:17",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       528
>     ],
>     "nexthops":[
>       {
>         "flags":1,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }

The FIB flag is used to inform the user that a given nexthop
is installed in the system, which is the case when using
iproute2:

> # ip nexthop show id 181818168
> id 181818168 group 15 proto 194
> # ip nexthop show id 15
> id 15 via 192.168.1.55 dev loop1 scope link proto 194

Fix this by refreshing the FIB flag value of its nexthops,
when the dataplane result indicate the nexthop-group is
installed.

> ubuntu2204# show nexthop-group rib 181818168  json
> {
>   "181818168":{
>     "type":"sharp",
>     "refCount":1,
>     "uptime":"00:00:25",
>     "vrf":"default",
>     "valid":true,
>     "installed":true,
>     "depends":[
>       574
>     ],
>     "nexthops":[
>       {
>         "flags":3,
>         "fib":true,
>         "ip":"192.168.1.55",
>         "afi":"ipv4",
>         "interfaceIndex":3,
>         "interfaceName":"loop1",
>         "vrf":"default",
>         "active":true,
>         "weight":1
>       }
>     ]
>   }
> }
>

Link: FRRouting#16332
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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.

3 participants