summaryrefslogtreecommitdiff
path: root/proto.c
Commit message (Collapse)AuthorAgeFilesLines
* proto: fix logic inversion in previous commitKevin Darbyshire-Bryant2018-12-171-1/+1
| | | | | | | | Rogue ! effectively disabled the ipv6 multicast check. Fix cd089c52 Why is it always the simple changes that catch you out? Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* proto: Support class-e addressing in netifdDave Taht2018-12-161-5/+1
| | | | | | Signed-off-by: Dave Taht <dave.taht@gmail.com> Acked-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Acked-by: Jo-Philipp Wich <jo@mein.io>
* proto: allow dumping protocol handlers without config_paramsOlof Sivertsson2018-01-031-1/+1
| | | | | | | | | | When ubus invokes proto_dump_handlers, and a struct proto_handler has been added with a NULL config_params, a segmentation fault occurs. Avoid this segmentation fault by checking for a NULL config_params before further access. Signed-off-by: Olof Sivertsson <olof.sivertsson@zenterio.com>
* proto: add point-to-point IPv4 address config support (FS#1037)Hans Dedecker2017-10-181-6/+19
| | | | | | | | | | | | Add config support support for point-to-point IPv4 addresses by providing the uci parameter ptpaddr. This allows to support a gateway being in a different subnet than the assigned IP by modeling the local IP having a point-to-point address. This is similar to the point-to-point IPv4 address support already present for the protocol handlers. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
* proto: allow configuring deprecated static IPv6 addressesMatthias Schiffer2016-12-241-5/+14
| | | | | | | | | Add a new boolean attribute ip6deprecated to the static protocol which can be used to mark IPv6 addresses as deprecated (i.e., set the preferred lifetime to 0). This is useful to configure addresses that may be used for incoming, but not for outgoing connections unless bound explicitly. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* utils: Move IP address validation to parse_addr functionHans Dedecker2016-08-111-5/+15
| | | | | | | | | | | Commit 7a51f23e adds IP address validation in the function parse_ip_and_netmask; however the added check is too restrictive as the function is used on several places resulting into the problem multicast routes cannot be added anymore via UCI. Therefore move the IP host address validation to the function parse_addr so experimantal/multicast addresses cannot be added as a host IP address while multicast routes can be added again. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* proto: Display proto flags when dumping the protocol handlers in ubusHans Dedecker2016-08-111-0/+7
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* proto: Fix possible segfaultsHans Dedecker2016-02-011-0/+9
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* proto: Fix possible buffer overflow due to non null terminated stringHans Dedecker2016-02-011-1/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Interface last error supportHans Dedecker2015-04-031-1/+5
| | | | | | | | | | | | | | Adds interface last error support which preserves the last reported error reported by the protocol handler till the interface is up; e.g. survives network reload and interface restarts. This is mainly usefull for tracking down why an interface fails to establish; eg auth failure/traffic limit for PPP interfaces Protocol handlers register last error support by setting lasterror=1 in the proto_init function Signed-off-by: Johan Peeters <johan.peeters111@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Apply interface metric on configured interface gateway parametersHans Dedecker2014-05-091-0/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Reload proto on topology changeHelmut Schaa2014-03-211-0/+3
| | | | | | | | | | Introduce a new device event "topology change" that gets signaled by bridges on adding/removing members. On "topology changes" the proto handlers are requested to "renew" which is most useful for DHCP. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
* add validation rules to proto staticJohn Crispin2014-02-171-0/+11
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* get_proto_handlers now also dumps the validation infoJohn Crispin2014-02-171-0/+10
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* IPv6: add class support to regular IPv6 addressesSteven Barth2013-11-271-0/+5
|
* config: use the new uci_blob library codeFelix Fietkau2013-06-101-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* IPv6: reorganize prefix assignmentSteven Barth2013-05-301-1/+4
| | | | | * put parameters in a more suitable place * add support for prefix classes
* IPv6: fix wrap-arounds in address lifetimesSteven Barth2013-05-281-11/+14
|
* Add option to define target routing table for protocol routes.Steven Barth2013-05-171-2/+3
| | | | | | This unifies source-routing for both IPv6 and IPv4 (default off). Based on a patch by Kristian Evensen
* IPv6: Use source-routing to allow multi-wanSteven Barth2013-05-111-0/+6
|
* IPv6: Use key=val format for prefix optionsSteven Barth2013-05-081-10/+21
|
* fix route sorting orderFelix Fietkau2013-04-051-1/+1
| | | | | | | | | | New sorting order: - prefix length (descending) - metric (ascending) - flags - target address Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Add myself to header for IPv6 workSteven Barth2013-04-051-0/+1
|
* Rewrite IPv6 prefix assignmentSteven Barth2013-04-031-32/+19
|
* proto: default to 128 instead of the "netmask" option for ipv6 addressesFelix Fietkau2013-02-101-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Improved IPv6 featuresetSteven Barth2013-02-011-0/+30
| | | | | | | * Fix reloading of ula-prefixes * Added support for temporary addresses and routes * Added support for offlink addresses * Improved status-output for assigned prefixes
* remove commented out TODO itemsFelix Fietkau2013-01-151-19/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Initial IPv6 prefix supportSteven Barth2013-01-151-1/+112
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Move IP address parsing functions to utils.Stéphan Kochen2012-06-181-60/+0
| | | | | | | | | This is a patch series against the netifd repository. This first patch moves some previously static functions to utils, so that the follow up patch may use them from system-linux.c. Signed-off-by: Stéphan Kochen <stephan@kochen.nl>
* add an ubus method for dumping available protocol handlersFelix Fietkau2012-05-311-0/+13
|
* move dns server/search list parsing to interface core to support peerdns=0 + ↵Felix Fietkau2012-05-191-17/+0
| | | | static entries
* parse point to point ip addressesFelix Fietkau2012-05-141-2/+8
|
* proto-shell: refactor code to allow specifying per-address broadcast option ↵Felix Fietkau2012-05-141-21/+96
| | | | for ipv4
* drop broadcast/netmask parsing from proto_apply_ip_settingsFelix Fietkau2012-05-131-18/+2
|
* split applying static proto setting from handler settingsFelix Fietkau2012-05-131-0/+67
|
* add copyright headersFelix Fietkau2012-05-041-0/+13
|
* include route/address flags in vlist comparisonFelix Fietkau2012-04-291-2/+2
|
* always create device routesFelix Fietkau2012-03-151-1/+1
|
* simplify vlist, move avl key handling to vlist_add()Felix Fietkau2012-03-041-2/+2
|
* minor cleanupFelix Fietkau2012-02-261-16/+17
|
* parse and use the broadcast optionFelix Fietkau2012-02-261-2/+11
|
* move broadcast address handling to the coreFelix Fietkau2012-02-261-5/+14
|
* make proto_parse_ip_addr_string() staticFelix Fietkau2012-02-261-1/+1
|
* proto: move the dns search option handling to the coreFelix Fietkau2012-02-261-0/+5
|
* proto: add an option for specifying external addresses using ↵Felix Fietkau2012-02-261-6/+13
| | | | proto_apply_ip_settings()
* move static address setup to proto.c in preparation for unifying it with the ↵Felix Fietkau2012-02-261-0/+136
| | | | proto-shell code doing similar things
* make sure iface->proto_handler is always initializedFelix Fietkau2012-01-241-11/+8
|
* ensure that iface->proto_handler gets initializedFelix Fietkau2011-10-261-3/+6
|
* proto-shell: allow passing netmask in ip address formatFelix Fietkau2011-10-141-7/+31
|
* fix proto events for immediate proto handlersFelix Fietkau2011-10-071-3/+3
|