Browse Source

fwknop: ensure default ifname matches default network

Signed-off-by: Terry Stockert <stockert@inkblotadmirer.me>
lilik-openwrt-22.03
Terry Stockert 7 years ago
committed by Yousong Zhou
parent
commit
4adaa5b8b0
2 changed files with 6 additions and 3 deletions
  1. +1
    -1
      net/fwknop/Makefile
  2. +5
    -2
      net/fwknop/files/fwknopd.init

+ 1
- 1
net/fwknop/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=fwknop PKG_NAME:=fwknop
PKG_VERSION:=2.6.10 PKG_VERSION:=2.6.10
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download


+ 5
- 2
net/fwknop/files/fwknopd.init View File

@ -8,6 +8,8 @@
USE_PROCD=1 USE_PROCD=1
START=95 START=95
. /lib/functions/network.sh
FWKNOPD_BIN=/usr/sbin/fwknopd FWKNOPD_BIN=/usr/sbin/fwknopd
start_service() start_service()
@ -62,7 +64,9 @@ generate_configuration()
local PCAP_INTF= local PCAP_INTF=
local USER_CONFIG_PATH=/etc/fwknop/fwknopd.conf local USER_CONFIG_PATH=/etc/fwknop/fwknopd.conf
local DEFAULT_UCI_NETWORK=wan local DEFAULT_UCI_NETWORK=wan
local DEFAULT_FWKNOPD_IFNAME=eth0
local DEFAULT_FWKNOPD_IFNAME=
network_get_device DEFAULT_FWKNOPD_IFNAME $DEFAULT_UCI_NETWORK
config_cb() { config_cb() {
local type="$1" local type="$1"
@ -163,7 +167,6 @@ generate_configuration()
# Resolve network if possible # Resolve network if possible
if [ -n "$NETWORK" ]; then if [ -n "$NETWORK" ]; then
. /lib/functions/network.sh
network_get_device DEPEND_IFNAME "$NETWORK" network_get_device DEPEND_IFNAME "$NETWORK"
if [ -n "$DEPEND_IFNAME" ]; then if [ -n "$DEPEND_IFNAME" ]; then
logger -p daemon.debug -t "fwknopd[----]" "Resolved network $NETWORK as interface $DEPEND_IFNAME" logger -p daemon.debug -t "fwknopd[----]" "Resolved network $NETWORK as interface $DEPEND_IFNAME"


Loading…
Cancel
Save