-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
donaldsharp
wants to merge
9
commits into
FRRouting:master
Choose a base branch
from
donaldsharp:more_connection_cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
More connection cleanup #18195
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
61d59c9
to
6fe0eb3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.