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

0 commit comments

Comments
 (0)