aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/network/config.sh
Commit message (Collapse)AuthorAgeFilesLines
* base-files: move network related scripts to a separate package to make the ↵Felix Fietkau2011-10-201-444/+0
| | | | | | transition to netifd easier git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28495 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: introduce "igmp_snooping" option to toggle IGMP ↵Jo-Philipp Wich2011-10-111-1/+3
| | | | | | snooping on bridge interfaces git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28412 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: apply network interface settings such as macaddr, mtu and ↵Felix Fietkau2011-09-241-15/+9
| | | | | | txqueuelen in prepare_interface instead of setup_interface. setting the mtu after the interface is up is unreliable on some drivers such as gianfar git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28297 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: make ip matching in dns add/remove functions more ↵Jo-Philipp Wich2011-09-231-2/+2
| | | | | | explicit, avoids overmatching pairs like 1.2.3.35 and 1.2.3.3 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28291 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Fix IPv6 address and route adding on aliases with no ↵Vasilis Tsiligiannis2011-09-141-2/+2
| | | | | | IPv4 address configured git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28241 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Revert "[package] base-files: Add support for assigning multiple IPv6 ↵Vasilis Tsiligiannis2011-09-141-9/+8
| | | | | | | | addresses on an interface" Multiple IPv6 addresses should be handled with alias sections git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28240 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Add support for assigning multiple IPv6 addresses on ↵Vasilis Tsiligiannis2011-09-121-8/+9
| | | | | | an interface git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28222 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement a generic mechanism to map per-interface ↵Jo-Philipp Wich2011-07-171-0/+20
| | | | | | | | | | | | sysctls to uci. - option ipv4_xyz is mapped to /proc/sys/net/ipv4/{conf,neigh}/xyz - option ipv6_xyz is mapped to /proc/sys/net/ipv6/{conf,neigh}/xyz This allows e.g. "option ipv6_proxy_ndp 1" to enable NDP proxying on wan. Fixes ticket #8699. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27653 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: use uci_toggle_state() to prevent unwanted aggregation ↵Jo-Philipp Wich2011-07-151-5/+5
| | | | | | of state vars (#9711) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27616 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: assume a default ipv6 prefix size of /64, thats what ↵Jo-Philipp Wich2011-06-091-1/+1
| | | | | | the majority of users mean when they just specify an ip address git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27147 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: if an ip6addr without a prefix is given, assume /128 - ↵Jo-Philipp Wich2011-06-091-0/+5
| | | | | | otherwise the busybox utilities will interpret it as /0 and create an invalid default route git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27145 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix error reporting for unsupported protocols on ↵Jo-Philipp Wich2011-06-071-1/+1
| | | | | | virtual interfaces git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27132 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: make the MAC address of bridge interfaces sticky to avoid ARP ↵Felix Fietkau2011-05-241-1/+2
| | | | | | issues on wifi re-configuration git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26990 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: bridge config, avoid having a random ipv6 ll addressFelix Fietkau2011-04-031-1/+1
| | | | | | | | | | | | | | | | | | So far, we are setting the bridge interface up before having added any bridge interface ports. This results in the bridge assigning a random mac address to its bridge interface and therefore IPv6 assigning a matching link local address to the bridge interface as soon as the bridge interface is up. After adding the first bridge port interface, the bridge's mac address is reset correctly, however the IPv6 link local address stays the same. This commit ensures that we are at least having the IPv6 link local address of the first interface added to the bridge instead of a random one. Signed-off-by: Linus Lüssing <linus.luessing@web.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26426 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-file: cleanup ipv6 enabling in unbridgeJo-Philipp Wich2011-02-121-3/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25473 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2011-02-111-5/+2
| | | | | | | | | - properly disable IPv6 on bridge ports - introduce accept_ra option, defaults to true for dhcp interfaces, false for others - introduce send_rs option, defaults to true for static interfaces, false for others git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25454 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix a typo in processing of additional dhcp request optsJo-Philipp Wich2011-01-291-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25239 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix handling of dhcp "reqopts" optionJo-Philipp Wich2011-01-291-4/+8
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25237 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement "reqopts" parameter for dhcp interfaces to ↵Jo-Philipp Wich2010-12-221-1/+3
| | | | | | specify additional dhcp options to request git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24780 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: disable ipv6 on bridge ports, this prevents stray RA ↵Jo-Philipp Wich2010-11-301-8/+13
| | | | | | assigned and link local addresses on bridge member devices git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24194 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-file: add metric option for static and dhcp protos, this ↵Jo-Philipp Wich2010-11-171-3/+4
| | | | | | simplifies the management of multiple default routes git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24020 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add udhcpc vendorid option (#7744)Jo-Philipp Wich2010-10-061-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23279 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: kill possibly existing udhcpc instance when bringing ↵Jo-Philipp Wich2010-09-191-39/+26
| | | | | | | | | | up a dhcp iface, utilize service_kill() in dhcp shutdown. Based on patch by Stijn Tintel. Possibly related to #7314 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23092 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: r22444 caused interfaces to remain down if the macaddr ↵Jo-Philipp Wich2010-08-021-2/+2
| | | | | | option is used, fix it. Also localize the txqueuelen option variable git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22467 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] add txqueuelen option, patch from Roberto RiggioFlorian Fainelli2010-07-311-1/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22444 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: introduce option "broadcast" for proto=dhcp interface ↵Jo-Philipp Wich2010-06-021-2/+11
| | | | | | to enable the broadcast flag in DHCP requests, required by certain providers git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21661 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: remove IPv6 LL addr from interfaces before adding them ↵Jo-Philipp Wich2010-06-021-0/+9
| | | | | | to a bridge git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21659 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2010-06-021-3/+22
| | | | | | | | | | | - add aliases to device by default (not ifname) - introduce option "layer" to select the target ifname to attach the alias to: - 3 use tun device (tun over bridge over device) fallback to bridge or device - 2 use bridge (bridge over device) fallback to device - 1 use device git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21655 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-file: move alias setup to route hotplug, this fixes alias ↵Jo-Philipp Wich2010-06-011-36/+16
| | | | | | sections for non-static interfaces like ppp, dhcp, 6in4 etc. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21652 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2010-05-301-15/+28
| | | | | | | | | | - use add_dns() and remove_dns() for when changing resolv.conf.auto for static or dhcp interfaces - force 0644 permissions when creating resolv.conf.auto, fixes dnsmasq permissions denied problem with pppd interfaces - revert dns servers in /sbin/ifdown - bump package revision git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21638 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: revert r21595Jo-Philipp Wich2010-05-281-2/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21597 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: bring bridge port iface down before changing the mac ↵Jo-Philipp Wich2010-05-281-0/+2
| | | | | | (#7111) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21595 3c298f89-4303-0410-b956-a3cf2f4a3e73
* when changing the mac address of a bridge interface, keep member interface ↵Felix Fietkau2010-05-271-1/+3
| | | | | | addresses in sync (patch from #7111) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21577 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add add_dns() and remove_dns() helpers to network ↵Jo-Philipp Wich2010-05-071-0/+29
| | | | | | config, useful to merge dns entries from multiple interfaces git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21391 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files, ppp: fix interface shutdownJo-Philipp Wich2010-05-061-3/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21386 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files, ppp: remove protocol specific cleanup code from ↵Jo-Philipp Wich2010-05-051-5/+22
| | | | | | /sbin/ifdown and move it to protocol stop callbacks git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21383 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix error output of brctl if bridging is not supported.Felix Fietkau2010-03-141-1/+1
| | | | | | | | | | | | The following error is displayed during network configuration on any device that has DEVICE_TYPE set to something else then router, or has brctl functionality disabled through some other method: "brctl: SIOCGIFBR: Package not installed" This is due to the unbridge function being called, which uses "brctl show" to determine if the interface is bridged. Signed-off-by: Ithamar R. Adema <ithamar.adema@team-embedded.nl> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20218 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: revert dhcp state information on ifdown and restore ↵Jo-Philipp Wich2010-02-121-0/+5
| | | | | | pre-r19530 behaviour in udhcp default.script git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19597 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-file: revert unrelated change accidentally committed in r19478Jo-Philipp Wich2010-02-011-4/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19488 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: preinit: get rid of /dev/null redirections and use ↵Jo-Philipp Wich2010-02-011-0/+4
| | | | | | grep -q where applicable git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19478 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: ensure that the ip6addr of the main interface stays ↵Jo-Philipp Wich2010-01-231-20/+28
| | | | | | the primary ip by re-adding it after alias setup is completed - patch by Alina Friedrichsen git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19303 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Add udhcpc command-line argument to request rootpathHamish Guthrie2009-12-211-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18876 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: clear ip addresses on interfaces that are about to be ↵Jo-Philipp Wich2009-09-161-0/+2
| | | | | | added to a bridge git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17596 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Revert "fix nonhotpluggable networks not being brought up. Closes #2781" ↵Felix Fietkau2009-09-091-1/+0
| | | | | | (r17527) until we've solved the race conditions it creates git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17544 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix nonhotpluggable networks not being brought up. Closes #2781Travis Kemen2009-09-061-0/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17527 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: move ipv6 module loading from setup_interface() to ↵Jo-Philipp Wich2009-08-101-9/+0
| | | | | | addif() in the hotplug call, this ensures that ipv6 is loaded before any interfaces or aliases with ip6addr option are configured (#5356) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17217 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: some /lib/network/config.sh refactoringFelix Fietkau2009-08-071-25/+38
| | | | | | | | | | | * Localize a lot more variables than before. * Do stuff or localize variables at later points or inner blocks so less commands are executed in some cases. * Use the default option of config_get where it makes sense. Signed-off-by: Malte S. Stretz <mss@apache.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17160 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: ensure that ipv6 is loaded if interfaces have an ↵Jo-Philipp Wich2009-08-041-12/+21
| | | | | | ip6addr defined, clean trailing whitespace, bump pkg revision (#5356) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17118 3c298f89-4303-0410-b956-a3cf2f4a3e73
* network: prevent unnecessary interface down/up cycles if no mac address ↵Felix Fietkau2009-06-011-2/+3
| | | | | | change is requested git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16269 3c298f89-4303-0410-b956-a3cf2f4a3e73
* network: do not unnecessarily touch interfaces configured as proto=none; ↵Felix Fietkau2009-06-011-2/+11
| | | | | | bring down old aliases before setting up new ones git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16266 3c298f89-4303-0410-b956-a3cf2f4a3e73