[PATCH] Zero the reserved bytes of sadb_prob in af_key.c

Herbert Xu (herbert@gondor.apana.org.au)
Fri, 23 May 2003 08:30:38 +1000


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-12805-1053642730-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

According to RFC2367, all reserved bytes must be set to zero. This patch
does just that for the sadb_prop messages.

-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

--=_courier-12805-1053642730-0001-2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=p

Index: net/key/af_key.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/key/af_key.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 af_key.c --- net/key/af_key.c 4 May 2003 23:53:08 -0000 1.1.1.6 +++ net/key/af_key.c 22 May 2003 09:58:45 -0000 @@ -2245,6 +2245,9 @@ p->sadb_prop_len = sizeof(struct sadb_prop)/8; p->sadb_prop_exttype = SADB_EXT_PROPOSAL; p->sadb_prop_replay = 32; + p->sadb_prop_reserved[0] = 0; + p->sadb_prop_reserved[1] = 0; + p->sadb_prop_reserved[2] = 0; for (i = 0; ; i++) { struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i); @@ -2276,6 +2279,9 @@ p->sadb_prop_len = sizeof(struct sadb_prop)/8; p->sadb_prop_exttype = SADB_EXT_PROPOSAL; p->sadb_prop_replay = 32; + p->sadb_prop_reserved[0] = 0; + p->sadb_prop_reserved[1] = 0; + p->sadb_prop_reserved[2] = 0; for (i=0; ; i++) { struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);

--=_courier-12805-1053642730-0001-2--