diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 737b755342bd..32dc329762e9 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -757,6 +757,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
757 | bp->len = htonl(tcplen); | 757 | bp->len = htonl(tcplen); |
758 | bp->protocol = htonl(protocol); | 758 | bp->protocol = htonl(protocol); |
759 | 759 | ||
760 | sg_init_table(sg, 4); | ||
761 | |||
760 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); | 762 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); |
761 | nbytes += sizeof(*bp); | 763 | nbytes += sizeof(*bp); |
762 | 764 | ||
@@ -778,6 +780,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
778 | sg_set_buf(&sg[block++], key->key, key->keylen); | 780 | sg_set_buf(&sg[block++], key->key, key->keylen); |
779 | nbytes += key->keylen; | 781 | nbytes += key->keylen; |
780 | 782 | ||
783 | sg_mark_end(sg, block); | ||
784 | |||
781 | /* Now store the hash into the packet */ | 785 | /* Now store the hash into the packet */ |
782 | err = crypto_hash_init(desc); | 786 | err = crypto_hash_init(desc); |
783 | if (err) { | 787 | if (err) { |