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

* Re: [PATCH] Zero the reserved bytes of sadb_prob in af_key.c
  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
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-05-23  2:07 UTC (permalink / raw)
  To: herbert; +Cc: linux-kernel

   From: Herbert Xu <herbert@gondor.apana.org.au>
   Date: Fri, 23 May 2003 08:30:38 +1000

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

I applied your fix except that I decided to use memset().

Please use netdev@oss.sgi.com and/or linux-net@vger.kernel.org
in the future.  Most networking hackers don't read linux-kernel
and thus wouldn't be able to review your fix.

Thanks.

^ 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®