All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tushar Gohad <tgohad@mvista.com>
To: netdev@vger.kernel.org
Subject: type of sadb_x_kmprivate_reserved in pfkeyv2.h
Date: Wed, 14 Jun 2006 15:13:08 -0700	[thread overview]
Message-ID: <449089F4.1090500@mvista.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

Hi David and folks,

In include/linux/pfkeyv2.h, is the type 'u_int32_t' for 
sadb_x_kmprivate_reserved intentional or just an error while bringing in 
the PF_KEY IPsec extensions from KAME?

struct sadb_x_kmprivate {
        uint16_t        sadb_x_kmprivate_len;
        uint16_t        sadb_x_kmprivate_exttype;
        u_int32_t       sadb_x_kmprivate_reserved;    <====
} __attribute__((packed));

This is causing erroneous ipsec-tools builds. How does the 
__BIT_TYPES_DEFINED define work? Seems like u_int32_t does not get 
defined in include/linux/types.h when building a userland program such 
as ipsec-tools.

An easy fix is to change the type to uint32_t. Patch attached.

Thanks.
- Tushar


[-- Attachment #2: common_fix_pfkeyv2_type.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]

Source: MontaVista Software, Inc.
MR: 19039
Type: Defect Fix
Disposition: needs submitting to kernel.org
Signed-off-by: Tushar Gohad <tgohad@mvista.com>
Description:
    When bringing over the PF_KEY extensions for IPsec from the
KAME stack, folks probably forgot to change this only variable
to be of type uint32_t. Or otherwise. This is the easiest and 
harmless fix.

Index: linux-p4/include/linux/pfkeyv2.h
===================================================================
--- linux-p4.orig/include/linux/pfkeyv2.h
+++ linux-p4/include/linux/pfkeyv2.h
@@ -159,7 +159,7 @@ struct sadb_spirange {
 struct sadb_x_kmprivate {
 	uint16_t	sadb_x_kmprivate_len;
 	uint16_t	sadb_x_kmprivate_exttype;
-	u_int32_t	sadb_x_kmprivate_reserved;
+	uint32_t	sadb_x_kmprivate_reserved;
 } __attribute__((packed));
 /* sizeof(struct sadb_x_kmprivate) == 8 */
 

                 reply	other threads:[~2006-06-14 22:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=449089F4.1090500@mvista.com \
    --to=tgohad@mvista.com \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.