From: Herbert Xu <herbert@gondor.apana.org.au>
To: davem@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Zero the reserved bytes of sadb_prob in af_key.c
Date: Fri, 23 May 2003 08:30:38 +1000 [thread overview]
Message-ID: <20030522223038.GA31759@gondor.apana.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
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
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 975 bytes --]
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);
next reply other threads:[~2003-05-22 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 22:30 Herbert Xu [this message]
2003-05-23 2:07 ` [PATCH] Zero the reserved bytes of sadb_prob in af_key.c David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030522223038.GA31759@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).