pfkey: fix SADB_X_EXT_FILTER length check
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 20 Feb 2014 13:52:41 +0000 (14:52 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 21 Feb 2014 05:40:54 +0000 (06:40 +0100)
This patch fixes commit d3623099d350 ("ipsec: add support of limited SA dump").

sadb_ext_min_len array should be updated with the new type (SADB_X_EXT_FILTER).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/key/af_key.c

index f0879c19f45259b45b68f1ac64b510f898fe5aa0..a50d979b592660aacfe711b9c73d93da00c7178a 100644 (file)
@@ -365,6 +365,7 @@ static const u8 sadb_ext_min_len[] = {
        [SADB_X_EXT_NAT_T_OA]           = (u8) sizeof(struct sadb_address),
        [SADB_X_EXT_SEC_CTX]            = (u8) sizeof(struct sadb_x_sec_ctx),
        [SADB_X_EXT_KMADDRESS]          = (u8) sizeof(struct sadb_x_kmaddress),
+       [SADB_X_EXT_FILTER]             = (u8) sizeof(struct sadb_x_filter),
 };
 
 /* Verify sadb_address_{len,prefixlen} against sa_family.  */