From e601ade924681773b406e5c816aee8886c75b2d4 Mon Sep 17 00:00:00 2001 From: Zack B Date: Tue, 1 Jul 2014 15:08:42 -0700 Subject: [PATCH] only support FreeBSD 10+ --- libmproxy/platform/__init__.py | 2 +- libmproxy/platform/pf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmproxy/platform/__init__.py b/libmproxy/platform/__init__.py index 79f2f5dfc..7f5701336 100644 --- a/libmproxy/platform/__init__.py +++ b/libmproxy/platform/__init__.py @@ -7,6 +7,6 @@ if sys.platform == "linux2": elif sys.platform == "darwin": import osx resolver = osx.Resolver -elif "freebsd" in sys.platform: +elif sys.platform == "freebsd10": import osx resolver = osx.Resolver diff --git a/libmproxy/platform/pf.py b/libmproxy/platform/pf.py index 32529e592..dc0f61046 100644 --- a/libmproxy/platform/pf.py +++ b/libmproxy/platform/pf.py @@ -12,7 +12,7 @@ def lookup(address, port, s): if "ESTABLISHED:ESTABLISHED" in i and spec in i: s = i.split() if len(s) > 4: - if "freebsd" in sys.platform: + if sys.platform == "freebsd10": # strip parentheses for FreeBSD pfctl s = s[3][1:-1].split(":") else: