Skip to contentSkip to conversation

New: PF_KEY SADB_GET messages return SADB_DUMP from the kernel

Bugme-new Andrew Morton 2 participants 2 messages Oct 5, 2007 – Oct 6, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

(Please reply via emailed reply-to-all, not via the bugzilla web interface)

Quoted 43 lines · On Fri, 5 Oct 2007 09:01:50 -0700 (PDT) [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=9128

           Summary: PF_KEY SADB_GET messages return SADB_DUMP from the
                    kernel
           Product: Networking
           Version: 2.5
     KernelVersion: 2.6.18
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
        AssignedTo: [email protected]
        ReportedBy: [email protected]

Most recent kernel where this bug did not occur:
Distribution: Centos 5
Hardware Environment: Dell 490
Software Environment: Centos 5
Problem Description:
Sending an SADB_GET to the PF_KEY socket returns an SADB_DUMP in the out_hdr

Steps to reproduce:
Send an SADB_GET to the PF_KEY socket and dump the returned packet

This patch should fix the problem

net/key/af_key.c +1 -1
index 5502df1..7a5e993 100644
@@ -1546,7 +1546,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff
 *skb,
 
        out_hdr = (struct sadb_msg *) out_skb->data;
        out_hdr->sadb_msg_version = hdr->sadb_msg_version;
-       out_hdr->sadb_msg_type = SADB_DUMP;
+       out_hdr->sadb_msg_type = SADB_GET;
        out_hdr->sadb_msg_satype = pfkey_proto2satype(proto);
        out_hdr->sadb_msg_errno = 0;
Quoted 2 lines
        out_hdr->sadb_msg_reserved = 0;

Please submit kernel patches via email, as per
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt. Net patches should be sent to [email protected] and perhaps [email protected].

But whatever - I can convert this patch into a suitable one and send it in to David if people think it is good?

#2 lore raw
Quoted 3 lines · Andrew Morton

But whatever - I can convert this patch into a suitable one and send it in to David if people think it is good?

Looks good to me.

Thanks,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt