Preserve results when NLM_F_DUMP_INTR is set#1050
Conversation
conntrack_linux.go
Outdated
| return 0, err | ||
| } | ||
|
|
||
| errMsgs = append(errMsgs, err.Error()) |
There was a problem hiding this comment.
this allows us to at least do a best effort to try to clean the entries matching the filter
There was a problem hiding this comment.
Just occurred to me; err may be nil here? Should probably be inside the err != nil branch? Perhaps also a comment couldn't hurt?
if err != nil {
if !errors.Is(err, ErrDumpInterrupted) {
return 0, err
}
// This allows us to at least do a best effort to try to clean the
// entries matching the filter.
errMsgs = append(errMsgs, err.Error())
}|
LGTM ping @aboch |
conntrack_linux.go
Outdated
|
|
||
| // Protocol returns "tcp". | ||
| func (*ProtoInfoTCP) Protocol() string {return "tcp"} | ||
| func (*ProtoInfoTCP) Protocol() string { return "tcp" } | ||
| func (p *ProtoInfoTCP) toNlData() ([]*nl.RtAttr, error) { | ||
| ctProtoInfo := nl.NewRtAttr(unix.NLA_F_NESTED | nl.CTA_PROTOINFO, []byte{}) | ||
| ctProtoInfo := nl.NewRtAttr(unix.NLA_F_NESTED|nl.CTA_PROTOINFO, []byte{}) |
There was a problem hiding this comment.
Looks like some unrelated formatting changes made it in. It's a bit of a pain (my IDE also formats these on save), but better to handle those separate from this change;
- can you revert the formatting changes
- squash the commits? (second commit is fixing up the first one, and as the first one isn't merged yet, we may as well keep it as a single change).
I have a PR pending to fix formatting for the whole repo that's still pending; #1009
There was a problem hiding this comment.
Yeah, sorry. I should have checked that before pushing. I'll fix it now.
There was a problem hiding this comment.
No worries! It's a bit of a pain for sure!
I'm not a maintainer on this repository, but hope that "gofumpt" PR gets accepted and merged, as I find myself undoing formatting changes every time 😂
2742887 to
bfa83ee
Compare
Similar to vishvananda#1018, but for ConntrackDeleteFilters() Relates to kubernetes/kubernetes#129562
01177bd to
665565b
Compare
|
LGTM |
Similar to #1018, but for ConntrackDeleteFilters()
Relates to kubernetes/kubernetes#129562