aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-20 21:45:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-20 21:45:57 +0000
commite69a6f1b82f2dbfe8877c9ddb98e4c3df44fbc4c (patch)
treebcc181013d47470e6d9636be8a4ebc341509047c /package
parent3b2713c42e2c141cdcdb051ee01a4297426f1d22 (diff)
downloadupstream-e69a6f1b82f2dbfe8877c9ddb98e4c3df44fbc4c.tar.gz
upstream-e69a6f1b82f2dbfe8877c9ddb98e4c3df44fbc4c.tar.bz2
upstream-e69a6f1b82f2dbfe8877c9ddb98e4c3df44fbc4c.zip
base-files: remove obsolete stuff from common.awk
SVN-Revision: 18109
Diffstat (limited to 'package')
-rw-r--r--package/base-files/files/usr/lib/common.awk42
1 files changed, 0 insertions, 42 deletions
diff --git a/package/base-files/files/usr/lib/common.awk b/package/base-files/files/usr/lib/common.awk
index c5ce680fa6..b73d4fc23d 100644
--- a/package/base-files/files/usr/lib/common.awk
+++ b/package/base-files/files/usr/lib/common.awk
@@ -1,47 +1,5 @@
# Copyright (C) 2006 OpenWrt.org
-function portstr(type, str) {
- gsub(/-/, ":", str)
- if (insmod_mport != 1) {
- print "insmod ipt_multiport >&- 2>&-"
- insmod_mport = 1
- }
- if (type == "src") return " -m multiport --sports " str
- else return " -m multiport --dports " str
-}
-
-function str2ipt(str) {
- str2data(str)
- _cmd = ""
- if (_l["src"] != "") _cmd = _cmd " -s " _l["src"]
- if (_l["dest"] != "") _cmd = _cmd " -d " _l["dest"]
- if (_l["proto"] != "") {
- _cmd = _cmd " -p " _l["proto"]
- }
- # scripts need to check for proto="" and emit two rules in that case
- if ((_l["proto"] == "") || (_l["proto"] == "tcp") || (_l["proto"] == "udp")) {
- if (_l["sport"] != "") _cmd = _cmd portstr("src", _l["sport"])
- if (_l["dport"] != "") _cmd = _cmd portstr("dest", _l["dport"])
- }
- if (_l["layer7"] != "") {
- if (insmod_l7 != 1) {
- print "insmod ipt_layer7 >&- 2>&-"
- insmod_l7 = 1
- }
- _cmd = _cmd " -m layer7 --l7proto " _l["layer7"]
- }
- return _cmd
-}
-
-function str2data(str) {
- delete _l
- _n = split(str, _o, "[\t ]")
- for (_i = 1; _i <= _n; _i++) {
- _n2 = split(_o[_i], _c, "=")
- if (_n2 == 2) _l[_c[1]] = _c[2]
- }
-}
-
function bitcount(c) {
c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)