mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 19:25:46 +07:00
013e816789
In the latest version of the IPv6 Segment Routing IETF draft [1] the cleanup flag is removed and the flags field length is shrunk from 16 bits to 8 bits. As a consequence, the input of the HMAC computation is modified in a non-backward compatible way by covering the whole octet of flags instead of only the cleanup bit. As such, if an implementation compatible with the latest draft computes the HMAC of an SRH who has other flags set to 1, then the HMAC result would differ from the current implementation. This patch carries those modifications to prevent conflict with other implementations of IPv6 SR. [1] https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-05 Signed-off-by: David Lebrun <david.lebrun@uclouvain.be> Signed-off-by: David S. Miller <davem@davemloft.net>
52 lines
999 B
C
52 lines
999 B
C
/*
|
|
* SR-IPv6 implementation
|
|
*
|
|
* Author:
|
|
* David Lebrun <david.lebrun@uclouvain.be>
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_SEG6_H
|
|
#define _UAPI_LINUX_SEG6_H
|
|
|
|
/*
|
|
* SRH
|
|
*/
|
|
struct ipv6_sr_hdr {
|
|
__u8 nexthdr;
|
|
__u8 hdrlen;
|
|
__u8 type;
|
|
__u8 segments_left;
|
|
__u8 first_segment;
|
|
__u8 flags;
|
|
__u16 reserved;
|
|
|
|
struct in6_addr segments[0];
|
|
};
|
|
|
|
#define SR6_FLAG1_PROTECTED (1 << 6)
|
|
#define SR6_FLAG1_OAM (1 << 5)
|
|
#define SR6_FLAG1_ALERT (1 << 4)
|
|
#define SR6_FLAG1_HMAC (1 << 3)
|
|
|
|
#define SR6_TLV_INGRESS 1
|
|
#define SR6_TLV_EGRESS 2
|
|
#define SR6_TLV_OPAQUE 3
|
|
#define SR6_TLV_PADDING 4
|
|
#define SR6_TLV_HMAC 5
|
|
|
|
#define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
|
|
|
|
struct sr6_tlv {
|
|
__u8 type;
|
|
__u8 len;
|
|
__u8 data[0];
|
|
};
|
|
|
|
#endif
|