]> git.ipfire.org Git - people/stevee/network.git/blame - ppp/ip-updown
Don't use connection tracking for loopback traffic.
[people/stevee/network.git] / ppp / ip-updown
CommitLineData
711ffac1 1#!/bin/bash
5b20e43a
MT
2###############################################################################
3# #
4# IPFire.org - A linux based firewall #
1848564d 5# Copyright (C) 2010 Michael Tremer & Christian Schmidt #
5b20e43a
MT
6# #
7# This program is free software: you can redistribute it and/or modify #
8# it under the terms of the GNU General Public License as published by #
9# the Free Software Foundation, either version 3 of the License, or #
10# (at your option) any later version. #
11# #
12# This program is distributed in the hope that it will be useful, #
13# but WITHOUT ANY WARRANTY; without even the implied warranty of #
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15# GNU General Public License for more details. #
16# #
17# You should have received a copy of the GNU General Public License #
18# along with this program. If not, see <http://www.gnu.org/licenses/>. #
19# #
20###############################################################################
21
6c74a64c
MT
22LOG_FACILITY=$(basename ${0})
23
5b20e43a 24umask 022
5b20e43a 25
6c74a64c
MT
26PPP_VARIABLES="IFNAME IPLOCAL IPREMOTE DNS1 DNS2 MACREMOTE LLLOCAL LLREMOTE"
27
711ffac1 28# Give the variables we get passed by pppd an own namespace
6c74a64c 29for i in ${PPP_VARIABLES}; do
711ffac1
MT
30 export PPP_${i}=${!i}
31 unset ${i}
32done
33
b58484f8 34. /usr/lib/network/functions
5b20e43a 35
6c74a64c
MT
36log DEBUG "Called."
37for i in ${PPP_VARIABLES}; do
38 i="PPP_${i}"
39 log DEBUG " ${i} = ${!i}"
40done
41
1848564d 42# Zone equals IFNAME
711ffac1 43ZONE=${PPP_IFNAME}
5b20e43a 44
e814246d
MT
45# If the given device is a known zone, we will call the required
46# hook methods. If we don't know about any zone with name ${ZONE},
47# we do nothing.
48
6c74a64c 49if isset ZONE && zone_exists ${ZONE}; then
e814246d
MT
50 HOOK=$(zone_get_hook ${ZONE})
51
52 assert isset HOOK
53 assert hook_zone_exists ${HOOK}
54
55 PROGNAME=$(basename ${0})
56 assert isset PROGNAME
711ffac1 57
e814246d
MT
58 log DEBUG "${PROGNAME} was called with the following parameters:"
59 log DEBUG " $@"
1848564d 60
e814246d 61 hook_zone_exec ${HOOK} ppp-${PROGNAME} ${ZONE}
6c74a64c 62 ret=$?
201b7dff 63
e814246d
MT
64 exit ${ret}
65fi
201b7dff 66
e814246d 67exit ${EXIT_OK}