b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517 |
|
20-Jan-2016 |
Beniamino Galvani <bgalvani@redhat.com> |
dhcp: make DHCP6_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp6_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp6-protocol.h. Move the enum definition to the
public header sd-dhcp6-client.h and properly namespace values. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
0d43d2fcb7ac5264c739dc2f67f93ed0985a418a |
|
25-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
libsystemd-network: clean up recv functions |
c601ebf79f0c54be14d3c16f0f484c0335cdeec4 |
|
17-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: bind to link-local address
This ensures that several DHCPv6 clients can run on separate interfaces
simultaneously. |
63348d13fae61fefcb29133bfae8371b33cf4b6d |
|
16-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: ndisc/dhcpv6 - handle starting running clients
The clients may be triggered to be started repeatedly without being stopped first,
simply swallow the error rather than failing the link. |
3098562c9236fe0bd3e7d950b6c53907304d277f |
|
13-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: dhcp6 - don't log about losing a lease we never had |
f667c150a9116022f348cb6d8f2a553dce2386c3 |
|
11-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: add is_running() method |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
04c0136989b7eb896bfb0fb176e11233d69e1453 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-*.h: clean up exported (or to-be-exported) header files
Exported header files should not include internal headers. Fix that.
Exported header files should not use the bool type. So far we opted to
stick to C89 for exported headers, and hence use "int" for bools in
them. Continue to do so.
Exported header files should have #include lines for everything they use
including inttypes.h and sys/types.h, so that they may be included in
any order.
Exported header files should have C++ guards, hence add them.
Exported header files should not use gcc extensions like #pragma once,
get rid of it. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
ed19c567e5fcdcec1a2b6dbac63787e001ad5d55 |
|
11-Oct-2015 |
Tom Gundersen <teg@jklm.no> |
libsystemd-network: limit accuracy of timestamps in logging
We don't care about timestamps down to the last usec, round to the closest sec
as that will be plenty for debugging purposes. |
d7c9c21f18704580f66a1ce73fb6b506fdf40732 |
|
23-Sep-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Prevent setting and restarting of DHCPv6 client
Prevent modifications to index, MAC address, DUID and Information
Request while the DHCPv6 client is running.
Require the DHCPv6 client to be stopped first instead of always
unconditionally restarting it if the caller calls
sd_dhcp6_client_start() more than once. With this change, handling
of for example incoming Router Advertisments becomes much easier. |
10c9ce615d98e125bc520efa94aebaef250a4061 |
|
22-Sep-2015 |
David Herrmann <dh.herrmann@gmail.com> |
sd-dhcp6: fix namespacing
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any
namespacing conflicts. |
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7 |
|
22-Sep-2015 |
Thomas Haller <thaller@redhat.com> |
sd-dhcp6: ensure canceling lease timers and refactor setting lease
Factor our common code to set/clear the client lease.
Resetting the lease involves canceling old timers.
Also, most importantly, when resetting the lease
in client_receive_advertise(), ensure to cancel
the timers too. It is not immediately clear, why
at that point no timers would be pending.
The lease-unref from sd_dhcp6_client_unref() can
be omited, because of the preceeding client_reset()
call. |
0ae0e5cd96813bacad43a39920a043d8d20a67db |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
dhcp: coding style fixes
We place the opening bracket of a function on the same line as the
function name. Let's do so in the DHCP sources too. |
3733eec3e292e4ddb4cba5eb8d3bd8cbee7102d8 |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
dhcp: stop using refcnt.h
No need to invole atomic ops in single-threaded APIs, let's simplify
this. |
e6b18ffaea7d557eec3028a37c043da67a78550c |
|
26-Aug-2015 |
David Herrmann <dh.herrmann@gmail.com> |
sd-dhcp: don't randomly ref objects
In our API design, getter-functions don't ref objects. Calls like
foo_get_bar() will not ref 'bar'. We never do that and there is no real
reason to do it in single threaded APIs. If you need a ref-count, you
better take it yourself *BEFORE* doing anything else on the parent object
(as this might invalidate your pointer).
Right now, sd_dhcp?_get_lease() refs the lease it returns. A lot of
code-paths in systemd do not expect this and thus leak the lease
reference. Fix this by changing the API to not ref returned objects. |
41e4615d4f4f5c61afa84ba857f23c0ac496687b |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6: Support deprecated SNTP Configuration Option
Although the SNTP option specified in RFC 4075 has been deprecated, some
servers are still sending NTP information with this option. Use the SNTP
information provided only if the NTP option is not present.
Update the test case as SNTP information is also requested. |
6599680e2d33597f0f11a99e1c3c957b42418568 |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6: Add support for DHCPv6 NTP Server Option
Support NTP server and multicast addresses and NTP server domain names
as specified in RFC 5908. |
5da1b97f3c3d15521f2dcfbc18eccd6580122ebc |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6: Add support for DHCPv6 DNS Domain Search List option
Support DHCPv6 DNS search list option as specified in RFC 3646. This
option contains a list of DNS search domains encoded without compression
as specified in Section 8. of RFC 3315. |
7bd8e95d44977833d0de3fc4e893eb3bc84351d6 |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6: Add support for DHCPv6 DNS Recursive Name Server option
Support DHCPv6 DNS server option as specified in RFC 3646. This option
contains a list of IPv6 DNS server addresses. |
9d89d1ae71cb298218e35a69d6b70e2c94de5271 |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Save a DHCPv6 lease also with Information Reply
As the lease structure contains interesting information, save it also
for the Information Reply. |
4e3e6679e8f73b83d38e4b20d8b025e12991d1cb |
|
21-Aug-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Fix unreferencing DHCPv6 lease on client reset
When the DHCPv6 client is started by the library user or stopped for
any reason, unref the DHCPv6 lease when resetting the DHCPv6 client
data structure. This makes the DHCPv6 client always start from a clean
state and not keep unnecessary an lease structure around when stopped.
If this is not done, a previously existing lease information can be
interpreted to be from another server when restarting DHCPv6. |
38a03f06a7393d2721c23f23f0589d2f6d0904af |
|
03-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-event: make sure sd_event_now() cannot fail
Previously, if the event loop never ran before sd_event_now() would
fail. With this change it will instead fall back to invoking now(). This
way, the function cannot fail anymore, except for programming error when
invoking it with wrong parameters.
This takes into account the fact that many callers did not handle the
error condition correctly, and if the callers did, then they kept simply
invoking now() as fall back on their own. Hence let's shorten the code
using this call, and make things more robust, and let's just fall back
to now() internally.
Whether now() is used or the cache timestamp may still be detected via
the return value of sd_event_now(). If > 0 is returned, then the fall
back to now() was used, if == 0 is returned, then the cached value was
returned.
This patch also simplifies many of the invocations of sd_event_now():
the manual fall back to now() can be removed. Also, in cases where the
call is invoked withing void functions we can now protect the invocation
via assert_se(), acknowledging the fact that the call cannot fail
anymore except for programming errors with the parameters.
This change is inspired by #841. |
62e3d1aed512d68cab1fc9b509e813a1fa2b3790 |
|
21-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
dhcp6: remove unnecessary if check |
8283c71b7141afc6ad69dc7913311aa01e8221dd |
|
14-Apr-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
sd-dhcp6-client: unref lease when freeing the client |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
cc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3 |
|
04-Mar-2015 |
Thomas Haller <thaller@redhat.com> |
sd-dhcp6-client: delay setting the DUID and don't fail constructor
sd_dhcp6_client_new() tried to set the DUID based on the machine id.
If the host has no /etc/machine-id, the constructor would fail
making it impossible to create an sd_dhcp6_client instance.
Relax this and create a DUID only later as needed. This way a caller
caller can workaround a missing machine-id file and set a DUID of his
choosing via sd_dhcp6_client_set_duid(). |
cfb5b3805759e63dc5e0cae6e92e1df885b5c5b6 |
|
21-Jan-2015 |
Tom Gundersen <teg@jklm.no> |
network: dhcp - split out dhcp_identifier_set_{iaid,duid_en} from dhcp6-client
This will also be used in dhcp4-client. |
764aad6258eec3bd4ae62ea341ea507bd69ce628 |
|
21-Jan-2015 |
Tom Gundersen <teg@jklm.no> |
network: dhcp - split out the duid structure into a new header file
We will use the same in both dhcp4 and dhcp6. |
950a1705dcedf7c71ee28ee995fb51f95cfb2ed5 |
|
20-Jan-2015 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Remove unnecessary debug printout |
f0c4b1c3fd827b429ba36aa45fd39e0a023cbf2c |
|
13-Jan-2015 |
Tom Gundersen <teg@jklm.no> |
refcnt: refcnt is unsigned, fix comparisons
This does not make a difference, but the code was confusing. |
c4e8ceddccfbb14e475e74eb5c57ba32c3c6cf86 |
|
10-Dec-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
test-dhcp6-client: Add a simple Information Request test case
Start the DHCPv6 test case by sending an Information Request, verifying
the reply and continuing at once with the normal address acquisition
procedure. Reuse the DHCPv6 Solicit Reply so that the client code is
verified to ignore any erroneously added IPv6 address information. |
bbfa43ca37df0718287c25a8e39ee7477ebf33f6 |
|
10-Dec-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Implement Information Request message
Implement Information Request message according to RFC 3315, section
18.1.5. with the excepion that the first message is not delayed by a
random amount. Instead systemd-networkd is supposed to take care of
desynchronizing between other clients.
Initialize the DHCPv6 client structure in sd_dhcp6_client_start()
as this allows toggling between information request and normal
DHCPv6 address aquisition modes. |
c47e8936a43ce546e8a74fa569e9fbfae6c64be7 |
|
10-Dec-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Make end of successfull option parsing explicit
When all DHCPv6 options have been parsed, dhcp6_option_parse() returns
-ENOMSG. Explicitely set the return value to indicate success so that
later code does not need to take this special value into account. |
356779df90a2ecab5da2cb310ad0f8ebc9ca9f46 |
|
04-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-event: rename sd_event_source_set_name() to sd_event_source_get_name()
To mirror the recent name change of the concept for sd_bus objects,
follow the same logic for sd_event_source objects, too. |
393b6f28ecec537f05567c4ec8af8c499d0ea226 |
|
01-Nov-2014 |
Dan Williams <dcbw@redhat.com> |
sd-dhcp6-client: fix off-by-two error in DUID length
The duid data passed by the caller does not include the DUID type,
but sd_dhcp6_client_set_duid() was treating it like it did. |
76253e73f9c9c24fec755e485516f3b55d0707b4 |
|
11-Oct-2014 |
Dan Williams <dcbw@redhat.com> |
sd-dhcp-client: support non-Ethernet hardware addresses
Like Infiniband. See RFC 4390 section 2.1 for details on DHCP
and Infiniband; chaddr is zeroed, hlen is set to 0, and htype
is set to ARPHRD_INFINIBAND because IB hardware addresses
are 20 bytes in length. |
fe4b2156256c5bdf52341576571ce9f095d9f085 |
|
02-Oct-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6: do basic sanity-checking of supplied DUID |
ebe207d4acf38165adbc45298662982eecdb9e9f |
|
02-Oct-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6: specify the type explicitly when setting custom DUID
This would make it simple to verify that the data is on the right format when
the type is known. |
9547267dc56d5bf84b8119dfcb8e101202fac7d3 |
|
02-Oct-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6: support custom DUID's up to the size specified in the RFC |
66eac1201a9c1596f5901f8dbbf24bda7e350878 |
|
02-Oct-2014 |
Dan Williams <dcbw@redhat.com> |
sd-dhcp6-client: support custom DUIDs
The caller may have an existing DUID that it wants to use, and may
want to use some other DUID generation scheme than systemd's
default DUID-EN.
[tomegun: whitespace - we never use tabs] |
346e13a25dc6f76d3bc9d8decd40dc4782b02d2a |
|
09-Sep-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Implement Elapsed Time option
Implement Elapsed Time option as it is defined as MUST in RFC 3315,
section 22.9. The elapsed time value is a 1/100th of a second with
a max value of 0xffff, i.e. 655.35 seconds.
As the main loop might not be running yet when sd_dhcp6_client_start() is
called, fetch the monotonic time directly and not from the event loop
while in state DHCP6_STATE_STOPPED. |
44481a8b537839cd9ffead4d261491641f5b5260 |
|
31-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
sd-dhcp6-client: properly calculate buffer size when parsing options
Also make pointer calculations more explicit so they are
easier to understand. |
9021bb9f935c93b516b10c88db2a212a9e3a8140 |
|
28-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
sd-event: name event sources used in libraries
This should help in debugging failing event sources. |
5364f729ba9616cd9fdab8d5413fbc25a1af3a57 |
|
20-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
indentation/spurious whitespace fixes |
fa94c34b083b5b4019975624453e53d0cbad2a5d |
|
24-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
libsystemd-network: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC where possible
The timeouts in the networking library (DHCP lease timeouts and similar) should not be affected
by suspend. In the cases where CLOCK_BOOTTIME is not implemented, it is still safe to fallback to
CLOCK_MONOTONIC, as the consumers of the library (i.e., networkd) _should_ renew the leases when
coming out of suspend. |
6946f79d98430fccb1e0c947c135c807bc73a9c5 |
|
23-Jul-2014 |
Dan Williams <dcbw@redhat.com> |
dhcp-network: remove unused DHCP6_STATE_RS
Probably a left-over from when router solicitations were
requested in the DHCP6 code. But since they are now separate,
this state is no longer needed. |
4b4923e65423e60d755841b5b264730e8f3deab3 |
|
14-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: make gcc happy
It complains about {max,init}_retransmit_time possibly being
uninitialized. It is wrong, but let's just initialize it. |
b1e1238fb3af77419eca704fb64f68a313954734 |
|
04-Jul-2014 |
Steven Noonan <steven@uplinklabs.net> |
networkd: don't clear dhcpv6 lease timers if there's no previous lease
If client->lease is NULL, dhcp6_lease_clear_timers will cause a segmentation
fault. |
5e91345094a9e983e7abb2313334e7808bcd2cc2 |
|
02-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: initialize variable |
926695f1b5f9395eeb416cc2f478a9cf75fdbeb4 |
|
01-Jul-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
sd-dhcp6-client: check return value
Checking the return values seems to have been forgotten in
ed6ee21953dac9c78383da00bc4514ece6b75ab5 |
54d61deb7bffec5ca22cf765b13afbb0af547868 |
|
01-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: fix free before use |
ed6ee21953dac9c78383da00bc4514ece6b75ab5 |
|
26-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Implement Rapid Commit
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. |
3dc34fcc97b41f8b7b019027225b121dfbb9871d |
|
26-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Implement Renew and Rebind
Start sending Renew and Rebind DHCPv6 messages when respective timers T1
and T2 expire. Rebind messages do not include a Server ID option and the
Rebind procedure ends when the last IPv6 address valid lifetime expires,
whereafter the client restarts the address acquisition procedure by
Soliciting for available servers.
See RFC 3315, sections 18.1.3. and 18.1.4. for details. |
da6fe470e17fa02f3adedc779585caf8669252bd |
|
26-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add Option Request Option support
Provide a function to request more options from the DHCPv6 server.
Provide a sensible default set at startup and add test basic test
cases for the intended usage.
Define DNS and NTP related option codes and add comments for the
unassigned codes. |
3f0c075f8ef3344da5a6bda524540201f9204e61 |
|
26-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: return NULL from _unref() like the other sd-* libraries
In order to keep the refcounting working, a DONT_DESTROY macro similar
to the one in sd-bus has been added also to DHCPv6. |
6ec60d20724d2a32e20d25ef75d2af178c242bc2 |
|
24-Jun-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
sd-dhcp6-client: use %m instead of strerror(errno) |
513a6fa8679510ea1b55967bdb482dd5f8a39f21 |
|
20-Jun-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
sd-dhcp6-client: fix uninitialized variables |
c806ffb9592fa9a2b13a1f9f9be4c77cd5b211aa |
|
19-Jun-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
sd-dhcp6-client: Initialize fd to -1 and rename function
client_initialize name is misleading, since the function is actually
useful at the *end*, to reinitialize the object. But reset is shorter,
so rename it to client_reset. |
a34b57c0d43b8bf819ccd4f62c314b41b625454d |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Receive and parse a reply and set T1 and T2 timers
Receive and parse a Reply from the server. Set up T1 and T2 timers and
notify the library user of an acquired DHCPv6 lease. |
7246333cb803b03440d3bd0bdaa233564d09b5ae |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add Request message sending
As described in RFC 3315, Section 17.1.2, a client has to wait until the
first timeout has elapsed before it is allowed to request IPv6 addresses
from the DHCPv6 server. This is indicated by a non-NULL lease and a
non-zero resend count. Should the Advertisement contain a preference
value of 255 or be received after the first timeout, IPv6 address
requesting is started immediately.
In response to these events, create a Request message and set up proper
resend timers to send the message to the server. |
c3e2adeaba8e043caed0ef139eeaea016bd152d0 |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Update start function to take a state
Update the start function so that the client state can be conveniently
changed with the previous message resend timers cleared. On initial
startup also create and bind to the UDP socket. |
ea3b3a75abb3f8b853f7da454b9b8e258a120eea |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-lease: Add functions for accessing lease and addresses
Add support functions for accessing the current client lease as well
as iterating over the addresses and get their preferred and valid
lifetimes. |
631bbe71298ec892f77f44f94feb612646fe6853 |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Receive and parse Advertise messages
When receiving DHCPv6 messages, discard the ones that are not meant
for DHCPv6 clients and verify the transaction id. Once that is done,
process the Advertise message and select the Advertise with the
highest preference.
Create a separate function for lease information parsing so that it
can be reused in other parts of the protocol. Verify both DUID and
IAID in the received message and store other necessary information
with the lease structure. |
a9aff3615b430f86bd0a824214d95f634efaf894 |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add DHCPv6 Solicit message creation and sending
Implement the initial functionality used for creating a DHCPv6 Solicit
message containing the needed options and send it to the DHCPv6
broadcast address. Increase the sent message count and ensure that
the Solicit Initial Retransmission Time is strictly greater than
the Solicitation IRT as described in RFC 3315, section 17.1.2. |
d1b0afe3653b4316a6361d204169620726d468a0 |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add DHCPv6 client Solicitation timeout handling
Add the core of DHCPv6 client message retransmission and upper bound
timer and message count handling according to RFC 3315 Secions 7.1.2
and 14. Omit the DHCPv6 initial delay; for now it is assumed that
systemd-networkd will provide decent startup randomization that will
desynchronize the clients.
When reinitializing the client, clear all timers. |
f12abb48fc510b8b349c05e35ba048134debaf25 |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add DHCPv6 IAID functionality
Create structures describing Identity Association IDentifiers and
IPv6 lease addresses.
[tomegun: initialize the IAID when client is started. Base this off of the
predictable udev names, if available, as these satisfy the requirement of
the IAID, and base it off the mac addres otherwise, as that is the best we
have.] |
a276e6d68606861b552140cbcc003f4af10626fc |
|
19-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp6-client: Initialize DUID
Initialize DHCP Unique Identifier when creating the client. The
DUID is generated based on the machine-id, which satisfies all the
requirements of what an DUID should be. The DUID type is DUID-EN.
Based on patch by Patrik Flykt. |
139b011ab81ccea1d51f09e0261a1c390115c6ff |
|
19-Jun-2014 |
Patrik Flykt <patrik.flykt@linux.intel.com> |
sd-dhcp6-client: Add initial DHCPv6 client files
Add initial structure definition and functions for setting index, MAC
address, callback and event loop. Define protocol values and states. |