]> git.proxmox.com Git - mirror_ovs.git/blobdiff - include/openvswitch/nsh.h
NSH: Fix NSH-related length macros that cause stack overflow
[mirror_ovs.git] / include / openvswitch / nsh.h
index 55f59d636e5acb6e3380698f8bfdcae58d3bf160..afed932fcb752fb3facbd3f6a01806495cfcb352 100644 (file)
@@ -263,10 +263,10 @@ struct nsh_hdr {
 #define NSH_M_TYPE1_LEN   24
 
 /* NSH header maximum Length. */
-#define NSH_HDR_MAX_LEN 256
+#define NSH_HDR_MAX_LEN 252
 
 /* NSH context headers maximum Length. */
-#define NSH_CTX_HDRS_MAX_LEN 248
+#define NSH_CTX_HDRS_MAX_LEN 244
 
 static inline uint16_t
 nsh_hdr_len(const struct nsh_hdr *nsh)