Commit 97348238 authored by David S. Miller's avatar David S. Miller Committed by Greg Kroah-Hartman

net: Unbreak userspace which includes linux/mroute.h

[ Upstream commit 7c19a3d2 ]

This essentially reverts two commits:

1) 2e804627 ("[IPV4] MROUTE: Move PIM
   definitions to <linux/pim.h>.")

and

2) 80a9492a ("[IPV4] MROUTE: Adjust
   include files for user-space.")

which broke userpsace, in particular the XORP build as reported by
Jose Calhariz, the debain package maintainer for XORP.

Nothing originally in linux/mroute.h was exported to userspace
ever, but some of this stuff started to be when it was moved into
this new linux/pim.h, and that was wrong.  If we didn't provide these
definitions for 10 years we can reasonable expect that applications
defined this stuff locally or used GLIBC headers providing the
protocol definitions.  And as such the only result of this can
be conflict and userland build breakage.

The commit #1 had such a short and terse commit message, that we
cannot even know why such a move and set of new userland exports were
even made.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cb09de45
......@@ -293,7 +293,6 @@ unifdef-y += parport.h
unifdef-y += patchkey.h
unifdef-y += pci.h
unifdef-y += personality.h
unifdef-y += pim.h
unifdef-y += pktcdvd.h
unifdef-y += pmu.h
unifdef-y += poll.h
......
......@@ -2,11 +2,7 @@
#define __LINUX_MROUTE_H
#include <linux/sockios.h>
#include <linux/types.h>
#ifdef __KERNEL__
#include <linux/in.h>
#endif
#include <linux/pim.h>
/*
* Based on the MROUTING 3.5 defines primarily to keep
......@@ -214,6 +210,27 @@ struct mfc_cache
#define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */
#ifdef __KERNEL__
#define PIM_V1_VERSION __constant_htonl(0x10000000)
#define PIM_V1_REGISTER 1
#define PIM_VERSION 2
#define PIM_REGISTER 1
#define PIM_NULL_REGISTER __constant_htonl(0x40000000)
/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
struct pimreghdr
{
__u8 type;
__u8 reserved;
__be16 csum;
__be32 flags;
};
extern int pim_rcv_v1(struct sk_buff *);
struct rtmsg;
extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
#endif
......
#ifndef __LINUX_PIM_H
#define __LINUX_PIM_H
#include <asm/byteorder.h>
#ifndef __KERNEL__
struct pim {
#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 pim_type:4, /* PIM message type */
pim_ver:4; /* PIM version */
#elif defined(__BIG_ENDIAN_BITFIELD)
__u8 pim_ver:4; /* PIM version */
pim_type:4; /* PIM message type */
#endif
__u8 pim_rsv; /* Reserved */
__be16 pim_cksum; /* Checksum */
};
#define PIM_MINLEN 8
#endif
/* Message types - V1 */
#define PIM_V1_VERSION __constant_htonl(0x10000000)
#define PIM_V1_REGISTER 1
/* Message types - V2 */
#define PIM_VERSION 2
#define PIM_REGISTER 1
#if defined(__KERNEL__)
#define PIM_NULL_REGISTER __constant_htonl(0x40000000)
/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
struct pimreghdr
{
__u8 type;
__u8 reserved;
__be16 csum;
__be32 flags;
};
struct sk_buff;
extern int pim_rcv_v1(struct sk_buff *);
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment