summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv6.c
AgeCommit message (Collapse)Author
2018-06-07dhcpv6: fix out of bounds write in handle_nested_message()Hans Dedecker
Detected by Coverity in CID1412413 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-05-28treewide: switch to C-code style commentsHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-05-24dhcpv6: improve error checking in dhcpv6_setup_interface()Hans Dedecker
Improve error checking fixing resource leakage detected by Coverity in CID 1430880 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-12-17odhcpd: Replace strerror(errno) with %m formatRosen Penev
Saves a few bytes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2017-11-25dhcpv6: fix compile issues when CER-ID extension is enabledHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-11-09treewide: rework handling of netlink eventsHans Dedecker
Rework the handling of netlink events by letting the different modules ndp, ra, dhcpv6 and dhcpv4 install netevent handlers. The installed netevent handlers are called by the netlink logic passing an event indication together with event data. Each netevent handler implements its own event logic; this makes the code more modular and less complex by moving all netlink code to netlink.c While at it rename ia_addr and ia_addr_len into addr6 and addr6_len respectively Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-10-13treewide: align function namingHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-09-06treewide: replace RELAYD prefix naming in macrosHans Dedecker
Remove the unfortunate RELAYD naming in the different macros 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-03-29rework IPv6 address dump logicHans Dedecker
Make the code more logical by moving the IPv6 address dump logic into the different protocol interface enable handlers so it's clear which protocols require interface IPv6 address tracking. At the same time restructure the IPv6 address dump logic so less IPv6 address netlink dumps are created. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-21router: add syslog debug tracing for trouble shootingHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-08-20router/dhcpv6: use link-local addresses for DNSSteven Barth
2015-07-17dhcpv6: fix socket generation on relay masterSteven Barth
2015-07-17dhcpv6: send relay-forward messages using correct socketSteven Barth
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-07-01Replace option sol_max_rt by inf_max_rt in reply response to information requestHans Dedecker
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-06-09Fix DHCPv6 relay reply message in case raw DHCPv6 attributes are presentHans Dedecker
Use enum to index iov struct
2014-05-30Make filtering customizableSteven Barth
2014-05-25Add support for raw DHCPv6 attributesSteven Barth
2014-04-23Don't return a DHCPv6 reply in response to a confirm without address(es)Hans Dedecker
RFC3315 Section 18.2.2 states no reply must returned by the server in case no address(es) are present : If the server is unable to perform this test (for example, the server does not have information about prefixes on the link to which the client is connected), or there were no addresses in any of the IAs sent by the client, the server MUST NOT send a reply to the client.
2014-04-01Complete managed PD/CER-ID supportSteven Barth
2014-03-24Managed PD: initial supportSteven Barth
2014-02-05Fix homenet filterSteven Barth
2014-01-09Fix ALL_DHCPV6_RELAYS/ALL_DHCPV6_SERVERS membership subscriptionHans Dedecker
2014-01-04Use 1 socket per interface for DHCPv6Steven Barth
2013-12-05Fix possible SEGFAULT conditionsHans Dedecker
2013-10-14Initial commitSteven Barth