summaryrefslogtreecommitdiff
path: root/src/dhcpv6.c
Commit message (Collapse)AuthorAgeFilesLines
* Use more conventional way for the alignmentVladislav Grishenko2016-01-311-3/+5
|
* Merge pull request #44 from bwhacks/alignment-fixesSteven Barth2016-01-311-7/+18
|\ | | | | Alignment fixes
| * Fix alignment of hash buffer in dhcpv6_response_is_validBen Hutchings2016-01-281-1/+2
| | | | | | | | | | | | | | md5_final() writes to the hash buffer in 32-bit chunks, so it needs to be 32-bit aligned. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
| * Fix unaligned 32-bit reads from DHCP packetsBen Hutchings2016-01-281-5/+13
| | | | | | | | Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
| * Fix alignment of buffers in ra_process and dhcpv6_requestBen Hutchings2016-01-281-1/+3
| | | | | | | | | | | | | | | | | | | | The packet buffer needs to be 32-bit aligned to ensure that the various 32-bit fields we pick out are naturally aligned. The control message buffers needs to be naturally aligned for struct cmsghdr. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* | Fix end pointer passed from dhcpv6_handle_reply() to dhcpv6_parse_ia()Ben Hutchings2016-01-281-1/+1
|/ | | | | | The end of the IA option is odata + olen; there's no need to add anything. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Add missing option length checks in dhcpv6_handle_advertBen Hutchings2016-01-281-2/+4
| | | | | | | These might be redundant with checks elsewhere but it's better to be safe. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Fix potential log forgery via status stringBen Hutchings2016-01-281-6/+13
| | | | | | | | | We should not include any control characters from the server status message when logging it; in particular if we include '\n' this could result in additional arbitrary log lines. In dhcpv6_log_status_code, replace all control characters with '?'. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Check for unsupported PD exclusion configuration in dhcpv6_parse_iaBen Hutchings2016-01-281-1/+1
| | | | | | | | | | | | We currently only support PD exclusions that only affect bits 64-95 of the address, so we require: 32 <= PD prefix length < exclusion prefix length <= 64 The first inequality was not validated, and this could result in a buffer overflow when generating the next request message. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Fix memory leak in dhcpv6_add_server_cand in case odhcp6c_insert_state failsBen Hutchings2016-01-281-1/+5
| | | | | | | | If we fail to store information from the new server, the associated NA and PD options will never be freed. An attacker could use this for denial-of-service. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Merge branch 'upstream'Vladislav Grishenko2015-07-131-12/+0
|\
| * dhcpv6: remove dead codeSteven Barth2015-07-131-12/+0
| |
* | Avoid solicit for zero-length prefixVladislav Grishenko2015-07-121-4/+8
|/
* dhcpv6: clear CUSTOM_OPTS in a more sane mannerSteven Barth2015-06-091-0/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Avoid of waiting for Advertise in stateless-only modeVladislav Grishenko2015-04-251-5/+19
| | | | | | | Start with Information-request when configured not to ask IA_NA/IA_PD. It allows to complete the exchange using only two messages, instead of four, and fixes infinite Advertise waiting loop with servers that just ignore Solicit messages.
* scan-code fixesSteven Barth2015-04-141-130/+130
|
* Improve handling of DNS search domainsSteven Barth2015-04-131-2/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Remove obsolete prefix class supportSteven Barth2015-04-121-22/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Fix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD optionsVladislav Grishenko2015-02-171-0/+4
|
* set default information refresh time to 86400 as per RFC 4242v1.1Steven Barth2015-01-131-1/+1
|
* Don't apply excess filter to DHCPv6 and unify odhcp6c_update_entrySteven Barth2014-12-101-2/+2
|
* More compatibility with non RFC-compliant serversSteven Barth2014-11-301-2/+13
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Be less picky when erroring out due to strange IA status-codesSteven Barth2014-11-281-16/+1
|
* Fix initial delay of SOLICIT messageSteven Barth2014-11-281-2/+2
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Fix msghdr initialization on muslSteven Barth2014-11-181-3/+5
|
* Fix parsing empty IA_NA, IA_PD and invalid IA_ADDR optionsVladislav Grishenko2014-10-101-6/+7
|
* Export DHCPv6 server address to envSteven Barth2014-10-061-9/+16
|
* Enable softwire-support by defaultv1.0Steven Barth2014-08-251-4/+0
|
* Also test for correct IA-ID for IA_NASteven Barth2014-08-221-1/+1
|
* ia_na: use big-endian 1 as IAIDSteven Barth2014-08-221-1/+1
|
* Filter FQDN as wellSteven Barth2014-05-301-0/+1
|
* Improve filterSteven Barth2014-05-301-1/+1
|
* filter DNS-domain from passthruSteven Barth2014-05-231-0/+1
|
* Add support for DHCPv6 option passthruSteven Barth2014-05-231-10/+33
|
* Ignore multiple MAP-E instances for now and output DMR / BR for every ruleSteven Barth2014-04-281-1/+4
|
* Initial support for MAP & LW4O6 provisioningSteven Barth2014-04-281-0/+16
|
* Fix falloutSteven Barth2014-04-091-0/+2
|
* Revert "Revert to old behaviour regarding information requests"Steven Barth2014-04-091-4/+1
| | | | This reverts commit c98181c4a48c57e405effd1dc9046aaaee6d480f.
* Add user-class option in help text and minor clean upHans Dedecker2014-04-031-1/+0
|
* Correctly clear CERSteven Barth2014-04-011-0/+1
|
* Don't disable looping (meh)Steven Barth2014-04-011-1/+0
|
* Add initial support for CER-IDSteven Barth2014-03-301-1/+12
|
* Fix building with clang 3.4Steven Barth2014-03-181-1/+1
|
* Fix HMAC-MD5 verify in reconfigureSteven Barth2014-03-111-2/+4
|
* Reintroduce Reconfigure-Accept in Request-MessageSteven Barth2014-02-171-6/+4
|
* use enum to specify order and indexes of iov struct.Kaspar Schleiser2014-02-121-22/+39
| | | | | | | | | This helps to avoid brainfuck index calculation errors when adding features. On my build machine (arch linux x86_64), the stripped binary has exactly the same size, so this patch should produce the same binary, but increase code maintainability.
* Fix fallout from userclass additionSteven Barth2014-02-061-5/+5
|
* Fix T1, T2 and T3 timer values in case of infinite time valuesHans Dedecker2014-02-051-11/+16
| | | | Honor T1, T2 and T3 timer values from DHCPv6 server in case of infinite values
* Add user-class optionSteven Barth2014-02-051-3/+11
|
* Bump copyright headersSteven Barth2014-01-291-1/+1
|