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

lib, zebra, pbrd, isisd, bgpd: fix static errors #17986

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
8 changes: 0 additions & 8 deletions bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3712,10 +3712,6 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
zlog_err("%pBP: Capability length error", peer);
bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE,
BGP_NOTIFY_SUBCODE_UNSPECIFIC);
/*
Copy link
Member

Choose a reason for hiding this comment

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

I originally left the pnt addition in because if we ever modified the code I wanted a reminder that the length pointer needed to be handled appropriately. Why are we removing this commented out code?

* If we did not return then
* pnt += length;
*/
return BGP_Stop;
}
action = *pnt;
Expand All @@ -3740,10 +3736,6 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
zlog_err("%pBP: Capability length error", peer);
bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE,
BGP_NOTIFY_SUBCODE_UNSPECIFIC);
/*
* If we did not return then
* pnt += length;
*/
return BGP_Stop;
}

Expand Down
2 changes: 2 additions & 0 deletions zebra/rib.h
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ DECLARE_HOOK(rib_shutdown, (struct route_node * rn), (rn));
*/
static inline struct nexthop_group *rib_get_fib_nhg(struct route_entry *re)
{
if (re == NULL)
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer that we figure out why a call to rib-get_fib_nhg is even possible with a null pointer instead of this fix

return NULL;
/* If the fib set is a subset of the active rib set,
* use the dedicated fib list.
*/
Expand Down