Skip to content

Commit 8066e38

Browse files
committed
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 <[email protected]> Reviewed-by: Jason Xing <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1df4a94 commit 8066e38

19 files changed

+46
-46
lines changed

include/uapi/linux/fib_rules.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/types.h>
66
#include <linux/rtnetlink.h>

include/uapi/linux/if_addr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/types.h>
66
#include <linux/netlink.h>

include/uapi/linux/if_addrlabel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* YOSHIFUJI Hideaki @ USAGI/WIDE <[email protected]>
99
*/
1010

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
1313

1414
#include <linux/types.h>
1515

include/uapi/linux/if_alg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
*
1212
*/
1313

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
1616

1717
#include <linux/types.h>
1818

@@ -58,4 +58,4 @@ struct af_alg_iv {
5858
#define ALG_OP_DECRYPT 0
5959
#define ALG_OP_ENCRYPT 1
6060

61-
#endif /* _LINUX_IF_ALG_H */
61+
#endif /* _UAPI_LINUX_IF_ALG_H */

include/uapi/linux/if_arcnet.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* 2 of the License, or (at your option) any later version.
1515
*/
1616

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
1919

2020
#include <linux/types.h>
2121
#include <linux/if_ether.h>
@@ -127,4 +127,4 @@ struct archdr {
127127
} soft;
128128
};
129129

130-
#endif /* _LINUX_IF_ARCNET_H */
130+
#endif /* _UAPI_LINUX_IF_ARCNET_H */

include/uapi/linux/if_bonding.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
* - added definitions for various XOR hashing policies
4242
*/
4343

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
4646

4747
#include <linux/if.h>
4848
#include <linux/types.h>
@@ -152,4 +152,4 @@ enum {
152152
};
153153
#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
154154

155-
#endif /* _LINUX_IF_BONDING_H */
155+
#endif /* _UAPI_LINUX_IF_BONDING_H */

include/uapi/linux/if_fc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
* as published by the Free Software Foundation; either version
1919
* 2 of the License, or (at your option) any later version.
2020
*/
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
2323

2424
#include <linux/types.h>
2525

@@ -49,4 +49,4 @@ struct fcllc {
4949
__be16 ethertype; /* ether type field */
5050
};
5151

52-
#endif /* _LINUX_IF_FC_H */
52+
#endif /* _UAPI_LINUX_IF_FC_H */

include/uapi/linux/if_hippi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
* 2 of the License, or (at your option) any later version.
2121
*/
2222

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
2525

2626
#include <linux/types.h>
2727
#include <asm/byteorder.h>
@@ -151,4 +151,4 @@ struct hippi_hdr {
151151
struct hippi_snap_hdr snap;
152152
} __attribute__((packed));
153153

154-
#endif /* _LINUX_IF_HIPPI_H */
154+
#endif /* _UAPI_LINUX_IF_HIPPI_H */

include/uapi/linux/if_packet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <asm/byteorder.h>
66
#include <linux/types.h>

include/uapi/linux/if_plip.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
*/
1111

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
1414

1515
#include <linux/sockios.h>
1616

include/uapi/linux/if_slip.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* KISS TNC driver.
77
*/
88

9-
#ifndef __LINUX_SLIP_H
10-
#define __LINUX_SLIP_H
9+
#ifndef _UAPI__LINUX_SLIP_H
10+
#define _UAPI__LINUX_SLIP_H
1111

1212
#define SL_MODE_SLIP 0
1313
#define SL_MODE_CSLIP 1

include/uapi/linux/if_x25.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* GNU General Public License for more details.
1414
*/
1515

16-
#ifndef _IF_X25_H
17-
#define _IF_X25_H
16+
#ifndef _UAPI_IF_X25_H
17+
#define _UAPI_IF_X25_H
1818

1919
#include <linux/types.h>
2020

@@ -24,4 +24,4 @@
2424
#define X25_IFACE_DISCONNECT 0x02
2525
#define X25_IFACE_PARAMS 0x03
2626

27-
#endif /* _IF_X25_H */
27+
#endif /* _UAPI_IF_X25_H */

include/uapi/linux/if_xdp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* Magnus Karlsson <[email protected]>
88
*/
99

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
1212

1313
#include <linux/types.h>
1414

@@ -180,4 +180,4 @@ struct xdp_desc {
180180
/* TX packet carries valid metadata. */
181181
#define XDP_TX_METADATA (1 << 1)
182182

183-
#endif /* _LINUX_IF_XDP_H */
183+
#endif /* _UAPI_LINUX_IF_XDP_H */

include/uapi/linux/ip6_tunnel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/types.h>
66
#include <linux/if.h> /* For IFNAMSIZ. */

include/uapi/linux/net_dropmon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/types.h>
66
#include <linux/netlink.h>

include/uapi/linux/net_tstamp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*
88
*/
99

10-
#ifndef _NET_TIMESTAMPING_H
11-
#define _NET_TIMESTAMPING_H
10+
#ifndef _UAPI_NET_TIMESTAMPING_H
11+
#define _UAPI_NET_TIMESTAMPING_H
1212

1313
#include <linux/types.h>
1414
#include <linux/socket.h> /* for SO_TIMESTAMPING */
@@ -216,4 +216,4 @@ struct sock_txtime {
216216
__u32 flags; /* as defined by enum txtime_flags */
217217
};
218218

219-
#endif /* _NET_TIMESTAMPING_H */
219+
#endif /* _UAPI_NET_TIMESTAMPING_H */

include/uapi/linux/netlink_diag.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
#ifndef __NETLINK_DIAG_H__
3-
#define __NETLINK_DIAG_H__
2+
#ifndef _UAPI__NETLINK_DIAG_H__
3+
#define _UAPI__NETLINK_DIAG_H__
44

55
#include <linux/types.h>
66

include/uapi/linux/pkt_cls.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/types.h>
66
#include <linux/pkt_sched.h>

include/uapi/linux/pkt_sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* 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
44

55
#include <linux/const.h>
66
#include <linux/types.h>

0 commit comments

Comments
 (0)