mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-11-28 04:30:23 +00:00
veth: add kernel header linux/veth.h for VETH defines
Similar to what's done with <linux/if_link.h>, make sure used defines actually exist. Otherwise building on even slightly older kernels fails. Taken from upstream kernel commit 1860e379875dfe7271c649058aeddffe5afd9d0d (tag: v3.15), file 'include/uapi/linux/veth.h'. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
944b982cc5
commit
9dc6e6da90
@ -313,14 +313,6 @@ struct ifla_vxlan_port_range {
|
||||
__be16 high;
|
||||
};
|
||||
|
||||
enum {
|
||||
VETH_INFO_UNSPEC,
|
||||
VETH_INFO_PEER,
|
||||
|
||||
__VETH_INFO_MAX
|
||||
#define VETH_INFO_MAX (__VETH_INFO_MAX - 1)
|
||||
};
|
||||
|
||||
/* SR-IOV virtual function management section */
|
||||
|
||||
enum {
|
||||
|
12
include/linux/veth.h
Normal file
12
include/linux/veth.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef __NET_VETH_H_
|
||||
#define __NET_VETH_H_
|
||||
|
||||
enum {
|
||||
VETH_INFO_UNSPEC,
|
||||
VETH_INFO_PEER,
|
||||
|
||||
__VETH_INFO_MAX
|
||||
#define VETH_INFO_MAX (__VETH_INFO_MAX - 1)
|
||||
};
|
||||
|
||||
#endif
|
@ -32,6 +32,7 @@
|
||||
#include <netlink/route/link/veth.h>
|
||||
|
||||
#include <linux/if_link.h>
|
||||
#include <linux/veth.h>
|
||||
|
||||
static struct nla_policy veth_policy[VETH_INFO_MAX+1] = {
|
||||
[VETH_INFO_PEER] = { .minlen = sizeof(struct ifinfomsg) },
|
||||
|
Loading…
Reference in New Issue
Block a user