summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
AgeCommit message (Collapse)Author
2017-08-07treewide: rework IPv4 address logicHans Dedecker
Align IPv4 address logic with IPv6 by caching per interface the assigned IPv4 addresses. This allows to get rid of different ioctl calls in the DHCPv4 logic to retrieve the IPv4 address and netmask in use by an interface. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-07-03treewide: rework logic to retrieve IPv6 interface addressesHans Dedecker
Retrieve IPv6 interface addresses when the interface gets created; this allows to get rid of the IPv6 address dump logic in ndp.c. Add IPv4 address support in odhcp_ipaddr struct. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-06-29treewide: rework code to get rid of fixed IPv6 address arraysHans Dedecker
Rework code to get rid of RELAYD_MAX_PREFIXES and RELAYD_MAX_ADDRS by using dynamic IPv6 address array allocation. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-03-30rework IPv6 dns address selection (FS#635)Hans Dedecker
Don't return anymore the link local IPv6 address as DNS IPv6 address since different OS implementations (e.g. android, ...) cannot handle a link local IPv6 address as DNS address. IPv6 DNS address selection is reworked as follows : -Consider all global/ULA IPv6 address having a valid lifetime -Give preference to global/ULA IPv6 addresses being not deprecated -Give preference to ULA IPv6 addresses over IPv6 global addresses -Give preference to the IPv6 address with the longest preferred lifetime in its selected category (ULA or global) -If no global/ULA IPv6 address is present use the IPv6 link local address Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-14config: make loglevel configurable via uci (FS#481)Hans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-13odhcpd: display correct default log level in usage textHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-10ndp: deregister netlink event socket for non recoverable errorsHans Dedecker
Deregister netlink event socket in case of error different from ENOBUFS or failure to set netlink rx buffer size Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-10odhcpd: fix white space errorsHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-09ndp: harden netlink event socket error handlingHans Dedecker
Start with a netlink receive buffersize of 130k for the netlink event socket; double the netlink receive buffer size in case an ENOBUFS is reported. Also align function naming and its parameters. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-09npd: rework IPv6 relay logic (FS#396)Hans Dedecker
Rework the IPv6 relay logic to make it more robust by making use of libnltiny to process netlink messages. At the same time reimplement the IPv6 relay finite state machine to make the relay logic less error prone Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-31odhcpd: properly handle netlink messages (FS#388)Hans Dedecker
Use libnl-tiny to construct and process netlink messages when manipulating IPv6 routes and fetching IPv6 addresses. This fixes lingering netlink error messages on the netlink socket in case route deletion failed causing fetching of IPv6 addresses to be aborted and odhcpd faultly assuming no IPv6 addresses being present on the interface.
2017-01-31odhcpd: fix coding styleHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-26odhcpd: decrease default log level to LOG_INFOHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-26odhcpd: rework IPv6 interface address dumpHans Dedecker
Rework the IPv6 address dump logic to make it more robust and generate syslog traces in case of error situations Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-26odhcpd: extra syslog tracingHans Dedecker
Add extra syslog tracing for trouble shooting and make some syslog traces more self explaining Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-11-21enable loglevel setting via command lineKarl Palsson
Currently the loglevel is hardcoded to LOG_WARNING, even though there is debug log messages. Allow setting the loglevel via cli option. Include basic help text because we're adding command line options. Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-27odhcpd: remove superfluous log output.Karl Palsson
Drop pointless syslog. The single line just doubles the amount of lines logged to syslog without adding any value. Signed-off-by: Karl Palsson <karlp@etactica.com>
2015-11-17fall through in error case to clear congestionSteven Barth
2015-11-16Handle netlink ENOBUFS eventsSteven Barth
2015-08-20router/dhcpv6: use link-local addresses for DNSSteven Barth
2015-07-14Remove unsolicited unicast RAs, adjust intervalsSteven Barth
2015-07-14ndp: fixup relaySteven Barth
2015-07-13odhcpd: remove old workaroundSteven Barth
2015-07-07main: fix missing parameter while iterating neighborsSteven Barth
2015-07-07router: also send RAs to every known neighborSteven Barth
2015-04-10ra: always send current hop limitSteven Barth
2015-03-30properly handle return codesJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-03-29Remove prefix coloring support, refine hybrid management modeSteven Barth
2015-03-29odhcpd: use proper struct msghdr initializers to fix build error on muslFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-30Fix IPv6 DNS server adddress selectionHans Dedecker
Fix selection of IPv6 DNS address in DHCPv6 and RA overwrite as an address could be selected with preferred lifetime zero while IPv6 addresses are in use with non zero preferred lifetimes. Fix tries to pick the IPv6 address with the longest preferred lifetime now. Fixes also the issue an IPv6 address with preferred lifetime zero could be returned in DHCPv6 DNS server option while an IPv6 address with non zero preferred lifetime is returned as DNS recursive RA option for the same set of available IPv6 addresses.
2014-10-17ndp: more fixesSteven Barth
2014-08-08Make failed to send a notice instead of a warningSteven Barth
2014-07-01DHCPv6 destination address checkHans Dedecker
As described in RFC3315 §15 any solicit, confirm, rebind or information request message is discarded if the destination address is unicast Likewise any request (§18.2.1), renew (§18.2.3), release (§18.2.6) or decline (§18.2.7) message is discarded and the server replies with the status code use multicast.
2014-04-01Complete managed PD/CER-ID supportSteven Barth
2014-02-17Add support for (managed) prefixes of length 65-96Steven Barth
2014-01-17Don't enable relay master if no slaves are presentSteven Barth
2014-01-17Fix logging verbositySteven Barth
2014-01-03Disable debugging by defaultSteven Barth
2013-12-10Fix hop limit detection in ancillary dataHans Dedecker
2013-12-03Fix prefix class logicSteven Barth
2013-12-02Initial prefix class supportSteven Barth
2013-10-15Fix ubus reload detectionSteven Barth
2013-10-15Fix some more memory issuesSteven Barth
2013-10-14Initial commitSteven Barth