Fwknopd: Set capture interface to wan by default 1362/head
authorJonathan Bennett <jbennett@incomsystems.biz>
Wed, 10 Jun 2015 21:58:56 +0000 (16:58 -0500)
committerJonathan Bennett <jbennett@incomsystems.biz>
Thu, 11 Jun 2015 02:57:13 +0000 (21:57 -0500)
Signed-off-by: Jonathan Bennett <JBennett@incomsystems.biz>
net/fwknop/files/fwknopd.init

index f8cda50ae3cbf399bd958e100753dde75e44082e..4c86493de98cfdc67293ff8f6aef3ab140dbd060 100644 (file)
@@ -5,7 +5,7 @@
 # list of contributors, see the file 'CREDITS'.
 #
 . /lib/functions.sh
-START=60
+START=95
 
 FWKNOPD_BIN=/usr/sbin/fwknopd
 
@@ -36,6 +36,13 @@ reload()
 gen_confs()
 {
        [ -f /tmp/access.conf.tmp ] && rm /tmp/access.conf.tmp
+       if [`uci get fwknopd.@access[0].PCAP_INTF` = ""]
+       then
+               . /lib/functions/network.sh
+               network_get_physdev device wan
+               uci set fwknopd.@config[0].PCAP_INTF="$device"
+               uci commit
+       fi
        config_cb() {
                local type="$1"
                local name="$2"