]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_ipv4.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6] / net / ipv4 / tcp_ipv4.c
index 38cf73a5673144ed40cab33d07501a972c5299be..ad759f1c377734bf252a25422e136c275f132312 100644 (file)
@@ -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);
 
@@ -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)