mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-03 13:47:04 +03:00
missing: support old linux/fou.h
linux/fou.h was introduced in 3.18. FOU_ATTR_REMCSUM_NOPARTIAL was added in 4.0. FOU_CMD_GET was added in 4.1. Follow-up for 53cb501a1314740fa777f145067cefccda954487. Fixes #10474.
This commit is contained in:
parent
a2689fa5fc
commit
80df8f2518
@ -476,7 +476,6 @@ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
|
|||||||
['VXCAN_INFO_PEER', 'linux/can/vxcan.h'],
|
['VXCAN_INFO_PEER', 'linux/can/vxcan.h'],
|
||||||
['FOU_ATTR_REMCSUM_NOPARTIAL', 'linux/fou.h'],
|
['FOU_ATTR_REMCSUM_NOPARTIAL', 'linux/fou.h'],
|
||||||
['FOU_CMD_GET', 'linux/fou.h'],
|
['FOU_CMD_GET', 'linux/fou.h'],
|
||||||
['FOU_ENCAP_GUE', 'linux/fou.h'],
|
|
||||||
]
|
]
|
||||||
prefix = decl.length() > 2 ? decl[2] : ''
|
prefix = decl.length() > 2 ? decl[2] : ''
|
||||||
have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)
|
have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)
|
||||||
@ -608,6 +607,7 @@ if not cc.has_header('sys/capability.h')
|
|||||||
endif
|
endif
|
||||||
foreach header : ['crypt.h',
|
foreach header : ['crypt.h',
|
||||||
'linux/btrfs.h',
|
'linux/btrfs.h',
|
||||||
|
'linux/fou.h',
|
||||||
'linux/memfd.h',
|
'linux/memfd.h',
|
||||||
'linux/vm_sockets.h',
|
'linux/vm_sockets.h',
|
||||||
'sys/auxv.h',
|
'sys/auxv.h',
|
||||||
|
@ -1417,33 +1417,39 @@ struct statx {
|
|||||||
#define FOU_GENL_VERSION 0x1
|
#define FOU_GENL_VERSION 0x1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_LINUX_FOU_H
|
||||||
|
#define FOU_ATTR_UNSPEC 0
|
||||||
|
#define FOU_ATTR_PORT 1
|
||||||
|
#define FOU_ATTR_AF 2
|
||||||
|
#define FOU_ATTR_IPPROTO 3
|
||||||
|
#define FOU_ATTR_TYPE 4
|
||||||
|
#endif
|
||||||
#if !HAVE_FOU_ATTR_REMCSUM_NOPARTIAL
|
#if !HAVE_FOU_ATTR_REMCSUM_NOPARTIAL
|
||||||
#define FOU_ATTR_UNSPEC 0
|
|
||||||
#define FOU_ATTR_PORT 1
|
|
||||||
#define FOU_ATTR_AF 2
|
|
||||||
#define FOU_ATTR_IPPROTO 3
|
|
||||||
#define FOU_ATTR_TYPE 4
|
|
||||||
#define FOU_ATTR_REMCSUM_NOPARTIAL 5
|
#define FOU_ATTR_REMCSUM_NOPARTIAL 5
|
||||||
#define __FOU_ATTR_MAX 6
|
#undef FOU_ATTR_MAX
|
||||||
|
#endif
|
||||||
#define FOU_ATTR_MAX (__FOU_ATTR_MAX - 1)
|
#ifndef FOU_ATTR_MAX
|
||||||
|
#define FOU_ATTR_MAX 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_LINUX_FOU_H
|
||||||
|
#define FOU_CMD_UNSPEC 0
|
||||||
|
#define FOU_CMD_ADD 1
|
||||||
|
#define FOU_CMD_DEL 2
|
||||||
|
#endif
|
||||||
#if !HAVE_FOU_CMD_GET
|
#if !HAVE_FOU_CMD_GET
|
||||||
#define FOU_CMD_UNSPEC 0
|
#define FOU_CMD_GET 3
|
||||||
#define FOU_CMD_ADD 1
|
#undef FOU_CMD_MAX
|
||||||
#define FOU_CMD_DEL 2
|
#endif
|
||||||
#define FOU_CMD_GET 3
|
#ifndef FOU_CMD_MAX
|
||||||
#define __FOU_CMD_MAX 4
|
#define FOU_CMD_MAX 3
|
||||||
|
|
||||||
#define FOU_CMD_MAX (__FOU_CMD_MAX - 1)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !HAVE_FOU_ENCAP_GUE
|
#if !HAVE_LINUX_FOU_H
|
||||||
#define FOU_ENCAP_UNSPEC 0
|
#define FOU_ENCAP_UNSPEC 0
|
||||||
#define FOU_ENCAP_DIRECT 1
|
#define FOU_ENCAP_DIRECT 1
|
||||||
#define FOU_ENCAP_GUE 2
|
#define FOU_ENCAP_GUE 2
|
||||||
#define __FOU_ENCAP_MAX 3
|
#define __FOU_ENCAP_MAX 3
|
||||||
|
|
||||||
#define FOU_ENCAP_MAX (__FOU_ENCAP_MAX - 1)
|
#define FOU_ENCAP_MAX (__FOU_ENCAP_MAX - 1)
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <linux/if_tunnel.h>
|
#include <linux/if_tunnel.h>
|
||||||
#include <linux/veth.h>
|
#include <linux/veth.h>
|
||||||
|
|
||||||
#if HAVE_FOU_CMD_GET
|
#if HAVE_LINUX_FOU_H
|
||||||
#include <linux/fou.h>
|
#include <linux/fou.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if HAVE_FOU_CMD_GET
|
#if HAVE_LINUX_FOU_H
|
||||||
#include <linux/fou.h>
|
#include <linux/fou.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "in-addr-util.h"
|
#include "in-addr-util.h"
|
||||||
|
#include "missing.h"
|
||||||
#include "netdev/netdev.h"
|
#include "netdev/netdev.h"
|
||||||
|
|
||||||
typedef enum FooOverUDPEncapType {
|
typedef enum FooOverUDPEncapType {
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#include <linux/if_tunnel.h>
|
#include <linux/if_tunnel.h>
|
||||||
#include <linux/ip6_tunnel.h>
|
#include <linux/ip6_tunnel.h>
|
||||||
|
|
||||||
#include "sd-netlink.h"
|
#if HAVE_LINUX_FOU_H
|
||||||
|
|
||||||
#if HAVE_FOU_CMD_GET
|
|
||||||
#include <linux/fou.h>
|
#include <linux/fou.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "sd-netlink.h"
|
||||||
|
|
||||||
#include "conf-parser.h"
|
#include "conf-parser.h"
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "networkd-link.h"
|
#include "networkd-link.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user