aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-03-02 15:48:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-03-02 15:48:29 +0000
commit65b4654000ef64d06a72f87542753ad16dbeb610 (patch)
tree661185ed085c37d5a492c3577978e741aa43e924 /docs
parentc4571554522a1caddadbaa43c7e500cfa1501747 (diff)
downloadupstream-65b4654000ef64d06a72f87542753ad16dbeb610.tar.gz
upstream-65b4654000ef64d06a72f87542753ad16dbeb610.tar.bz2
upstream-65b4654000ef64d06a72f87542753ad16dbeb610.zip
add support for static routes - based on the patch from #1365
SVN-Revision: 6457
Diffstat (limited to 'docs')
-rw-r--r--docs/network.tex18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/network.tex b/docs/network.tex
index 41febef8af..7d811ba7f5 100644
--- a/docs/network.tex
+++ b/docs/network.tex
@@ -54,6 +54,24 @@ PPP based protocols (\texttt{pppoe}, \texttt{pptp}, ...) accept these options:
For all protocol types, you can also specify the MTU by using the \texttt{mtu} option.
+\subsubsection{Setting up static routes}
+
+You can set up static routes for a specific interface that will be brought up
+after the interface is configured.
+
+Simply add a config section like this:
+
+\begin{Verbatim}
+config route foo
+ option interface lan
+ option target 1.1.1.0
+ option netmask 255.255.255.0
+ option gateway 192.168.1.1
+\end{Verbatim}
+
+The name for the route section is optional, the \texttt{interface}, \texttt{target} and
+\texttt{gateway} options are mandatory.
+Leaving out the \texttt{netmask} option will turn the route into a host route.
\subsubsection{Setting up the switch (currently broadcom only)}
3388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# 
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=strongswan
PKG_VERSION:=2.8.2
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.strongswan.org/
PKG_MD5SUM:=57427f5b48123851a73b10d78dd4f8d6

include $(INCLUDE_DIR)/package.mk

define Package/strongswan/Default
  TITLE:=strongSwan
  DEPENDS:=@LINUX_2_4
  URL:=http://www.strongswan.org/
endef

define Package/strongswan/Default/descritpion
 strongSwan is an IPsec implementation for Linux.
endef

define Package/strongswan
$(call Package/strongswan/Default)
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=+kmod-strongswan +libgmp @LINUX_2_4
  TITLE+= (daemon)
endef

define Package/strongswan/description
$(call Package/strongswan/Default/description)
 This package contains the strongSwan user-land daemon.
endef

define KernelPackage/strongswan
$(call Package/strongswan/Default)
  SUBMENU:=Network Support
  TITLE+= (kernel module)
  DEPENDS:=@LINUX_2_4
  FILES:=$(PKG_BUILD_DIR)/linux/net/ipsec/ipsec.$(LINUX_KMOD_SUFFIX)
  AUTOLOAD:=$(call AutoLoad,50,ipsec)
endef

define KernelPackage/strongswan/description
$(call Package/strongswan/Default/description)
 This package contains the strongSwan kernel module.
endef

PKG_MAKE_OPTS:= \
		LINUX_RELEASE="$(LINUX_RELEASE)" \
		KERNELSRC="$(LINUX_DIR)" \
		ARCH="$(LINUX_KARCH)" \
		CROSS_COMPILE="$(TARGET_CROSS)" \
		USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
		IPSECDIR="/usr/lib/ipsec" \
		INC_USRLOCAL="/usr" \

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		$(TARGET_CONFIGURE_OPTS) \
		$(PKG_MAKE_OPTS) \
		LDFLAGS="$(TARGET_LDFLAGS)" \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		programs module install
endef

define Package/strongswan/install
	$(CP) $(PKG_INSTALL_DIR)/* $(1)
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_DIR) $(1)/etc/config
	$(INSTALL_DIR) $(1)/etc/cron.tick
	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
	$(INSTALL_DIR) $(1)/etc/hotplug.d/button
	$(INSTALL_BIN) ./files/ipsec.init   $(1)/etc/init.d/ipsec
	$(INSTALL_BIN) ./files/ipsec.cron   $(1)/etc/cron.tick/ipsec-wakeup
	$(INSTALL_BIN) ./files/ipsec.iface  $(1)/etc/hotplug.d/iface/65-ipsec
	$(INSTALL_BIN) ./files/ipsec.button $(1)/etc/hotplug.d/button/65-ipsec
	$(INSTALL_DATA) ./files/ipsec.config $(1)/etc/config/ipsec
	$(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
	rm -rf $(1)/usr/share
	rm -rf $(1)/usr/man
	rm -rf $(1)/var
	rm -rf $(1)/etc/rc.d
	find $(1) -name \*.old | xargs rm -rf
endef

$(eval $(call BuildPackage,strongswan))
$(eval $(call KernelPackage,strongswan))