packages feed

radius 0.6.0.1 → 0.6.0.2

raw patch · 3 files changed

+19/−1 lines, 3 filesdep ~basedep ~binarydep ~bytestringPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: base, binary, bytestring, cryptonite, iproute, memory

API changes (from Hackage documentation)

+ Network.RADIUS.Types: DelegatedIPv6Prefix :: Int8 -> IPv6 -> PacketAttribute
+ Network.RADIUS.Types: [getDelegatedIPv6PrefixLength] :: PacketAttribute -> Int8
+ Network.RADIUS.Types: [getDelegatedIPv6Prefix] :: PacketAttribute -> IPv6

Files

radius.cabal view
@@ -1,5 +1,5 @@ name:                radius-version:             0.6.0.1+version:             0.6.0.2 synopsis:            Remote Authentication Dial In User Service (RADIUS) description:         This module provides types and on the wire de/coding of RADIUS packets as per RFC2865 homepage:            https://gitlab.com/codemonkeylabs/RADIUS
src/Network/RADIUS/Encoding.hs view
@@ -209,6 +209,14 @@       putWord8 attrLen       putWord8 identity       putLazyByteString str+    put (DelegatedIPv6Prefix prefixLength prefix) = do+      let attr    = encode prefix+          attrLen = 4 + (fromIntegral . B.length $ attr)+      putWord8 123 -- Attribute type+      putWord8 attrLen+      putWord8 0 -- reserved+      putWord8 $ fromIntegral prefixLength+      putLazyByteString attr     put (UnknownAttribute attributeType value) = putAttribute attributeType value      get = do@@ -325,6 +333,14 @@   identity <- getWord8   attrData <- getLazyByteString 16 -- CHAP response is always 16 octets   return $ CHAPPassword identity attrData+getAttribute 123 = do+  attrLen      <- getWord8+  when (attrLen /= 20) $ fail $ "Unsupported RADIUS Delegated IPv6 Prefix attribute length "+           ++ show attrLen+  _reserved    <- getWord8+  prefixLength <- getWord8+  prefix       <- get+  return $ DelegatedIPv6Prefix (fromIntegral prefixLength) prefix getAttribute n  = getAttributeStr >>= return . UnknownAttribute n  -- | For internal use.
src/Network/RADIUS/Types.hs view
@@ -92,6 +92,8 @@   | ReplyMessageAttribute           { getReplyMessageAttribute           :: ByteString        }   | CallbackNumberAttribute         { getCallbackNumberAttribute         :: ByteString        }   | CallbackIdAttribute             { getCallbackIdAttribute             :: ByteString        }+  | DelegatedIPv6Prefix             { getDelegatedIPv6PrefixLength       :: Int8,+                                      getDelegatedIPv6Prefix             :: IPv6              }   | FramedRouteAttribute            { getFramedRouteAttribute            :: ByteString        }   | FramedIPXNetworkAttribute       { getFramedIPXNetworkAttribute       :: Word32            }   | StateAttribute                  { getStateAttribute                  :: ByteString        }