mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Zero the reserved bytes of sadb_prob in af_key.c
@ 2003-05-22 22:30 Herbert Xu
  2003-05-23  2:07 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2003-05-22 22:30 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel

[-- 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-23  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-22 22:30 [PATCH] Zero the reserved bytes of sadb_prob in af_key.c Herbert Xu
2003-05-23  2:07 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®