packets: Define IPPROTO_SCTP if not provided by <netinet/in.h>.
authorBen Pfaff <blp@nicira.com>
Tue, 22 May 2012 04:34:46 +0000 (21:34 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 13 Jun 2012 04:19:13 +0000 (21:19 -0700)
SUSv3 doesn't require IPPROTO_SCTP so some systems might not provide it.

IPPROTO_SCTP isn't used in the tree yet so this doesn't fix a real bug.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/packets.h

index 8e4117e..19ddd9a 100644 (file)
@@ -337,6 +337,10 @@ void ip_format_masked(ovs_be32 ip, ovs_be32 mask, struct ds *);
 #define IP_IHL(ip_ihl_ver) ((ip_ihl_ver) & 15)
 #define IP_IHL_VER(ihl, ver) (((ver) << 4) | (ihl))
 
+#ifndef IPPROTO_SCTP
+#define IPPROTO_SCTP 132
+#endif
+
 /* TOS fields. */
 #define IP_ECN_MASK 0x03
 #define IP_DSCP_MASK 0xfc