diff options
author | Will Thompson <will@willthompson.co.uk> | 2018-08-21 13:04:10 +0100 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2018-08-21 13:15:34 +0100 |
commit | 838dc3618438bfcd0bf7a9c6090cde9df5aa39ea (patch) | |
tree | 406a99ebb3441f9651a57e1789d9565cee0221cd | |
parent | 0e3e396605563324b4e7d0872cbc7b74dc86f4aa (diff) |
Pcap: remove snaplen bug check
This isn't used during interactive recording, so was pretty useless
anyway. Now that libpcap has a fixed release, we'll just depend on that.
-rw-r--r-- | Bustle/Loader/Pcap.hs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Bustle/Loader/Pcap.hs b/Bustle/Loader/Pcap.hs index f1a8c08..d43b699 100644 --- a/Bustle/Loader/Pcap.hs +++ b/Bustle/Loader/Pcap.hs @@ -261,8 +261,7 @@ readPcap :: MonadIO m => FilePath -> m (Either IOError ([String], [B.DetailedEvent])) readPcap path = liftIO $ try $ do - p_ <- tryJust matchSnaplenBug $ openOffline path - p <- either ioError return p_ + p <- openOffline path dlt <- datalink p -- DLT_NULL for extremely old logs. -- DLT_DBUS is missing: https://github.com/bos/pcap/pull/8 @@ -271,15 +270,3 @@ readPcap path = liftIO $ try $ do ioError $ mkIOError userErrorType message Nothing (Just path) partitionEithers <$> evalStateT (mapBodies p convert) Map.empty - where - snaplenErrorString = "invalid file capture length 134217728, bigger than maximum of 262144" - snaplenBugReference = __ "libpcap 1.8.0 and 1.8.1 are incompatible with Bustle. See \ - \https://bugs.freedesktop.org/show_bug.cgi?id=100220#c7 for \ - \details. Distributions should apply downstream patches until \ - \until a new upstream release is made; users should install \ - \Bustle from Flathub, which already includes the necessary \ - \patches: https://flathub.org/apps/details/org.freedesktop.Bustle" - matchSnaplenBug e = - if isUserError e && (snaplenErrorString `isSuffixOf` ioeGetErrorString e) - then Just $ ioeSetErrorString e snaplenBugReference - else Nothing |