-
Notifications
You must be signed in to change notification settings - Fork 80
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
Tear down assocation on ABORT chunk #102
Conversation
@enobufs I am going to write a test to confirm this doesn't regress as well, but ran out of time tonight! |
@@ -1963,8 +1965,8 @@ func (a *Association) handleChunk(p *packet, c chunk) error { | |||
var err error | |||
|
|||
if _, err = c.check(); err != nil { | |||
return errors.Wrap(err, "failed validating chunk") | |||
// TODO: Create ABORT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find anything in the RFC, but it seems like we should tolerate anything from the other side (besides ABORT chunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some cases mentioned in RFC 4960 which require sending ABORT to close the association. (grep by should abort
or must abort
in the RFC).
Chunks that can return an error from check() in the current code are chunk_init.go and chunk_init_ack.go as far as I can tell.
We've been ignoring those errors so the logic hasn't be proven. I'd support your changes (just log and ignore) for now to reduce risk of regression. We could revisit this later, maybe when we finally support "sending ABORT".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ticketed! #103
Codecov Report
@@ Coverage Diff @@
## master #102 +/- ##
==========================================
+ Coverage 77.05% 78.62% +1.57%
==========================================
Files 43 43
Lines 2711 2723 +12
==========================================
+ Hits 2089 2141 +52
+ Misses 495 452 -43
- Partials 127 130 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your changes look good to me.
Properly tear down the association when we receive an ABORT chunk.
b9dfb3c
to
5bce07a
Compare
Add test to assert that sending an abort takes the assocation to closed.
5bce07a
to
9d296cd
Compare
@Sean-Der Just to be sure that it can handle multiple errorCauses, I have added a marshaling test. I think your changes look good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@enobufs thank you so much. I appreciate how much work you have put forward :) |
Properly tear down the association when we receive an ABORT
chunk.