aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-03-18 17:27:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-03-18 17:27:20 +0000
commit5359dd8c8a0ad7c6c3ea7f0211b26b378263965f (patch)
tree52813f9ebd13e23690eceb048dcb8cfb54863a17 /package/ppp/files
parenta10c122fe2cdd175541eb14cebe58d599b5c7dce (diff)
downloadupstream-5359dd8c8a0ad7c6c3ea7f0211b26b378263965f.tar.gz
upstream-5359dd8c8a0ad7c6c3ea7f0211b26b378263965f.tar.bz2
upstream-5359dd8c8a0ad7c6c3ea7f0211b26b378263965f.zip
precompile ppp active filter (reduces libpcap overhead to only a few k), enable by default to support proper demand dialling, fixes #307
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3401 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files')
-rw-r--r--package/ppp/files/etc/ppp/filter23
-rw-r--r--package/ppp/files/ifup.pppoa1
-rw-r--r--package/ppp/files/ifup.pppoe1
3 files changed, 25 insertions, 0 deletions
diff --git a/package/ppp/files/etc/ppp/filter b/package/ppp/files/etc/ppp/filter
new file mode 100644
index 0000000000..ec72a81a01
--- /dev/null
+++ b/package/ppp/files/etc/ppp/filter
@@ -0,0 +1,23 @@
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
diff --git a/package/ppp/files/ifup.pppoa b/package/ppp/files/ifup.pppoa
index 2ae6019c51..baea25ebf2 100644
--- a/package/ppp/files/ifup.pppoa
+++ b/package/ppp/files/ifup.pppoa
@@ -25,6 +25,7 @@ case "$DEMAND" in
on|1|enabled)
DEMAND=$(nvram get ppp_idletime)
DEMAND=${IDLETIME:+demand idle $IDLETIME}
+ [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND}
;;
*) DEMAND="persist";;
esac
diff --git a/package/ppp/files/ifup.pppoe b/package/ppp/files/ifup.pppoe
index d4a79aedd5..1f9cd739c3 100644
--- a/package/ppp/files/ifup.pppoe
+++ b/package/ppp/files/ifup.pppoe
@@ -24,6 +24,7 @@ case "$DEMAND" in
on|1|enabled)
DEMAND=$(nvram get ppp_idletime)
DEMAND=${IDLETIME:+demand idle $IDLETIME}
+ [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND}
;;
*) DEMAND="persist";;
esac