summaryrefslogtreecommitdiff
path: root/system.c
Commit message (Collapse)AuthorAgeFilesLines
* device: add support for configuring bonding devicesFelix Fietkau2021-09-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supported options: - ports: member devices - policy: bonding policy supported values: - balance-rr - active-backup - balance-xor - broadcast - 802.3ad - balance-tlb - balance-alb - xmit_hash_policy: slave selection tx hash policy supported values: - layer2 - layer2+3 - layer3+4 - encap2+3 - encap3+4 - all_ports_active: allow receiving on inactive ports - min_links: minimum number of active links - ad_actor_system: LACPDU exchange MAC address - ad_actor_sys_prio: LACPDU priority value - ad_select: 802.3ad aggregation logic supported values: - stable - bandwidth - count - lacp_rate: 802.3ad LACPDU packet rate supported values: - slow (every 30 seconds) - fast (every second) - packets_per_port: number of packets before switching ports (balance-rr mode). - lp_interval: number of seconds between sent learning packets - dynamic_lb: distribute traffic according to port load - resend_igmp: number if IGMP membership updates after failover event - num_peer_notif: number of tx unsolicited ARP/NA after failover event - primary: name of the primary port - primary_reselect: primary port reselection policy supported values: - always - better - failure - failover_mac: MAC address selection policy supported values: - none - active - follow - monitor_mode: select ARP or MII link monitor: supported values: - arp - mii - monitor_interval: link monitor update interval (msec) - arp_target: ARP monitor target IP address (list) - arp_all_targets: all targets must be reachable to consider the link valid - arp_validate: ARP validation policy supported values: - none - active - backup - all - filter - filter_active - filter_backup - use_carrier: use carrier status instead of MII ioctl result - updelay: delay before enabling port after MII link up event (msec) - downdelay: delay before disabling port after MII link down event (msec) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* netifd: vxlan: add aging and maxaddress optionsJohannes Kimmel2020-09-121-0/+2
| | | | | | | For both options the values can just be passed to the kernel. All unsigned values are accepted, thus no range checking required. Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
* netifd: vxlan: add most missing boolean optionsJohannes Kimmel2020-09-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | adds the folloing missing options: - learning - rsc - proxy - l2miss - l3miss - gbp See ip-link(3) for their meaning. still missing: - external - gpe I'm not sure how to handle them at the moment. It's unclear to me what IFLA_VXLAN_* value corresponds to the 'external' option and according to the manpage, gpe depends on it. Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
* netifd: vxlan: handle srcport rangeJohannes Kimmel2020-09-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds adds the ability to set the source port range for vxlan interfaces. By default vxlans will use a random port within the ephermal range as source ports for packets. This is done to aid scaleability within a datacenter. But with these defaults it's impossible to punch through NATs or traverese most stateful firewalls easily. One solution is to fix the srcport to the same as dstport. If only srcportmin is specified, then srcportmax is set in a way that outgoing packets will only use srcportmin. If a range is to be specified, srcportmin and srcportmax have to be specified. srcportmax is exclusive. If only srcportmax is specified, the value is ignored and defaults are used. Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
* netifd: add xfrm tunnel interface supportAndré Valentin2019-06-081-0/+9
| | | | | | | This adds support for xfrm interfaces. These interfaces can be used since linux 4.19 for IPsec traffic, like VTI interface. XFRM interfaces are less complicated compared to VTI because they need no IP tunnel endpoints.
* system-linux: enable by default ignore encaplimit for grev6 tunnelsHans Dedecker2018-10-171-0/+1
| | | | | | | | Similar as for ip6 tunnels ignore encaplimit by default as not all ISPs support the destination option header containing the tunnel encapsulation limit resulting into broken connectivity Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: make encaplimit configurable for ip6 tunnels (FS#1501)Hans Dedecker2018-05-301-0/+10
| | | | | | | | | | | | | Make encapsulation limit of IP6 tunnels configurable for the ds-lite/map proto shell handlers as not all ISPs support the destination option header containing the tunnel encapsulation limit value as reported in FS#1501. The IP6 tunnel specific setting encaplimit is parsed as a nested json data object; setting it to ignore disables the insertion of the destination option header while a value from 0 till 255 sets the tunnel encapsulation limit accordingly in the destination option header. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: VXLAN: add options to enable and disable UDP checksumsMatthias Schiffer2018-01-241-0/+2
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* system-linux: parse map-e fmrs parameters as nested data json objectHans Dedecker2017-08-291-1/+12
| | | | | | | | Parse map-e fmrs parameters IPv6 prefix, IPv4 prefix, ealen and offset as array elements nested in a data json object. At the same time remove the now obsolete TUNNEL_ATTR_FMRS tunnel attribute. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: parse 6rd specific settings as nested json data objectHans Dedecker2017-05-221-2/+10
| | | | | | | Parse 6rd specific settings prefix, relay-prefix as nested json data objects. At the same time improve 6rd error handling. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: parse vti specific settings as nested json data objectHans Dedecker2017-03-211-1/+10
| | | | | | | Parse vti specific settings ikey and okey as nested json data object. At the same time remove the now obsolete TUNNEL_ATTR_INFO attribute. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: parse gre specific settings as nested json data objectHans Dedecker2017-03-211-0/+14
| | | | | | | Parse gre specific settings ikey, okey, icsum, ocsum, iseqno and oseqno as nested json data object Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* system-linux: add VXLAN supportMatthias Schiffer2017-03-071-0/+12
| | | | | | | | | | | | VXLAN shares many attributes with the tunnel devices, so it is implemented as a new tunnel type. The 'remote' attribute can be used for an unicast peer or a multicast group. The IANA-assigned port 4789 is used by default, instead of the non-standard port Linux defaults to. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: GRE Tos supportHans Dedecker2014-09-291-0/+1
| | | | | | | | Tos support is added as a generic gre 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>
* netifd: GRE tunnel supportHans Dedecker2014-07-301-0/+1
| | | | | | Adds support for gre, gretap, grev6 and grev6tap tunnels Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Rewrite ipip6-tunnel setup to use netlink and add support for FMRsSteven Barth2014-05-211-0/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Tunnel don't fragment bit configurableHans Dedecker2013-12-081-0/+1
| | | | | | Make tunnel don't fragment bit configurable via UCI Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Apply tunnel MTUHans Dedecker2013-12-081-7/+8
| | | | | | Tunnel MTU is applied according to the tunnel MTU UCI parameter Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* config: use the new uci_blob library codeFelix Fietkau2013-06-101-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Add support for IP in IPv6 tunnels (DS-Lite)Steven Barth2013-05-131-0/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* use FD_CLOEXEC instead of tracking lists of fdsFelix Fietkau2012-10-291-0/+8
|
* Add 6rd options to tunnel spec.Stéphan Kochen2012-06-181-0/+2
| | | | | | | This patch adds support for setting the 6rd tunnel options. These are the same options normally specified with `ip tunnel 6rd ...`. Signed-off-by: Stéphan Kochen <stephan@kochen.nl>
* add copyright headersFelix Fietkau2012-05-041-0/+13
|
* system-linux: add functions for adding/removing ip tunnels (currently only ↵Felix Fietkau2012-03-151-0/+14
sit supported)