summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-option.c
AgeCommit message (Collapse)Author
2015-11-25dns-domain: rework dns_label_escape() to not imply memory allocationLennart Poettering
The new dns_label_escape() call now operates on a buffer passed in, similar to dns_label_unescape(). This should make decoding a bit faster, and nicer.
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-10-30sd-dhcp6-client: fix assert in options parsingTom Gundersen
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-08-27tree-wide: we place the opening bracket on the same line as the function nameLennart Poettering
Let's do this everywhere the same way.
2015-08-26sd-dhcp6: fix domainname memleakDavid Herrmann
strv_extend() does not consume the passed entry, hence, we must properly free it. Furthermore, we should *not* use strv_consume() as we do greedy allocations on 'ret'; and greedy-allocations should only be used for short lived objects or caches. Fix the domainname parser to properly free temporary storage when done.
2015-08-21dhcp6-option: Add helper function for uncompressed domain namesPatrik Flykt
Add a helper function containing a modified version of dns_packet_read_name() that does not use DnsPacket to extract a string array of domain names from the provided option data. The domain names are stored uncompressed as defined in Section 8. of RFC 3315.
2015-08-21dhcp6-option: Add helper function for fetching IPv6 addressesPatrik Flykt
Add a helper function that extracts a block of IPv6 addresses from the provided option data.
2014-11-05libsystemd-network: don't use unaligned helpers in _packed_ structsTom Gundersen
The compiler will do this for us.
2014-11-01dhcp6: use unaligned read/write helpersTom Gundersen
2014-10-09sd-dhcp6-lease: Name the structure containing IAADDR dataPatrik Flykt
With this change the DHCP6_OPTION_IAADDR_LEN define can be removed in favor of using sizeof(). Using the name of the struct and sizeof() makes it clearer how much and what data is being copied from the DHCPv6 message.
2014-06-26sd-dhcp6-client: Implement Rapid CommitPatrik Flykt
Add a Rapid Commit option to Solicit messages and expect a Reply to be received instead of an Advertise. When receiving a DHCPv6 message from the server in state Solicit, continue testing whether the message is a Reply. Ease up the message type checking, it's not fatal if the message is of a wrong type. Add helper functions to set/get the rapid commit of a lease. See RFC 3315, sections 17., 17.1.2., 17.1.4. and 18.1.8.
2014-06-19sd-dhcp6-client: Add IA Address option parsingPatrik Flykt
Add functionality to parse DHCPv6 Identity Association for Non-temporary (IA_NA) and Temporary Addresses (IA_TA) options. Both of them contain one or more IA Address (IAADDR) options and optinally a status code option. Only the IA_NA option contains lease lifetimes. See RFC 3315, sections 22.4., 22.5., 22.6., 22.13. and appendix B. for details. If the lease timeouts are not set, use the ones recommended for servers in section 22.4. Factor out common code in the form of an option header parsing helper function.
2014-06-19sd-dhcp6-client: Add basic DHCPv6 option handlingPatrik Flykt
Add option appending and parsing. DHCPv6 options are not aligned, thus the option handling code must be able to handle options starting at any byte boundary. Add a test case for the basic option handling.