diff --git a/Network/Socket.hsc b/Network/Socket.hsc
--- a/Network/Socket.hsc
+++ b/Network/Socket.hsc
@@ -845,6 +845,7 @@
     | SendTimeOut   -- ^ SO_SNDTIMEO
     | UseLoopBack   -- ^ SO_USELOOPBACK
     | IPv6Only      -- ^ IPV6_V6ONLY
+    | CustomSockOpt (CInt, CInt)
     deriving (Show, Typeable)
 
 -- | Does the 'SocketOption' exist on this system?
@@ -941,6 +942,7 @@
     Just IPv6Only      -> Just ((#const IPPROTO_IPV6), (#const IPV6_V6ONLY))
 #endif
 #endif // HAVE_DECL_IPPROTO_IPV6
+    Just (CustomSockOpt opt) -> Just opt
     _             -> Nothing
 
 -- | Return the option level and option value if they exist,
diff --git a/network.cabal b/network.cabal
--- a/network.cabal
+++ b/network.cabal
@@ -1,5 +1,5 @@
 name:           network
-version:        2.4.2.3
+version:        2.5.0.0
 license:        BSD3
 license-file:   LICENSE
 maintainer:     Johan Tibell <johan.tibell@gmail.com>
