Comment on top of the code says:
The MAC is computed over (faddr||laddr||fport||lport||irs||flags||secmod)
But syncookie_mac() doesn't use 'tcp_seq irs' in computing hash.
Differential D1628
syncookie_mac() ignores its 'tcp_seq irs' argument. hiren on Jan 24 2015, 1:54 AM. Authored by Tags None Referenced Files
Subscribers
Details
Comment on top of the code says: But syncookie_mac() doesn't use 'tcp_seq irs' in computing hash.
Diff Detail
Event TimelineComment Actions Nothing specific. I am not too familiar with the code but my reading suggests that this patch should not break anything. This patch is changing MAC value for syn cookie. Which in turn changes how we calculate hash in syncookie_generate() for iss (initial send sequence number) and compare it again when we get an ACK in syncookie_lookup(). It might be up for a debate that whether irs (initial receive sequence number) should be a part of MAC or not. I am just trying to fix the discrepancy in comments and corresponding code. Please correct me if needed. |