Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72605
b: refs/heads/master
c: c7da57a
h: refs/heads/master
i:
  72603: e0f1a4e
v: v3
  • Loading branch information
David S. Miller committed Oct 26, 2007
1 parent f3772a5 commit 0283d8b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e0940d4bb9b19c0a45c844a83e1d25686aaf433
refs/heads/master: c7da57a183a255f53caa73b1f688a01b097fa5bc
5 changes: 5 additions & 0 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,9 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
bp->pad = 0;
bp->protocol = protocol;
bp->len = htons(tcplen);

sg_init_table(sg, 4);

sg_set_buf(&sg[block++], bp, sizeof(*bp));
nbytes += sizeof(*bp);

Expand All @@ -1080,6 +1083,8 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
sg_set_buf(&sg[block++], key->key, key->keylen);
nbytes += key->keylen;

sg_mark_end(sg, block);

/* Now store the Hash into the packet */
err = crypto_hash_init(desc);
if (err)
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
bp->len = htonl(tcplen);
bp->protocol = htonl(protocol);

sg_init_table(sg, 4);

sg_set_buf(&sg[block++], bp, sizeof(*bp));
nbytes += sizeof(*bp);

Expand All @@ -778,6 +780,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
sg_set_buf(&sg[block++], key->key, key->keylen);
nbytes += key->keylen;

sg_mark_end(sg, block);

/* Now store the hash into the packet */
err = crypto_hash_init(desc);
if (err) {
Expand Down

0 comments on commit 0283d8b

Please sign in to comment.