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

Configure Feed

Select the types of activity you want to include in your feed.

net: add UAPI to the header guard in various network headers

fib_rule, ip6_tunnel, and a whole lot of if_* headers lack the customary
_UAPI in the header guard. Without it YNL build can't protect from in tree
and system headers both getting included. YNL doesn't need most of these
but it's annoying to have to fix them one by one.

Note that header installation strips this _UAPI prefix so this should
result in no change to the end user.

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250416200840.1338195-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+46 -46
+2 -2
include/uapi/linux/fib_rules.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __LINUX_FIB_RULES_H 3 - #define __LINUX_FIB_RULES_H 2 + #ifndef _UAPI__LINUX_FIB_RULES_H 3 + #define _UAPI__LINUX_FIB_RULES_H 4 4 5 5 #include <linux/types.h> 6 6 #include <linux/rtnetlink.h>
+2 -2
include/uapi/linux/if_addr.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __LINUX_IF_ADDR_H 3 - #define __LINUX_IF_ADDR_H 2 + #ifndef _UAPI__LINUX_IF_ADDR_H 3 + #define _UAPI__LINUX_IF_ADDR_H 4 4 5 5 #include <linux/types.h> 6 6 #include <linux/netlink.h>
+2 -2
include/uapi/linux/if_addrlabel.h
··· 8 8 * YOSHIFUJI Hideaki @ USAGI/WIDE <yoshfuji@linux-ipv6.org> 9 9 */ 10 10 11 - #ifndef __LINUX_IF_ADDRLABEL_H 12 - #define __LINUX_IF_ADDRLABEL_H 11 + #ifndef _UAPI__LINUX_IF_ADDRLABEL_H 12 + #define _UAPI__LINUX_IF_ADDRLABEL_H 13 13 14 14 #include <linux/types.h> 15 15
+3 -3
include/uapi/linux/if_alg.h
··· 11 11 * 12 12 */ 13 13 14 - #ifndef _LINUX_IF_ALG_H 15 - #define _LINUX_IF_ALG_H 14 + #ifndef _UAPI_LINUX_IF_ALG_H 15 + #define _UAPI_LINUX_IF_ALG_H 16 16 17 17 #include <linux/types.h> 18 18 ··· 58 58 #define ALG_OP_DECRYPT 0 59 59 #define ALG_OP_ENCRYPT 1 60 60 61 - #endif /* _LINUX_IF_ALG_H */ 61 + #endif /* _UAPI_LINUX_IF_ALG_H */
+3 -3
include/uapi/linux/if_arcnet.h
··· 14 14 * 2 of the License, or (at your option) any later version. 15 15 */ 16 16 17 - #ifndef _LINUX_IF_ARCNET_H 18 - #define _LINUX_IF_ARCNET_H 17 + #ifndef _UAPI_LINUX_IF_ARCNET_H 18 + #define _UAPI_LINUX_IF_ARCNET_H 19 19 20 20 #include <linux/types.h> 21 21 #include <linux/if_ether.h> ··· 127 127 } soft; 128 128 }; 129 129 130 - #endif /* _LINUX_IF_ARCNET_H */ 130 + #endif /* _UAPI_LINUX_IF_ARCNET_H */
+3 -3
include/uapi/linux/if_bonding.h
··· 41 41 * - added definitions for various XOR hashing policies 42 42 */ 43 43 44 - #ifndef _LINUX_IF_BONDING_H 45 - #define _LINUX_IF_BONDING_H 44 + #ifndef _UAPI_LINUX_IF_BONDING_H 45 + #define _UAPI_LINUX_IF_BONDING_H 46 46 47 47 #include <linux/if.h> 48 48 #include <linux/types.h> ··· 152 152 }; 153 153 #define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1) 154 154 155 - #endif /* _LINUX_IF_BONDING_H */ 155 + #endif /* _UAPI_LINUX_IF_BONDING_H */
+3 -3
include/uapi/linux/if_fc.h
··· 18 18 * as published by the Free Software Foundation; either version 19 19 * 2 of the License, or (at your option) any later version. 20 20 */ 21 - #ifndef _LINUX_IF_FC_H 22 - #define _LINUX_IF_FC_H 21 + #ifndef _UAPI_LINUX_IF_FC_H 22 + #define _UAPI_LINUX_IF_FC_H 23 23 24 24 #include <linux/types.h> 25 25 ··· 49 49 __be16 ethertype; /* ether type field */ 50 50 }; 51 51 52 - #endif /* _LINUX_IF_FC_H */ 52 + #endif /* _UAPI_LINUX_IF_FC_H */
+3 -3
include/uapi/linux/if_hippi.h
··· 20 20 * 2 of the License, or (at your option) any later version. 21 21 */ 22 22 23 - #ifndef _LINUX_IF_HIPPI_H 24 - #define _LINUX_IF_HIPPI_H 23 + #ifndef _UAPI_LINUX_IF_HIPPI_H 24 + #define _UAPI_LINUX_IF_HIPPI_H 25 25 26 26 #include <linux/types.h> 27 27 #include <asm/byteorder.h> ··· 151 151 struct hippi_snap_hdr snap; 152 152 } __attribute__((packed)); 153 153 154 - #endif /* _LINUX_IF_HIPPI_H */ 154 + #endif /* _UAPI_LINUX_IF_HIPPI_H */
+2 -2
include/uapi/linux/if_packet.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __LINUX_IF_PACKET_H 3 - #define __LINUX_IF_PACKET_H 2 + #ifndef _UAPI__LINUX_IF_PACKET_H 3 + #define _UAPI__LINUX_IF_PACKET_H 4 4 5 5 #include <asm/byteorder.h> 6 6 #include <linux/types.h>
+2 -2
include/uapi/linux/if_plip.h
··· 9 9 * 10 10 */ 11 11 12 - #ifndef _LINUX_IF_PLIP_H 13 - #define _LINUX_IF_PLIP_H 12 + #ifndef _UAPI_LINUX_IF_PLIP_H 13 + #define _UAPI_LINUX_IF_PLIP_H 14 14 15 15 #include <linux/sockios.h> 16 16
+2 -2
include/uapi/linux/if_slip.h
··· 6 6 * KISS TNC driver. 7 7 */ 8 8 9 - #ifndef __LINUX_SLIP_H 10 - #define __LINUX_SLIP_H 9 + #ifndef _UAPI__LINUX_SLIP_H 10 + #define _UAPI__LINUX_SLIP_H 11 11 12 12 #define SL_MODE_SLIP 0 13 13 #define SL_MODE_CSLIP 1
+3 -3
include/uapi/linux/if_x25.h
··· 13 13 * GNU General Public License for more details. 14 14 */ 15 15 16 - #ifndef _IF_X25_H 17 - #define _IF_X25_H 16 + #ifndef _UAPI_IF_X25_H 17 + #define _UAPI_IF_X25_H 18 18 19 19 #include <linux/types.h> 20 20 ··· 24 24 #define X25_IFACE_DISCONNECT 0x02 25 25 #define X25_IFACE_PARAMS 0x03 26 26 27 - #endif /* _IF_X25_H */ 27 + #endif /* _UAPI_IF_X25_H */
+3 -3
include/uapi/linux/if_xdp.h
··· 7 7 * Magnus Karlsson <magnus.karlsson@intel.com> 8 8 */ 9 9 10 - #ifndef _LINUX_IF_XDP_H 11 - #define _LINUX_IF_XDP_H 10 + #ifndef _UAPI_LINUX_IF_XDP_H 11 + #define _UAPI_LINUX_IF_XDP_H 12 12 13 13 #include <linux/types.h> 14 14 ··· 180 180 /* TX packet carries valid metadata. */ 181 181 #define XDP_TX_METADATA (1 << 1) 182 182 183 - #endif /* _LINUX_IF_XDP_H */ 183 + #endif /* _UAPI_LINUX_IF_XDP_H */
+2 -2
include/uapi/linux/ip6_tunnel.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _IP6_TUNNEL_H 3 - #define _IP6_TUNNEL_H 2 + #ifndef _UAPI_IP6_TUNNEL_H 3 + #define _UAPI_IP6_TUNNEL_H 4 4 5 5 #include <linux/types.h> 6 6 #include <linux/if.h> /* For IFNAMSIZ. */
+2 -2
include/uapi/linux/net_dropmon.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __NET_DROPMON_H 3 - #define __NET_DROPMON_H 2 + #ifndef _UAPI__NET_DROPMON_H 3 + #define _UAPI__NET_DROPMON_H 4 4 5 5 #include <linux/types.h> 6 6 #include <linux/netlink.h>
+3 -3
include/uapi/linux/net_tstamp.h
··· 7 7 * 8 8 */ 9 9 10 - #ifndef _NET_TIMESTAMPING_H 11 - #define _NET_TIMESTAMPING_H 10 + #ifndef _UAPI_NET_TIMESTAMPING_H 11 + #define _UAPI_NET_TIMESTAMPING_H 12 12 13 13 #include <linux/types.h> 14 14 #include <linux/socket.h> /* for SO_TIMESTAMPING */ ··· 216 216 __u32 flags; /* as defined by enum txtime_flags */ 217 217 }; 218 218 219 - #endif /* _NET_TIMESTAMPING_H */ 219 + #endif /* _UAPI_NET_TIMESTAMPING_H */
+2 -2
include/uapi/linux/pkt_cls.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __LINUX_PKT_CLS_H 3 - #define __LINUX_PKT_CLS_H 2 + #ifndef _UAPI__LINUX_PKT_CLS_H 3 + #define _UAPI__LINUX_PKT_CLS_H 4 4 5 5 #include <linux/types.h> 6 6 #include <linux/pkt_sched.h>
+2 -2
include/uapi/linux/pkt_sched.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __LINUX_PKT_SCHED_H 3 - #define __LINUX_PKT_SCHED_H 2 + #ifndef _UAPI__LINUX_PKT_SCHED_H 3 + #define _UAPI__LINUX_PKT_SCHED_H 4 4 5 5 #include <linux/const.h> 6 6 #include <linux/types.h>