Don't leak a maclabel when SYN segments are processed which results in an error due to MD5 signature handling.
Tweak the #idef MAC to allow additional upcoming changes.
This patch depends on D46701 to avoid double frees.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/netinet/tcp_syncache.c | ||
---|---|---|
1766 | You are right. But upcoming changes there will add two more statements in to block:
Both of these will not be protected by #if MAC. That is what I wanted to point out in the Summary by stating: "Tweak the #idef MAC to allow additional upcoming changes." |
sys/netinet/tcp_syncache.c | ||
---|---|---|
1766 | Removed. | |
1766 | I'm bundling moving the #ifdef MAC with fixing the maclabel leak. Please note that I'm changing the condition from sc == &scs to sc == NULL || sc == &scs. |
Initialize maclabel to NULL, which is not need right now, but avoids using an uninitialized variable in case someone adds a goto in the future before mac_syncache_init() is called. This was suggested by Mark.
sys/netinet/tcp_syncache.c | ||
---|---|---|
1375 | Done. Then we are on the safe side. |