Revision d24fc4b6
b/src/Ganeti/Confd/Server.hs | ||
---|---|---|
246 | 246 |
innermsg = serializeResponse (cfg >>= flip buildResponse rq) |
247 | 247 |
innerserialised = J.encodeStrict innermsg |
248 | 248 |
outermsg = signMessage hmac rsalt innerserialised |
249 |
outerserialised = confdMagicFourcc ++ J.encodeStrict outermsg |
|
249 |
outerserialised = C.confdMagicFourcc ++ J.encodeStrict outermsg
|
|
250 | 250 |
in outerserialised |
251 | 251 |
|
252 | 252 |
-- | Main listener loop. |
... | ... | |
255 | 255 |
-> IO () |
256 | 256 |
listener s hmac resp = do |
257 | 257 |
(msg, _, peer) <- S.recvFrom s 4096 |
258 |
if confdMagicFourcc `isPrefixOf` msg |
|
258 |
if C.confdMagicFourcc `isPrefixOf` msg
|
|
259 | 259 |
then forkIO (resp s hmac (drop 4 msg) peer) >> return () |
260 | 260 |
else logDebug "Invalid magic code!" >> return () |
261 | 261 |
return () |
Also available in: Unified diff