Skip to content

Commit

Permalink
tcp: authopt: Compute packet signatures
Browse files Browse the repository at this point in the history
Computing tcp authopt packet signatures is a two step process:

* traffic key is computed based on tcp 4-tuple, initial sequence numbers
and the secret key.
* packet mac is computed based on traffic key and content of individual
packets.

The traffic key could be cached for established sockets but it is not.

A single code path exists for ipv4/ipv6 and input/output. This keeps the
code short but slightly slower due to lots of conditionals.

On output we read remote IP address from socket members on output, we
can't use skb network header because it's computed after TCP options.

On input we read remote IP address from skb network headers, we can't
use socket binding members because those are not available for SYN.

Signed-off-by: Leonard Crestez <cdleonard@gmail.com>
  • Loading branch information
cdleonard authored and intel-lab-lkp committed Aug 24, 2021
1 parent 5913479 commit 8666d84
Showing 1 changed file with 467 additions and 0 deletions.

0 comments on commit 8666d84

Please sign in to comment.