summaryrefslogtreecommitdiffhomepage
path: root/proto.c
AgeCommit message (Collapse)Author
2018-12-17proto: fix logic inversion in previous commitKevin Darbyshire-Bryant
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>
2018-12-16proto: Support class-e addressing in netifdDave Taht
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>
2018-01-03proto: allow dumping protocol handlers without config_paramsOlof Sivertsson
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>
2017-10-18proto: add point-to-point IPv4 address config support (FS#1037)Hans Dedecker
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>
2016-12-24proto: allow configuring deprecated static IPv6 addressesMatthias Schiffer
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>
2016-08-11utils: Move IP address validation to parse_addr functionHans Dedecker
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>
2016-08-11proto: Display proto flags when dumping the protocol handlers in ubusHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-02-01proto: Fix possible segfaultsHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-02-01proto: Fix possible buffer overflow due to non null terminated stringHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-04-03netifd: Interface last error supportHans Dedecker
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>
2014-05-09netifd: Apply interface metric on configured interface gateway parametersHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-03-21netifd: Reload proto on topology changeHelmut Schaa
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>
2014-02-17add validation rules to proto staticJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17get_proto_handlers now also dumps the validation infoJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-27IPv6: add class support to regular IPv6 addressesSteven Barth
2013-06-10config: use the new uci_blob library codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-05-30IPv6: reorganize prefix assignmentSteven Barth
* put parameters in a more suitable place * add support for prefix classes
2013-05-28IPv6: fix wrap-arounds in address lifetimesSteven Barth
2013-05-17Add option to define target routing table for protocol routes.Steven Barth
This unifies source-routing for both IPv6 and IPv4 (default off). Based on a patch by Kristian Evensen
2013-05-11IPv6: Use source-routing to allow multi-wanSteven Barth
2013-05-08IPv6: Use key=val format for prefix optionsSteven Barth
2013-04-05fix route sorting orderFelix Fietkau
New sorting order: - prefix length (descending) - metric (ascending) - flags - target address Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-04-05Add myself to header for IPv6 workSteven Barth
2013-04-03Rewrite IPv6 prefix assignmentSteven Barth
2013-02-10proto: default to 128 instead of the "netmask" option for ipv6 addressesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-01Improved IPv6 featuresetSteven Barth
* Fix reloading of ula-prefixes * Added support for temporary addresses and routes * Added support for offlink addresses * Improved status-output for assigned prefixes
2013-01-15remove commented out TODO itemsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-15Initial IPv6 prefix supportSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2012-06-18Move IP address parsing functions to utils.Stéphan Kochen
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>
2012-05-31add an ubus method for dumping available protocol handlersFelix Fietkau
2012-05-19move dns server/search list parsing to interface core to support peerdns=0 + ↵Felix Fietkau
static entries
2012-05-14parse point to point ip addressesFelix Fietkau
2012-05-14proto-shell: refactor code to allow specifying per-address broadcast option ↵Felix Fietkau
for ipv4
2012-05-13drop broadcast/netmask parsing from proto_apply_ip_settingsFelix Fietkau
2012-05-13split applying static proto setting from handler settingsFelix Fietkau
2012-05-04add copyright headersFelix Fietkau
2012-04-29include route/address flags in vlist comparisonFelix Fietkau
2012-03-15always create device routesFelix Fietkau
2012-03-04simplify vlist, move avl key handling to vlist_add()Felix Fietkau
2012-02-26minor cleanupFelix Fietkau
2012-02-26parse and use the broadcast optionFelix Fietkau
2012-02-26move broadcast address handling to the coreFelix Fietkau
2012-02-26make proto_parse_ip_addr_string() staticFelix Fietkau
2012-02-26proto: move the dns search option handling to the coreFelix Fietkau
2012-02-26proto: add an option for specifying external addresses using ↵Felix Fietkau
proto_apply_ip_settings()
2012-02-26move static address setup to proto.c in preparation for unifying it with the ↵Felix Fietkau
proto-shell code doing similar things
2012-01-24make sure iface->proto_handler is always initializedFelix Fietkau
2011-10-26ensure that iface->proto_handler gets initializedFelix Fietkau
2011-10-14proto-shell: allow passing netmask in ip address formatFelix Fietkau
2011-10-07fix proto events for immediate proto handlersFelix Fietkau