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

More connection cleanup #18195

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

donaldsharp
Copy link
Member

See individual commits. But the gist of these commits is to further cleanup usages of the connection instead of the peer. Additionally clean up bgp_accept to have a better naming convention.

Currently the incoming and outgoing connections mix up their
logs and there is absolutely no way to tell which way is being
talked about when both are operating.

Signed-off-by: Donald Sharp <[email protected]>
The bgp_accept code calls the different connections
connection and connection1.  Frankly this is confusing
and hard to keep track of what we are talking about
since they are poorly named.  Let's start naming
these variables things that make logical sense.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
In bgp_accept, the newly created doppelganger is
accepting a connection and setting it up to work
properly.  For this incoming connection let's call
it incoming as well.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
bgp_accept looks up the peer data structure.  The found
one represents the peer data structure that is created
when configuration is created.  This connection is being
called connection1.  Let's rename this to connection
to reduce some confusion.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
The dynamic peer being created is being called peer1
let's call it dynamic_peer instead.  This will make
what is being done clearer for future developers.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
Currently the code in bgp_accept is calling the
doppelganger `peer`.  This is confusing with
peer and peer1.  Let's just call it doppelganger.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
The bgp_accept function was calling the existing
peer data structure peer1 for some reason.  Let's
just call it peer instead of peer1.

Author's Note:  I am changing the bgp_accept function
in this manner because I find it incredibly confusing
remembering what is what direction and all my other
attempts at getting this straight has caused real
problems.  So I am resorting to doing really small
transformational changes at a time.

Signed-off-by: Donald Sharp <[email protected]>
The peer is going to eventually have a incoming and
outgoing connection.  Let's send the data based
upon the connection not the peer.

Signed-off-by: Donald Sharp <[email protected]>
Again instead of making the keepalives be peer based
use the connection to make it happen.

Signed-off-by: Donald Sharp <[email protected]>
@donaldsharp donaldsharp force-pushed the more_connection_cleanup branch from 61d59c9 to 6fe0eb3 Compare February 19, 2025 11:26
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.

1 participant