mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
vxlan: Improve support for header flags
This patch cleans up the header flags of VXLAN in anticipation of defining some new ones: - Move header related definitions from vxlan.c to vxlan.h - Change VXLAN_FLAGS to be VXLAN_HF_VNI (only currently defined flag) - Move check for unknown flags to after we find vxlan_sock, this assumes that some flags may be processed based on tunnel configuration - Add a comment about why the stack treating unknown set flags as an error instead of ignoring them Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eee2f04b80
commit
3bf3947526
2 changed files with 35 additions and 14 deletions
|
@ -17,6 +17,13 @@ struct vxlanhdr {
|
|||
__be32 vx_vni;
|
||||
};
|
||||
|
||||
/* VXLAN header flags. */
|
||||
#define VXLAN_HF_VNI 0x08000000
|
||||
|
||||
#define VXLAN_N_VID (1u << 24)
|
||||
#define VXLAN_VID_MASK (VXLAN_N_VID - 1)
|
||||
#define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))
|
||||
|
||||
struct vxlan_sock;
|
||||
typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue