Skip to content

Commit

Permalink
Make syncookie_mac() use 'tcp_seq irs' in computing hash.
Browse files Browse the repository at this point in the history
This fixes what seems like a simple oversight when the function was added in
r253210.

Reported by:            Daniel Borkmann <dborkman@redhat.com>
                        Florian Westphal <fw@strlen.de>
Differential Revision:  https://reviews.freebsd.org/D1628
Reviewed by:            gnn
MFC after:              1 month
Sponsored by:           Limelight Networks
  • Loading branch information
hirenp committed Jan 30, 2015
1 parent ad6ef9a commit 56ba0a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sys/netinet/tcp_syncache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,7 @@ syncookie_mac(struct in_conninfo *inc, tcp_seq irs, uint8_t flags,
}
SipHash_Update(&ctx, &inc->inc_fport, sizeof(inc->inc_fport));
SipHash_Update(&ctx, &inc->inc_lport, sizeof(inc->inc_lport));
SipHash_Update(&ctx, &irs, sizeof(irs));
SipHash_Update(&ctx, &flags, sizeof(flags));
SipHash_Update(&ctx, &secmod, sizeof(secmod));
SipHash_Final((u_int8_t *)&siphash, &ctx);
Expand Down

0 comments on commit 56ba0a6

Please sign in to comment.