Commit Graph

632 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Jo-Philipp Wich 2daab45cae firewall3: drop support for automatic NOTRACK rules
Update to current HEAD in order to drop automatic generation of per-zone
NOTRACK rules.

The NOTRACK rules used to provide a little performance improvement but the
later introduction of the netfilter conntrack cache made those rules largely
unnecessary. Additionally, those rules caused various issues which broke
stateful firewalling in some scenarios.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 4da8bde638 netifd: update to the latest version
Fixes config reload on bridge MAC address changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 113544dccf firewall: update to fix FS#31, FS#73, FS#154, FS#248
Update to latest Git head in order to import several fixes and enhancements.

- Disable drop invalid by default (FS#73, FS#154)

  Instead of dropping packets with conntrack state INVALID, only allow streams
  with explicit NEW or UNTRACKED conntrack state.

  This change gives user defined rules the chance to accept traffic like ICMPv6
  multicast which would be filtered away by the very early ctstate INVALID drop
  rule otherwise.

  The old behaviour can be restored by explicitely setting "drop_invalid" to 1
  in the global firewall config section.

- Fix re-initialization of loadable iptables extensions on musl (FS#31)

  Since musl does not implement actual dlclose() semantics, it is impossible to
  re-run initializers on subsequent dlopen() calls.

  The firewall3 executable now intercepts the extension registration calls
  instead in order to be able to re-call them when needed.

  This also allowed us to switch to libxtables' builtin extension loader as a
  positive side-effect.

- Fix masquerade rules for multiple negated IP addresses (FS#248)

  When building MASQUERADE rules for zones which specify multiple negated
  addresses in masq_src or masq_dest, emit -j RETURN rules which jump out of
  the masquerading chain instead of creating multiple rules with inverted "-s"
  arguments.

- Tag own rules using comments

  Instead of relying on the nonstandard xt_id match, use the xt_comment match
  to mark own rules. Existing comments are prefixed with "!fw3: " while
  uncommented rules are marked with a sole "!fw3" string.

  This allows removing the xt_id match entirely in a later commit.

- Make missing ubus connection nonfatal

  Technically, firewall3 is able to operate without ubus just fine as long as
  the zones are declared using "option device" or "option subnet" instead of
  "option network" so do not abort execution if ubus could not be connected or
  of no network namespace is exported in ubus.

  This allows running firewall3 on ordinary Linux systems.

- Fix conntrack requirement detection for indirectly connected zones

  The current code fails to apply the conntrack requirement flag recursively to
  zones, leading to stray NOTRACK rules which break conntrack based traffic
  policing.

  Change the implementation to iteratively reapply the conntrack fixup logic
  until no more zones had been changed in order to ensure that all directly and
  indirectly connected zones receive the conntrack requirement flag.

- Add support for iptables 1.6.x

  Adds support for the xtables version 11 api in order to allow building
  against iptables 1.6.x

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
John Crispin 83ece71d63 netifd: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Hans Dedecker 311682905e ipip: Support fqdn as remote tunnel endpoint
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Baptiste Jonglez 89817614bb netifd: Request DHCP option 121 (classless route) by default
This option, defined by RFC3442, allows a DHCP server to send static
routes to a client.  But the client has to request this option
explicitely.

Static routes are useful when the gateway configured by DHCP cannot be
in the same subnet as the client.  This happens, for instance, when
using DHCP to hand out addresses in /32 subnets.

A new configuration option "classlessroute" is available, allowing
users to disable this feature (the option defaults to true).

Other DHCP clients already request this option by default (dhcpcd, for
instance, and possibly Windows).  If a DHCP server does not support
this option, it will simply ignore it.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
8 years ago
Alexandru Ardelean b8135a5b96 network/config/swconfig: drop Build/Prepare rule in favor of default one
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Daniel Engberg 9edfe7dd13 source: Switch to xz for packages and tools where possible
* Change git packages to xz
* Update mirror checksums in packages where they are used
* Change a few source tarballs to xz if available upstream
* Remove unused lines in packages we're touching, requested by jow- and blogic
* We're relying more on xz-utils so add official mirror as primary source, master site as secondary.
* Add SHA256 checksums to multiple git tarball packages

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Hans Dedecker a79f3d11b3 gre: Support fqdn as remote tunnel endpoint
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Felix Fietkau 76af0eff3f netifd: update to the latest version, adds various fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Hauke Mehrtens e59bbb6fe2 ltq-vdsl-app: update to version 4.17.18.6
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
8 years ago
Felix Fietkau c487bde9e4 netifd: update to the latest version
Adds fixes for wireless device error handling
Adds link state fixes for shell proto handlers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin 99a1888287 swconfig: revert the portmapping patches, they seem to cause a segfault
Revert "kernel/swconfig: remove obsolete portmapping feature from swconfig"

This reverts commit 675407baa4.

Revert "swconfig: remove obsolete portmapping feature"

This reverts commit fca1eb349e.

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin fca1eb349e swconfig: remove obsolete portmapping feature
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Felix Fietkau 009d6d6024 netifd: update to the latest version, adds an event handling fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau d9ff187003 netifd: update to the latest version
Emits an initial event after the first link-up of a force_link
interface. This is needed for making the dnsmasq dhcp check more
reliable

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Merlijn Wajer 4a0c4d8151 netifd: Use -x hostname:$hostname instead of -H
Passing the hostname is currently broken in since the shipped busybox includes this commit:
https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=2017d48c0d70bef8768efb42909e605ea8eb5a21

Before:

    Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is now down
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is setting up now
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: option -h NAME is deprecated, use -x hostname:NAME
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: malformed hex string 'WR150'

After:

    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): udhcpc (v1.23.2) started
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending discover...
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending select for xxx.yyy.zzz.xyz...
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Lease of xxx.yyy.zzz.xyz obtained, lease time 600

Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
8 years ago
John Crispin 74766f4c4f firewall3: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Hans Dedecker 99e5bec2c6 netifd: quote vendorid and hostname variables in dhcp script
Quote hostname and vendorid variables in dhcp script so they can
hold strings having white spaces

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Daniel Gimpelevich 7385f754b1 lantiq: Correct ADSL race condition
puts br2684ctl init after ADSL init instead of before, so that the ESI
is set at the right time, and for consistency with the PTM driver.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
8 years ago
John Crispin abc346db0e package/lantiq: make lantiq kernel modules work with xway_legacy
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 62dc9831d3 package/*: update git urls for project repos
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Jo-Philipp Wich dd182011e1 swconfig: improve failure reporting
Report the translated error to the user if a get/set netlink operation failed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 754565a84b netifd: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Gimpelevich 96ad827e17 lantiq: fix segfault inside ltq-adsl-app
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
8 years ago
John Crispin b8ab6af1a9 global: change my email address
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Hans Dedecker f9a3123bbf netifd: Remove hardcoded DHCP release option
Remove the udhcpc -R release option as sending a DHCP release
is configurable via the uci option release.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Jo-Philipp Wich 4076d863bd firewall3: fix mark rules for local traffic, fix race condition
Update to latest HEAD in order to fix MARK rule generation for local traffic,
also fix a possible race condition during firewall start.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hans Dedecker a83f049b5b netifd: Add configurable DHCP release behavior
Make sending a DHCP release configurable when the client exits allowing to clean up
IP/mac state info in intermediate devices.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Jo-Philipp Wich b04a25491f package: flag further target specific packages as nonshared
Add nonshared flag to package depending on specific targets or subtargets as
there's no guarantee otherwise that they'll be available in the shared repo.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hans Dedecker 81a5f1ac9e netifd: Send DHCP release when client exits
Let DHCP client send a release when it exists so the DHCP server is
informed the IP address is released and allowing to clean up IP/mac
state info in intermediate devices.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Jo-Philipp Wich 564330e013 netifd: fix default ip rules
Update to latest HEAD in order to remove the faulty "prelocal" ip rule leading
to unexpected policy rule precedence.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau fa5688c432 ltq-vdsl-app: do not set the reserved bit 4 in the xTSE 8
I do not know if this causes any problems now, but we should not set
it, because it is reserved. Some more recent versions of the Lantiq DSL
API driver and Control is checking if only valid bits are set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48948
8 years ago
Felix Fietkau 0d40211fad ltq-vdsl-app: make it possible to configure ADSL/VDSL independently
There are some cases where ISPs are running ATM over VDSL or PTM over
ADSL, this is not the common case, but these cases exist. Make it
possible to configure OpenWrt for such cases by adding a new config
option line_mode.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48947
8 years ago
Felix Fietkau a4b818e0bb ltq-vdsl-app: sync annex option between from ADSL package
The detailed annex option were only available in the danube DSL app
including the activation of G.992.2 Annex A (ADSL Lite). This is now
also added to the vdsl app for the vrx200.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48946
8 years ago
Felix Fietkau fb50282a62 ltq-adsl-app: sync annex option between from VDSL package
The adsl control app missed the activation of annex M and annex L in
the Annex A part, this now activates everything the firmware supports.
In Annex L type only the wide US (Mask1) was activated, now also the
narrow US (Mask2) version gets activated.
In addition annex J was also added.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48945
8 years ago
Felix Fietkau a5a8ffb0b6 ltq-vdsl-app: make the dsl_control application stop cleanly
I am not calling dsl_cmd because I want to ignore the lock, quit
should also be send when someone else is accessing it. I saw that some
other call was stuck here and all following calls were stuck in the
dsl_cmd lock.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48943
8 years ago
Felix Fietkau a937e160c8 ltq-vdsl-app: load the vrx200 firmware or patch it
This checks for the VRX firmware provided in the OpenWrt package.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48940
8 years ago
Jo-Philipp Wich dab37abc4d netifd: fix build error
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48920
8 years ago
Jo-Philipp Wich 81399345fe netifd: fix VTI ikey/okey endianess
Ensure that ikey and okey are sent in network byte order to the kernel.
Also don't mangle external IP addrs and routes when reconfiguring iinterfaces.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48919
8 years ago
John Crispin f94d2ec90f ltq-vdsl-app: Enable T1.413 in Annex A xTSE set
Before r47933 Bit 1 (first bit) of xTSE Octet 1 (first octet) defaulted
to 1, which allowed T1.413 to operate.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>

SVN-Revision: 48763
8 years ago
John Crispin 8c7aa9b6e1 vti: fix kmod dependencies
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

SVN-Revision: 48704
8 years ago
Rafał Miłecki 6219b3deae swconfig: support setting SWITCH_TYPE_LINK attributes
Supported syntax is inspired by ethtool. Example usages:
swconfig dev switch0 port 2 set link "duplex half speed 100"
swconfig dev switch0 port 2 set link "autoneg on"

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48624
8 years ago
Felix Fietkau b3c9321b9e gre: Support multicast configurable gre interfaces
UCI paramater multicast is added which allows to toggle multicast support on gre interfaces.
By default multicast support is enabled as gre tunnels are often used in combination with
routing protocols using multicast.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Nick Podolak <nicholas.podolak@dtechlabs.com>

SVN-Revision: 48596
8 years ago
Felix Fietkau 208b3098f0 netifd: update to the latest version, adds many fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48595
8 years ago
Jo-Philipp Wich 6064710b90 firewall: drop invalid by default, remove chain indirection, fix invert flags (#21738)
* Enable drop_invalid by default to catch unnatted packets (#21738)
* Fix processing of inversions for -i, -o, -s, -d and -p flags
* Remove delegate_* chain indirection but rely on xt_id to identify own rules

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48551
8 years ago
Felix Fietkau fe2007bb07 ltq-vdsl-app: mask out VDSL bits when ATM is selected, fixes compatibility issues with some DSLAMs
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48457
8 years ago
Felix Fietkau 908d281beb qos-scripts: bump version
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48455
8 years ago
Felix Fietkau d3f3132057 qos-scripts: Add IPv6 support
This adds IPv6 support to qos-scripts for both tc/qdisc and the
iptables classification rules.  The tc/qdisc part is accomplished
by removing "protocol ip" from the tc command line, causing the
rule to be applied to all protocols.  The iptables part is
accomplished by adding each rule using both iptables and ip6tables.

This patch is based on previous work by Ilkka Ollakka and
Dominique Martinet.

Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48452
8 years ago
Felix Fietkau 269ab387ff qos-scripts: Allow classification by the traffic's source interface
This adds a "srciface" option that can be used on classification
rules in /etc/config/qos.  This is useful to allow prioritization
based on the local network from which the traffic originates, for
example to deprioritize traffic from a guest network.

Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48446
8 years ago
Felix Fietkau b1f1b528a1 qos-scripts: stop overriding tx queue length
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48445
8 years ago
Felix Fietkau c49bc55669 netifd: update to the latest version, adds a cosmetic fix for a wpa related variable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48397
8 years ago
Felix Fietkau 5cafb9240e qos-scripts: Fix classification of ingress traffic
Set the save-mark mask for the qos_${cg} chain to 0xff instead of
0xf0.  With the old value, the nibble that was saved would be
masked during the restore, preventing ingress traffic from being
classified.  Thanks to nbd for recommending the fix.

Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48388
8 years ago
Felix Fietkau 614ebec4d2 firewall: add CONFIG_IPV6 to PKG_CONFIG_DEPENDS to fix a rebuild error
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48315
8 years ago
Jo-Philipp Wich 5cf88bb032 netifd: fix PKG_VERSION (#21630)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48280
8 years ago
Felix Fietkau e2e8cb8347 network: add virtual tunnel interface (VTI) support
This adds support for configuring VTI interfaces within /etc/config/network.
VTI interfaces are used to create IPsec tunnel interfaces. These interfaces
may be used for routing and other purposes.

Example config:
config interface 'vti1'
	option proto 'vti'
	option mtu '1500'
	option tunlink 'wan'
	option peeraddr '192.168.5.16'
	option zone 'VPN'
	option ikey 2
	option okey 2

config interface 'vti1_static'
	option proto 'static'
	option ifname '@vti1'
	option ipaddr '192.168.7.2/24'

The options ikey and okey correspond to the fwmark value of a ipsec policy.
The may be null if you do not want fwmarks.
Also peeraddr may be 0.0.0 if you want all ESP packets go through the
interface.
Example strongswan config:
conn vti
	left=%any
	leftcert=peer2.test.der
	leftid=@peer2.test
	right=192.168.5.16
	rightid=@peer3.test
	leftsubnet=0.0.0.0/0
	rightsubnet=0.0.0.0/0
	mark=2
	auto=route

Signed-off-by: André Valentin <avalentin@marcant.net>

SVN-Revision: 48274
8 years ago
Felix Fietkau eb1ac66ce7 netifd: update to the latest version, adds VTI support and a policy routing fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48273
8 years ago
Rafał Miłecki a09e713299 swconfig: support sending SWITCH_TYPE_LINK to kernel
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48141
8 years ago
Felix Fietkau 9632c00435 firewall: move to git.openwrt.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48128
8 years ago
Felix Fietkau 9cd6162b63 packages: use OPENWRT_GIT to point at the main openwrt git repo
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48118
8 years ago
Felix Fietkau c5dfbea1e8 package/network/config/gre: ipv6 gre kmod package name was wrong
Source package gre was depending on kmod-ip6-gre, however the actual
kernel module package that is created is kmod-gre6.  Therefore
update (source) package gre for ipv6 gre support.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>

SVN-Revision: 48100
8 years ago
John Crispin dc69b89c24 ltq-vdsl-app: re-add lowlevel settings
Add back a slightly modified version of the lowlevel settings which
where removed with r46920.

In compare to the old lowlevel settings, the B43c tone is added to
tone_adsl_b and tone_adsl_bv.

If an unsupported tone value is used, the auto probing mode is used, in
compare to the fallback to tone_adsl_av and tone_vdsl_av with the old
lowlevel settings.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48054
8 years ago
John Crispin 4908088268 ltq-vdsl-app: enable G.993.5 XTSE bit by default
According to ITU-T G.997.1 Amendment 2 (04/2013) section 2.1, bit 3 of
XTSE octet 8 either allow or denies the initialization of G.993.5.

Even if the current redistributable xDSL firmware doesn't include
G.993.5 vectoring support, enable this bit by default to allow people to
get their G.993.5 line working using a custom xDSL firmware.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48053
8 years ago
John Crispin 846124f536 ltq-vdsl-app: let the driver/app probe the xtse on missing annex
r47933 revealed that the driver/app in combination with the chosen
firmware does a good job in selecting a working xtse.

Use this probing mode if no annex is specified.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48052
8 years ago
John Crispin 7816dffd03 ltq-vdsl-app: add/enable missing G.993.2 XTSE bits
This patch adds the missing VDSL2 bits to the annex specific XTSE (like
it should be according to the comments above the XTSE bits).

Since r47933 it's mandatory to remove the annex option to switch to
VDSL2 (only) operation mode.

As shown by ticket #21436 and a few mails I received personally, even
experienced users are not aware that they have to remove the annex
option to get their VDSL2 line working and as shown by this patch it
doesn't need to be that "complicated".

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48051
8 years ago
John Crispin 2625c5621d ltq-vdsl-app: use the final xtse format
This way we can drop the call to sed.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48050
8 years ago
John Crispin 8536afae6f swconfig: support receiving SWITCH_TYPE_LINK from kernel
When using cli, print link state the same way kernel used to do it.
This will allow kernel switching PORT_LINK from SWITCH_TYPE_STRING.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47998
9 years ago
Felix Fietkau 41aa066df9 ltq-vdsl-app: enable Annex-M support, disable unsupported Annex-A modes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47934
9 years ago
Felix Fietkau 57ccd6c9e7 ltq-vdsl-app: remove whitespace after -i, it prevents vdsl_cpe_control from parsing the XTSE bits
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47933
9 years ago
Felix Fietkau a99c78a09a netifd: update to the latest version, fixes more route table issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47897
9 years ago
Felix Fietkau 513702e658 netifd: update to the latest version, fixes reload issues on routing table changes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47893
9 years ago
Felix Fietkau be00acca5a lantiq: ltq-vdsl-app: cleanup Makefile
- CONFIG_IFX_CLI is unused, couldn't find any reference to this config variable
- use disable-feature instead of enable-feature=no
- reorder configure args to have depending args together
- remove configure args which set the default value
- group enable-model and configure args which enable or disable features that
  are covered by the feature set

The config.log contains the same values as before. The vdsl_cpe_control binary
has the same checksum as before.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47888
9 years ago
Felix Fietkau d984e3836f lantiq: ltq-vdsl-app: re-add showtime counters support
The typicial feature set doesn't include "DSL PM showtime counters support"
(INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS). This feature provides the
vdsl_cpe_control command 'pmccsg', which is used by 'dsl_control status' to get
the line uptime.

The binary size increases to 103912 byte (+4256 byte) uncompressed.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47887
9 years ago
Felix Fietkau 6fb259b6df netifd: ifup-shellscript - fix wrong usage of 'local'
this error was not visible until recent bump to
busybox 1.24.1 stable which introduced a warning message
when keyword 'local' is not used with a shell-function.

this does not change behavior and is a cosmetic cleanup.
fixes the following output:

root@box:~ ifup <interface>
/sbin/ifup: local: line 362: not in a function
/sbin/ifup: local: line 362: not in a function
/sbin/ifup: local: line 1: not in a function

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 47828
9 years ago
Felix Fietkau 7516989383 lantiq: debloat the ltq-vdsl-app binary
Use the 'typical' compile configuration instead of 'full', which most
notably excludes the soap support.

/sbin/vdsl_cpe_control shrinks down to ~50%, from 178kb(!) to 90kb.

Signed-off-by: Andre Heider <a.heider@gmail.com>

SVN-Revision: 47769
9 years ago
Felix Fietkau 435e7fb295 lantiq: move esi calls to dsl_cpe_control scripts to fix ordering wrt. loading vr9 drivers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47764
9 years ago
Felix Fietkau 59dbc9fa4e netifd: update to the latest version, fixes an issue with moving a wifi iface to a different network
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47683
9 years ago
John Crispin 11f2007895 lantiq: ltq-vdsl-app: update to version 4.16.6.3
In this upstream dsl driver app version the autoboot is deactivated activate
it again.
In addition to the update this also fixes some build warnings and makes it
use the same configure option as used in Lantiq UGW.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>

SVN-Revision: 47637
9 years ago
John Crispin 41587675ec lantiq: ltq-vdsl-app: add dsl_cpe_pipe.sh
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>

SVN-Revision: 47636
9 years ago
Felix Fietkau f5970b9472 qos-scripts: remove faulty fallback of the device variable to eth0 (#20834)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47629
9 years ago
Jo-Philipp Wich 49b3fc70e5 netifd: fix device status reporting for external interfaces
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47493
9 years ago
Felix Fietkau 96a66d683b ltq-app-vdsl: convert init script to procd, add support for switching between atm and ptm
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47485
9 years ago
Felix Fietkau e4859508be netifd: update to the latest version, contains several fixes, including one for interface ip4/ip6table for device routes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47460
9 years ago
Luka Perkov 75078acd93 cosmetic: remove trailing whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 47197
9 years ago
Felix Fietkau 38182373e0 netifd: update to the latest version, fixes spurious client isolation in unbridged AP configurations (#20574)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47053
9 years ago
Jo-Philipp Wich f30ccc8991 firewall: allow DHCPv6 traffic to/from fc00::/6 instead of fe80::/10
There is no RFC requirement that DHCPv6 servers must reply with a link local
address and some ISP servers in the wild appear to using addresses in the ULA
range to send DHCPv6 offers.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47048
9 years ago
Steven Barth 836d462b10 package: Remove dependencies to kmod-ipv6
Since r46834, IPv6 support is builtin if selected. Therefor, dependencies
on kmod-ipv6 can no longer be fulfilled, since it is not a module anymore.

Signed-off-by: Arjen de Korte <arjen+openwrt@de-korte.org>

SVN-Revision: 47022
9 years ago
Jo-Philipp Wich f2a19350fd firewall: depend on kmod-ipt-conntrack (#20542)
Our ruleset requires kernel support for conntrack state matching, therfore
depend on the require kmod. Fixes #20542.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46990
9 years ago
John Crispin 2c1d56af50 lantiq: Update to the latest DSL driver / application versions
Thanks to Sylwester Petela for testing my patch (successfully on an
ADSL connection) and for pointing out some configuration mistakes.
Others (including me) have also successfully tested this extensively
on VDSL connections.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 46920
9 years ago
Felix Fietkau ced2b641e2 base-files: set kernel.core_pattern in sysctl.conf
Move the pattern setting from netifd's service script to
/etc/sysctl.conf.  Put the timestamp component '%t' just after
executable name '%e' for more natural order from output of ls command.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 46867
9 years ago
Steven Barth eb866e413f firewall: Remove src_port from firewall.config to receive dhcpv6 replies
Seems like my second try was again whitespace broken. Sorry for the noise.

Remove src_port from firewall.config to receive dhcpv6 replies. Fixes #20295.

Signed-off-by: Anselm Eberhardt <a.eberhardt@cygnusnetworks.de>

SVN-Revision: 46842
9 years ago
Felix Fietkau 7e57d753a1 netifd: update to the latest version, fixes a WDS STA mode regression caused by multicast-to-unicast handling (#20466)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46841
9 years ago
Steven Barth e07959cade package: replace ifconfig-usage with ip
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46832
9 years ago
Felix Fietkau d4e9c8d7ef netifd: update to the latest version, adds multicast-to-unicast fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46719
9 years ago
Steven Barth 9f67c7fc8a netifd: various updates
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46718
9 years ago
Steven Barth 6831883100 firewall: fix typo in ESP rule
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46506
9 years ago
Steven Barth f6abd042c2 firewall: comply with REC-22, REC-24 of RFC 6092
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46478
9 years ago
Felix Fietkau 26d71e9b25 netifd: update to the latest version, fixes setting RPS/XPS for wlan devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46421
9 years ago
John Crispin d42b6c1afb swconfig: libsw.so should be installed into /usr/lib/
otherwise it's not picked up by toolchain:

staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_musl-1.1.10/lib/gcc/mipsel-openwrt-linux-musl/4.8.3/../../../../mipsel-openwrt-linux-musl/bin/ld: cannot find -lsw

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 46406
9 years ago
John Crispin c71ef0499b swconfig: Split libsw out of swconfig for reuse in other packages
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 46358
9 years ago
Felix Fietkau 7a04fd0e3a swconfig: swlib.c: Fix another memleak
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 46275
9 years ago
John Crispin 5da98f3478 swconfig: swlib.c: free name and description of attributes
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 46232
9 years ago
John Crispin 294907aa3a swconfig: swlib.c: free portmaps in swlib_free()
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 46231
9 years ago
John Crispin 2b9bdf4d6f swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be free'd
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 46230
9 years ago
John Crispin 08d4d4921d swconfig: swlib.c: free device name and alias
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 46229
9 years ago
Steven Barth a742fcaf3b netifd: add mtu6 option to override IPv6 MTU
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46135
9 years ago
Matteo Croce 1090df82be ltq-vdsl-app: build fix for MUSL
SVN-Revision: 46006
9 years ago
Steven Barth ebfe8d8b08 netifd: bump to latest, various fixes
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45926
9 years ago
Steven Barth e6f9641df1 netifd: fix and optimize ipv6 onlink-route handling
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45768
9 years ago
Jo-Philipp Wich 35497a0400 firewall: link iptables extensions dynamically
Use shared libipt{,4,6}ext.so libraries instead of statically linking
the userspace matches into the fw3 executable.

As a side effect the match initialization is extremely simplified
compared to the weak function pointer juggling performed before.

This also fixes the initialization of the multiport match.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45764
9 years ago
Felix Fietkau 4eeeb91661 netifd: bump to current HEAD
This introduces a new config parameter "no-proto-task" useful for
xl2tpd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 45748
9 years ago
Steven Barth 241dbffcf9 netifd: improve IPv6 onlink-route handling
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45701
9 years ago
Felix Fietkau bf84a53f9b netifd-dhcp: supply parameters to user-script
hand over parameters to user-script e.g. $1=deconfig

Signed-off-by: Leon George <leon@georgemail.de>
Signed-off-by: Christian Mehlis <christian@m3hlis.de>

SVN-Revision: 45626
9 years ago
Steven Barth d534883a52 firewall: Allow IGMP and MLD input on WAN
The WAN port should at least respond to IGMP and MLD queries as
otherwise a snooping bridge/switch might drop traffic.

RFC4890 recommends to leave IGMP and MLD unfiltered as they are always
link-scoped anyways.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>

SVN-Revision: 45613
9 years ago
Steven Barth a132313238 dhcp: add option specifying overriding custom-routes
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45594
9 years ago
Felix Fietkau fe14e2a674 netifd: update to the latest version, fixes retry when proto handlers exit without changing the state
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45550
9 years ago
Felix Fietkau a285a0a034 netifd: update to the latest version, fixes more interface device config handling issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45503
9 years ago
Felix Fietkau 6293aae9d3 netifd: update to the latest version, fixes more device config handling issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45497
9 years ago
Felix Fietkau bdd241ee29 netifd: update to the latest version, fixes issues in handling device config from interfaces
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45483
9 years ago
Felix Fietkau c909a0354a qos-scripts: drop obsolete depdendency on iptabes-mod-filter (#19506)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45482
9 years ago
Steven Barth 6b062ad848 network: shorten names of generated interfaces
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45476
9 years ago
Felix Fietkau bdb6c313de qos-scripts: remove layer7 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45425
9 years ago
John Crispin dcdd5c1ecb netifd: Interface last error support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45334
9 years ago
Steven Barth 4a1f19e15d netifd: revert policy routing (broke some custom user rules)
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45185
9 years ago
Steven Barth edf9b7a2a5 netifd: add metric argument for ipv4 proto routes
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45182
9 years ago
Steven Barth 7edbd6b4d7 netifd: adjust default local policy rules
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45059
9 years ago
John Crispin 242e37454a netifd: update to latest git HEAD
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45020
9 years ago
Felix Fietkau 7cacd6bdb6 netifd: fix default initialization of RPS/XPS
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44944
9 years ago
Felix Fietkau 78692595e7 netifd: update to the latest version, adds support for configuring RPS/XPS (enabled by default where available)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44943
9 years ago
Steven Barth 8cfe2fb30b netifd: fix ipv6 route regression
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44919
9 years ago
Steven Barth b27efd6e07 netifd: device update fixes, improvements in policy routing
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44899
9 years ago
Jo-Philipp Wich eb7f470e7b netifd: dhcp: install host route to gateway (#19182)
Certain DHCP servers push a gateway outside of the assigned interface subnet,
to support those situations install a host route towards the gateway.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44789
9 years ago
John Crispin 59c20174f8 json-c: update to 0.12 and bump all depending services
Version 0.12 deprecates json_object_object_get and moves the header files around

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44657
9 years ago
Steven Barth 0f365e4cb9 firewall: fix some more null-pointer accesses
thanks to Hans Dedecker

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44540
9 years ago
Steven Barth c975f83cc2 netifd: various device config / event fixes (thx Hans Dedecker)
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44480
9 years ago
Felix Fietkau 00d422fc60 netifd: update to the latest version, reverts a commit causing MTU issues (fixes #18869)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44461
9 years ago
Steven Barth 6ee8d1f178 netifd: fix device config handling and add some config options
Thanks to Hans Dedecker

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44331
9 years ago
Felix Fietkau ea638e4eba netifd: fix a regression with some VLAN configurations introduced in the last update
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44098
9 years ago
Felix Fietkau 18d4b8783c netifd: do not stop service on shutdown, only call ifdown
Also add a small delay, like on restart

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44096
9 years ago
Felix Fietkau c71cf8e6e4 netifd: update to the latest version, fixes bridge reload (#18351) and device config issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44093
9 years ago
Jo-Philipp Wich 1f6411e436 netifd: store additional DHCP lease information
Extend the DHCPv4 handler script to store additional information from the
DHCP lease in the per-interface data object.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44092
9 years ago
Steven Barth 99fa07d07e netifd: add option to customize IPv6 interface identifiers (thx Hans Dedecker)
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44050
9 years ago
Jo-Philipp Wich a6a142caf6 firewall: respect src_dip option for reflection (#18544)
Also fix wrong IPv4 netmask calculation on x86-64, thanks Ulrich Weber.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43874
9 years ago
Jo-Philipp Wich 7f6af5ddc9 qos-scripts: bump PKG_REVISION and copyright year
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43860
9 years ago
Steven Barth 4746ffd7a6 netifd: minor fixes, add mldversion option
thanks to Hans Dedecker

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43771
10 years ago
Steven Barth f565e0598d netifd: Set source IP for DHCP static routes as well
Commit ce92f6650bd8a86db04c7a6cbb58e7fdb200a7e6 added source IP support
for DHCP default routes. As a side effect of this change the default route
could be present twice in netifd (once with source IP set and once with
source IP unset) if it was sent by the server in both the router and static
route options. Therefore add source IP support as well for static routes as this
case was not considered. Additional remove unused parameter type.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 43645
10 years ago
Steven Barth 1f4ddec7f2 netifd: several fixes and optimizations
Thanks to Hans Dedecker and Kristian Evensen

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43583
10 years ago
Steven Barth 15d67644f1 This patch depends on "Pass source address to proto_add_ipv4_route".
I have not found a scenario that would break by setting the source address on
default, but please let me know if any special considerations should be taken.

Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com>

SVN-Revision: 43582
10 years ago
Felix Fietkau 62c33d9f62 qos-scripts: fix insmod commands
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43562
10 years ago
Steven Barth 200c30b426 netifd: correctly handle source-parameter for IPv4 routes
Thanks to Kristian Evensen

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43400
10 years ago
Felix Fietkau 185172bdd3 netifd: update to the latest version, fixes issues when changing a bridge member from a vlan to its base device (#18351)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43346
10 years ago
Steven Barth 047f1c8dca netifd: fix race, expose config options
Thanks to Hans Dedecker

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43299
10 years ago
Steven Barth 990b501ec4 netifd: fix default ORO-setting for 6rd
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43214
10 years ago
John Crispin 74a3a77bcd license info - revert r43155
turns out that r43155 adds duplicate info.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43167
10 years ago
John Crispin c10d97484a Add more license tags with SPDX identifiers
Note, that licensing stuff is a nightmare: many packages does not clearly
state their licenses, and often multiple source files are simply copied
together - each with different licensing information in the file headers.

I tried hard to ensure, that the license information extracted into the OpenWRT's
makefiles fit the "spirit" of the packages, e.g. such small packages which
come without a dedicated source archive "inherites" the OpenWRT's own license
in my opinion.

However, I can not garantee that I always picked the correct information
and/or did not miss license information.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43155
10 years ago
Steven Barth bec9d38fa4 Add a few SPDX tags
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43151
10 years ago
John Crispin 26e308019d ltq-vdsl-app: use VDSL tone-setup if annex is unset
I had to use a VDSL-only tone-setup to get show-time.
Handle this in uci by checking if annex is unset.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 43114
10 years ago
Felix Fietkau 3cefd0af7d netifd: update to the latest version, fixes a use-after-free bug
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43044
10 years ago
Felix Fietkau 188eb85f5b netifd: update to the latest version, fixes link status handling on VLAN devices (#18106)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43007
10 years ago
John Crispin 20940138ac scripts: fix wrong usage of '==' operator
[base-files] shell-scripting: fix wrong usage of '==' operator

normally the '==' is used for invoking a regex parser and is a bashism.
all of the fixes just want to compare a string. the used busybox-ash
will silently "ignore" this mistake, but make it portable/clean at least.

this patch does not change the behavior/logic of the scripts.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42911
10 years ago
Steven Barth 9106cc0af9 netifd: Make mtu configurable of dynamic 6rd tunnel interface
Patch allows to configure the mtu of the dynamic 6rd tunnel interface when created by dhcp script.
In some setups it's desirable to have config control over the 6rd tunnel mtu to maximize the traffic throughput

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42871
10 years ago
Steven Barth 36b05bbed3 IPIP: IP in IP package support
The package supports IP in IP by registering the ipip protocol handler

Following options are configurable
    -peeraddr (IPv4 remote address)
    -ipaddr (IPv4 local address)
    -ttl (time to live of encapsulating packet)
    -tos (type of service of encapsulating packet either inherit (outer header inherits the value of the inner header) or hex value)
    -df (don't fragment flag of encapsulating packet)
    -mtu (IPIP tunnel mtu)
    -tunlink (bind tunnel to this interface)
    -zone (firewall zone to which the IPIP tunnel will be added)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42746
10 years ago
Steven Barth 73179a188c netifd: fix an error message during network shutdown
When 'wifi down' is called by /etc/init.d/network, it is run from
stop_service( ). This function is in turn invoked from stop( ).
stop( ) messes up the order by first procd_kill-ing the network
settings, then calling wifi to down the wifi networking
interfaces. By redefining stop( ) instead, the proper order is
restored.

Signed-off-by: Michel Stam <m.stam@fugro.nl>

SVN-Revision: 42745
10 years ago
Steven Barth 1c166058df netifd: add IPIP tunnel support (thx Hans Dedecker)
SVN-Revision: 42744
10 years ago
Steven Barth 6e2262898f GRE: Tos support
Tos support is added as a generic grev4/grev6 parameter which can have the following values :
     -inherit (outer header inherits the tos value of the inner header)
     -hex value

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42700
10 years ago
Steven Barth 30912c5d81 netifd: add support for promisc and GRE tos option
SVN-Revision: 42699
10 years ago
Jo-Philipp Wich 68147004e2 firewall: allow '*' as synonym for any / all in family and proto options
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42620
10 years ago
Jo-Philipp Wich 36e2179c10 firewall: fix heap corruption in fw3_bitlen2netmask() with IPv6 addresses
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42610
10 years ago
Jo-Philipp Wich cbf50a0ffd firewall: fix invalid memory access when processing /128 IPv6 addresses from ubus, properly emit REDIRECT rules for local port forwards
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42604
10 years ago
John Crispin 50d313f409 lantiq: revert vr9 driver update as it causes problems
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42556
10 years ago
Felix Fietkau 8d699086c3 qos-scripts: disable fq_codel ecn by default to improve compatibility
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42479
10 years ago
John Crispin e9dab2de72 lantiq: update to a newer versions of the vr9 drivers
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42478
10 years ago
Steven Barth bd74df01b1 netifd: work-around kernel IPv6 on-link route issue
SVN-Revision: 42439
10 years ago
Felix Fietkau 008c7a9e5a netifd: update to the latest version, adds interface cleanup fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42345
10 years ago
Felix Fietkau ba62bcbf24 netifd: update to the latest version, fixes proto-shell teardown after renew
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42344
10 years ago
John Crispin 2ae05c57f8 package/*: remove useless explicit set of function returncode
somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.

myfunction()
{
	fire_command

	return $?
}

a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:

http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42278
10 years ago
John Crispin b9ea44f947 firewall: the firewall did not start properly on boot
https://dev.openwrt.org/ticket/17593

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42233
10 years ago
Steven Barth 92ef017054 netifd: assign ipv6-prefixes with length <64 with /64 on-link routes
SVN-Revision: 42161
10 years ago
Jo-Philipp Wich aa9e69908e firewall: fix potential NULL pointer access
Properly skip struct ifaddr entries with NULL ifa_addr, thanks Kostas Papadopoulos for reporting.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42138
10 years ago
Jo-Philipp Wich fa37594f50 firewall: implement selective conntrack flushing (#10225)
Utilize the new selective conntrack flushing facility to clear
out active conntrack entries referring to old IP addresses after
a firewall reload.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42114
10 years ago
Steven Barth b95b4ede4c netifd: unblock some proto shell actions in teardown state
SVN-Revision: 42032
10 years ago
Steven Barth 6656292619 netifd: disable ds-lite, map & gre for old kernels
this unbreaks netifd compilation on old kernels

SVN-Revision: 42019
10 years ago
Steven Barth 1e6ab23098 netifd: minor fixes (thanks Hans Dedecker)
SVN-Revision: 42000
10 years ago
Steven Barth bc0acb9db9 gre: Change hostdependcy to remote endpoint tunnel address
Depend on the GRE tunnel peeraddr to trigger setup of the tunnel interface.
Addresses the issue reported in https://lists.openwrt.org/pipermail/openwrt-devel/2014-August/027201.html

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 41998
10 years ago
Steven Barth 7dabdbde78 gre: Generic Routing Encapsulation package support
The package supports Generic Routing Encapsulation support by registering following protocol kinds:
    -gre
    -gretap
    -grev6
    -grev6tap

Following options are valid for gre and gretap kinds:
    -ipaddr
    -peeraddr
    -df
    -mtu
    -ttl
    -tunlink
    -zone
    -ikey
    -okey
    -icsum
    -ocsum
    -iseqno
    -oseqno

The gretap kind supports additionally the network option

Following options are valid for grev6 and grev6tap kinds:
    -ip6addr
    -peer6addr
    -weakif
    -mtu
    -ttl
    -tunlink
    -zone
    -ikey
    -okey
    -icsum
    -ocsum
    -iseqno
    -oseqno

The grev6tap kind supports additionally the network option

Typical network config for a GREv4 tunnel :

config interface 'gre'
        option peeraddr '172.16.18.240'
        option mtu '1400'
        option proto 'gre'
        option tunlink 'wan'
        option zone 'tunnel'

Typical network config for a GREv4 tap tunnel :

config interface 'gretap'
        option peeraddr '195.207.5.79'
        option mtu '1400'
        option proto 'gretap'
        option zone 'tunnel'
        option tunlink 'wan'
        option network 'wlan_ap'

I added myself as maintainer for the moment; feel free to change.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 41897
10 years ago
Steven Barth e413bb0e7e netifd: fixes and GRE support (thx Hans Dedecker)
SVN-Revision: 41896
10 years ago
Steven Barth 86671615de netifd: suppress fw3 warnings in dhcp script
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 41892
10 years ago
Steven Barth 6a50e69b21 netifd: more race condition fixes in proto-shell
SVN-Revision: 41887
10 years ago
Steven Barth 7f17639742 netifd: more dynamic interface improvements
SVN-Revision: 41862
10 years ago
Felix Fietkau 76d7397bc2 netifd: fix a small issue in r41831
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41836
10 years ago
Felix Fietkau ee4f8c8b99 netifd: update to the latest version, fixes a race condition with renew/setup
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41831
10 years ago
Steven Barth ae50480d77 netifd: Fix some race-conditions in interface handling
SVN-Revision: 41825
10 years ago
Steven Barth 9231df5665 softwires: redesign dhcp(v6) provisioning
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 41823
10 years ago
Felix Fietkau 5206b2dac0 netifd: update to the latest version, enables bridge multicast querier and fixes interface reload issues with wifi
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41818
10 years ago
John Crispin 64a07e6a8b lantiq-dsl: add 2 ugly workarounds for the IB to work
the IB tries to run the enable target on all init.d scripts.
It fails when including the dsl_control helper. Check for existence
prior to the include.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41787
10 years ago
Jo-Philipp Wich 2dd087ccee firewall: implement support for abritary netmasks
Properly parse and pass arbritary netmasks to iptables, this allows
specifying ranges like '::c23f:eff:fe7a:a094/::ffff:ffff:ffff:ffff' to
match the host part of an IPv6 address regardless of the currently active
IPv6 prefix.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41760
10 years ago
Felix Fietkau 51fbfde474 netifd: update to the latest version, adds a small validation fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41731
10 years ago
Felix Fietkau 4ecb9289ef qos-scripts: convert to procd
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41730
10 years ago
Felix Fietkau 51b11ba5ea netifd: update to the latest version, enables igmp snooping by default
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41683
10 years ago
Felix Fietkau 4ef8d2e014 qos-scripts: fix ingress packet marking with ifb
Split connection mark into two parts:

The lower nibble contains the confirmed conntrack mark which is not
generated by default/reclassify rules.
The upper nibble contains the current value specified by
default/reclassify rules.

For egress, the default/reclassify value is preferred
For ingress, the connection mark is preferred

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41682
10 years ago
Jo-Philipp Wich f4781cae6d firewall: fix segfault introduced by latest update
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41558
10 years ago
Jo-Philipp Wich 8b0650838d firewall: fix regressions introduced after latest ubus rework
The commit 92281eb747b56e748b7c3d754055919c23befdd4 broke fw3_ubus_addresses() so that
no addresses where returned at all, this caused fw3 to not emit NAT reflection rules
anymore.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41556
10 years ago
Felix Fietkau a6c4ef18b7 qos-scripts: remove maxsize options and packet size based reclassify from the default config
They should be unnecessary with fq_codel, and simplifying rules helps
with performance

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41549
10 years ago
Jo-Philipp Wich b321f718c2 firewall: fix issue with parsing network options
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41491
10 years ago
Felix Fietkau 2b274eb719 firewall: update to the latest version, adds support for fetching firewall rules from procd
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41480
10 years ago
Felix Fietkau 5db42f92fd netifd: update to the latest version, fixes a crash on reload with hotplugged devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41393
10 years ago
Felix Fietkau 50c05b20cb netifd: update to the latest version, addds a few fixes and enables multicast->unicast for igmp snooping on wireless devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41390
10 years ago
Steven Barth 2ad9907cd5 firewall3: add fw3 zone function to enumerate devices
SVN-Revision: 41349
10 years ago
Steven Barth 22ffa5ef16 netifd: various routing table handling fixes
SVN-Revision: 41287
10 years ago
Jo-Philipp Wich 005884bff4 Revert "netifd: fix handling of "lookup main" for ip rules (#15315)"
The netifd fixes went to the wrong repository, revert until it is sorted out.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41283
10 years ago
Jo-Philipp Wich de51f6022f netifd: fix handling of "lookup main" for ip rules (#15315)
Reworks the handling of RT_TABLE_MAIN in system-linux.c so that ip rules
with lookup main can be properly setup.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41282
10 years ago
Steven Barth 8d177a8e78 netifd: various bugfixes (thanks Hans Dedecker)
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 41259
10 years ago
Felix Fietkau 500d3072ec netifd: use procd_add_reload_trigger
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41147
10 years ago
Felix Fietkau 3ab9651cb0 netifd: update to latest version, fixes reload issue (#16754) and adds 802.1ad support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41112
10 years ago
Steven Barth b81ebf6db1 netifd: add support for onlink-flag for routes
SVN-Revision: 41098
10 years ago
John Crispin 7a0606124a netfid: make procd watch the network.interface object for events
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41010
10 years ago
John Crispin 91de9c589c netifd: update to latest git HEAD
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41009
10 years ago
John Crispin 5a9c834a12 package: swconfig: let variable name be local
Let the first parameter of function config_get be local, because there
is a chance that config_get won't export the variable.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 41000
10 years ago
John Crispin 35d3c91c86 soloscli: upgrade to 1.04
- The package does not compile at the moment. Since there is a new
  upstream version avaiable, use this new source instead.
- Upstream has already included our both patches.
- This is only compile tested, since I do not own any test hardware.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 40940
10 years ago
John Crispin 40218343cd package: netifd: remove blank line at the end of file
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 40937
10 years ago
John Crispin 46a4f13283 qos-script: Add comments to existing rules
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 40936
10 years ago
John Crispin 9e65c01a4b qos-script: Improve usability by adding comment field to rules
It's quite unconveniet to remember which ports are used by which applications, especially for not so advanced users.
Together with luci patch (discussed on IRC) this improves qos-scripts usability.

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 40935
10 years ago
Felix Fietkau d866ee2e30 netifd: replace the sleep 5 with an ubus wait_for call to speed up init script
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40891
10 years ago
Steven Barth 5696b94b76 netifd: fix a segfault and improve ipip6 tunnel setup
SVN-Revision: 40821
10 years ago
Felix Fietkau cfbd90d2bf netifd: update to the latest version, fixes wireless setup cancellation
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40771
10 years ago
Felix Fietkau 127ce4d5ec netifd: update to latest version, fixes a regression on wds client support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40748
10 years ago
Steven Barth 0c06d76c79 netifd: Fix nested protocols going offline at reload + various route issues
Much thanks to Hans Dedecker

SVN-Revision: 40746
10 years ago
Felix Fietkau 770ec0082b netifd: update to the latest version, fixes some corner cases related to hotplug device handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40660
10 years ago
Felix Fietkau d33c6f7b80 netifd: update to the latest version, fixes a use-after-free bug on wireless config reload
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40589
10 years ago
Felix Fietkau b4532ad21e netifd: update to the latest version, fixes some route table and dynamic interface issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40572
10 years ago
Felix Fietkau b079019bd9 netifd: update to latest version, adds support for disabling interfaces
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40555
10 years ago
Felix Fietkau 3c95232ab7 netifd: update to the latest version, fixes some more issues related to l3_dev handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40529
10 years ago
Steven Barth daf69ee1da firewall: add support for nat-rules and netifd-proto-originating rules
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 40510
10 years ago
John Crispin 390e856cb2 lantiq: more vdsl related cleanups
* atm module needs to be loaded before linux-atm
* use absolute firmware paths
* extended validation
* add a script for mounting an optional firmware partition

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40460
10 years ago
Felix Fietkau 7b960069a2 netifd: switch to using git.openwrt.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40459
10 years ago
Felix Fietkau 92ab194d63 netifd: update to latest version, adds a force_link parameter to bring up an interface without active device carrier
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40456
10 years ago
Felix Fietkau a28b8ecc47 netifd: update to the latest version, fixes some reload issues with proto=static
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40449
10 years ago
Felix Fietkau 8a7a02bd2e netifd: fix a regression related to ppp + multiple updates (ipv4 + ipv6)
Fixes #15504

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40443
10 years ago
John Crispin eebc673f1e lantiq: move the dsl-modem config to network.@dsl-modem[-1]
make sure uci_defaults generates a proper uci config for the v/adsl modem

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40439
10 years ago
John Crispin 8bfe9acecf lantiq: vdsl init.d script should auto start
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40438
10 years ago
John Crispin 76e873a289 lantiq: cleanup vdsl driver bringup
config interface 'wan'
	# a, b, j
	option annex b
	# a, b, av, bv
	option tone b
	# vdsl.bin
	option firmware
	# atm, ptm
	option xfer_mode atm

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40437
10 years ago
Felix Fietkau 255546bbfd netifd: update to the latest version, fixes a l3_dev handling regression leading to a crash
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40414
10 years ago
Felix Fietkau dca014db76 netifd: Add renew handler for proto dhcp
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 40385
10 years ago
Felix Fietkau 0dd2d18400 netifd: update to latest version, fixes issues when l3 interface changes on reload (e.g. ppp -> dhcp/static)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40384
10 years ago
John Crispin f464b7d176 lantiq: cleanup the dsl control scripts
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40381
10 years ago
John Crispin c7168b64ef dhcp: Fix broadcast parameter validation support, remove unused netmask parameter
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 40332
10 years ago
John Crispin 1335853ae5 ltq-vdsl: add led status reporting
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40322
10 years ago
Steven Barth 0555ebf66d 6rd / ds-lite: make the firewall-zones of nested-protocols configurable
SVN-Revision: 40020
10 years ago
Steven Barth 2a893c2057 dhcp: send 6rd-ORO when expecting 6rd-information
SVN-Revision: 40019
10 years ago