Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Unbreak userspace usage of linux/mroute.h

Nothing in linux/pim.h should be exported to userspace.

This should fix the XORP build failure reported by
Jose Calhariz, the debain package maintainer.

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 reasonably 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.

Signed-off-by: David S. Miller <davem@davemloft.net>

+2 -20
-1
include/linux/Kbuild
··· 297 297 unifdef-y += patchkey.h 298 298 unifdef-y += pci.h 299 299 unifdef-y += personality.h 300 - unifdef-y += pim.h 301 300 unifdef-y += pktcdvd.h 302 301 unifdef-y += pmu.h 303 302 unifdef-y += poll.h
+1 -1
include/linux/mroute.h
··· 6 6 #ifdef __KERNEL__ 7 7 #include <linux/in.h> 8 8 #endif 9 - #include <linux/pim.h> 10 9 11 10 /* 12 11 * Based on the MROUTING 3.5 defines primarily to keep ··· 129 130 */ 130 131 131 132 #ifdef __KERNEL__ 133 + #include <linux/pim.h> 132 134 #include <net/sock.h> 133 135 134 136 #ifdef CONFIG_IP_MROUTE
+1
include/linux/mroute6.h
··· 115 115 116 116 #ifdef __KERNEL__ 117 117 118 + #include <linux/pim.h> 118 119 #include <linux/skbuff.h> /* for struct sk_buff_head */ 119 120 120 121 #ifdef CONFIG_IPV6_MROUTE
-18
include/linux/pim.h
··· 3 3 4 4 #include <asm/byteorder.h> 5 5 6 - #ifndef __KERNEL__ 7 - struct pim { 8 - #if defined(__LITTLE_ENDIAN_BITFIELD) 9 - __u8 pim_type:4, /* PIM message type */ 10 - pim_ver:4; /* PIM version */ 11 - #elif defined(__BIG_ENDIAN_BITFIELD) 12 - __u8 pim_ver:4; /* PIM version */ 13 - pim_type:4; /* PIM message type */ 14 - #endif 15 - __u8 pim_rsv; /* Reserved */ 16 - __be16 pim_cksum; /* Checksum */ 17 - }; 18 - 19 - #define PIM_MINLEN 8 20 - #endif 21 - 22 6 /* Message types - V1 */ 23 7 #define PIM_V1_VERSION __constant_htonl(0x10000000) 24 8 #define PIM_V1_REGISTER 1 ··· 11 27 #define PIM_VERSION 2 12 28 #define PIM_REGISTER 1 13 29 14 - #if defined(__KERNEL__) 15 30 #define PIM_NULL_REGISTER __constant_htonl(0x40000000) 16 31 17 32 /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ ··· 24 41 25 42 struct sk_buff; 26 43 extern int pim_rcv_v1(struct sk_buff *); 27 - #endif 28 44 #endif