]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: allowas_in and aspath_loop_count only used in one if statement
authorDonald Sharp <sharpd@nvidia.com>
Wed, 30 Oct 2024 15:05:11 +0000 (11:05 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 31 Oct 2024 14:35:00 +0000 (10:35 -0400)
commit852e6c327dcaea1b73a5f703646edb5685dac204
treed810d31d4fc29efa6be1076754f5a79d0f76a645
parent35dbbacc3b7fb31f095a2382af3ef469f417dc19
bgpd: allowas_in and aspath_loop_count only used in one if statement

In bgp_update(), the two variables allowas_in and aspath_loop_count
are only used when peer->change_local_as is true.  Move the retrieval
of the allowas_in data to inside the if statement to save some
(very) small amount of time in bgp_update not gathering this
data unless the particular peer has this set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_route.c