Hi,
On Fri, 2017-09-22 at 17:07 +0200, Lennart Poettering wrote:
> So, of course, people might want arbitrary complex schemes there, but
> I'd probably keep it simple at least in the beginning, and try to be
> as automatic as possible...
>
> maybe we should have a structure
Hi,
Now that we have Router Advertisements and are able to also send
statically configured DNS servers and DNS search domains, I wonder
which set of DNS servers makes most sense to automatically add in
Router Advertisements.
The current status quo is DHCPv4, where one can configure the
Add a helper function that extracts a block of IPv6 addresses from
the provided option data.
---
src/libsystemd-network/dhcp6-internal.h | 5 -
src/libsystemd-network/dhcp6-option.c | 23 ++-
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git
---
src/libsystemd-network/network-internal.c | 15 +++
src/libsystemd-network/network-internal.h | 2 ++
2 files changed, 17 insertions(+)
diff --git a/src/libsystemd-network/network-internal.c
b/src/libsystemd-network/network-internal.c
index d579755..1db7dd2 100644
---
a bit rusty with systemd, some conventions may have changed since
last time.
Please review,
Patrik
Patrik Flykt (11):
sd-dhcp6-client: Fix unreferencing DHCPv6 lease on client reset
sd-dhcp6-client: Save a DHCPv6 lease also with Information Reply
dhcp6-option: Add helper function
Add a helper function that extracts 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.
---
src/libsystemd-network/dhcp6-internal.h | 2 ++
src/libsystemd-network/dhcp6-option.c | 54
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
As the lease structure contains interesting information, save it also
for the Information Reply.
---
src/libsystemd-network/sd-dhcp6-client.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/libsystemd-network/sd-dhcp6-client.c
Support NTP server and multicast addresses and NTP server domain names
as specified in RFC 5908.
---
src/libsystemd-network/dhcp6-lease-internal.h | 7 +++
src/libsystemd-network/dhcp6-protocol.h | 6 ++
src/libsystemd-network/sd-dhcp6-client.c | 7 +++
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.
---
src/libsystemd-network/dhcp6-lease-internal.h | 4 +++
src/libsystemd-network/sd-dhcp6-client.c | 8
Append DNS and NTP data obtained via DHCPv6 when the Link is saved.
---
src/network/networkd-link.c | 62 +
1 file changed, 62 insertions(+)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index dff81a5..2f36abe 100644
---
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.
---
Test option setting and getting in test_advertise_option(). Verify
that the information provided in DHCPv6 Reply messages is also
available in the Information and Solicit callbacks.
---
src/libsystemd-network/test-dhcp6-client.c | 63 ++
1 file changed, 63
Support DHCPv6 DNS server option as specified in RFC 3646. This option
contains a list of IPv6 DNS server addresses.
---
src/libsystemd-network/dhcp6-lease-internal.h | 7 -
src/libsystemd-network/sd-dhcp6-client.c | 9 ++-
src/libsystemd-network/sd-dhcp6-lease.c | 37
On Fri, 2015-04-10 at 14:03 +0300, Patrik Flykt wrote:
Version 2 attempts to resolve IPv6 address assignment issues at run
time, first by adding IFA_FLAGS, then without.
Hearing no failure reports, this patch has been applied.
Cheers,
Patrik
Hi,
On Fri, 2015-04-10 at 14:03 +0300, Patrik Flykt wrote:
Version 2 attempts to resolve IPv6 address assignment issues at run time,
first by adding IFA_FLAGS, then without.
Please test with kernels 3.14 and = 3.14.
This may be a case of too few people actually using DHCPv6
When setting IPv6 addresses acquired by DHCPv6, systemd-networkd sets
the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. As the
flag and the attribute are present starting with Linux 3.14, older
kernels will need systemd-network to manage prefix route handling.
Support for IFA_FLAGS
On Thu, 2015-04-09 at 12:43 +0200, Lennart Poettering wrote:
Hmm, in general, we really should try to create the same binaries,
regardless if we are built on an old or new kernel. And the binaries
should work as good as possible, regardless which kernel version they
are running on. But with
On Tue, 2015-04-07 at 21:13 +0200, Alexander Sverdlin wrote:
But if the backend code for this flag appears first in Linux 3.14
(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=479840ffdbe4),
working around the compilation issue (against older uapi headers) will
not
On Fri, 2015-04-03 at 06:46 +0200, Alexander Sverdlin wrote:
Hi!
On 25/03/15 14:36, Patrik Flykt wrote:
IFA_FLAGS is a discrete value and has no preprocessor #define defined for
it. Fix this by always using the value.
Seems that fix was not a real fix:
CC src/libsystemd/sd
On Fri, 2015-03-27 at 12:05 +0100, Tom Gundersen wrote:
On Wed, Mar 25, 2015 at 2:37 PM, Patrik Flykt
patrik.fl...@linux.intel.com wrote:
Expiring prefixes need not be handled anymore as the kernel has been
instructed not to create routes for DHCPv6 assigned addresses via
IFA_FLAGS is a discrete value and has no preprocessor #define defined for
it. Fix this by always using the value.
---
src/libsystemd/sd-rtnl/rtnl-types.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c
b/src/libsystemd/sd-rtnl/rtnl-types.c
index
prefixes and
their disappearance can be removed. I did not do that yet, though, as the
code may still be useful in the future - let's see.
Please review test,
Patrik
Patrik Flykt (3):
sd-rtnl: Always enable IFA_FLAGS
systemd-networkd: Use IFA_F_NOPREFIXROUTE with IPv6 addresses
networkd
The IFA_F_NOPREFIXROUTE flag prevents the kernel from creating new onlink
prefixes when a DHCPv6 IPv6 address with a prefix length is set from user
space. IPv6 routing will follow the onlink status from Router Advertisment
Prefix Information options or any manually set route, which is the correct
Expiring prefixes need not be handled anymore as the kernel has been
instructed not to create routes for DHCPv6 assigned addresses via the
IFA_F_NOPREFIXROUTE flag.
---
src/network/networkd-dhcp6.c | 42 +-
1 file changed, 1 insertion(+), 41 deletions(-)
Hi,
On Tue, 2015-02-03 at 17:27 +0100, Lennart Poettering wrote:
Is the resume event detected somehow in systemd?
The kernel unfortunately provides no API for this right now. However,
if logind is the one suspending the machine, then it sends out a
PrepareForSleep() signal before
On Tue, 2015-02-03 at 11:46 +0100, Lennart Poettering wrote:
On Mon, 02.02.15 23:12, Charles Devereaux (syst...@guylhem.net) wrote:
Another problem with systemd-networkd is that the lease is not renewed
after sleep.
This is a basic feature, a laptop is frequently physicially moved,
Hi,
On Sat, 2015-01-31 at 15:48 +0100, Zbigniew Jędrzejewski-Szmek wrote:
DHCP CLIENT (0xa71f5099): STARTED on ifindex 42
DHCP CLIENT (0xa71f5099): DISCOVER
DHCP CLIENT (0xa71f5099): OFFER
DHCP CLIENT (0xa71f5099): REQUEST (requesting)
DHCP CLIENT (0xa71f5099): ACK
DHCP CLIENT
On Tue, 2015-01-20 at 19:35 +0200, Patrik Flykt wrote:
Hi,
Here is version 2 updated according to comments.
The trivial debug printout removal being too trivial is no longer
part of this set. NTP and DNS information I also left off, I think
there might have been a few bugs so
Update MTU according to the latest value received.
---
src/libsystemd-network/sd-icmp6-nd.c | 27 +++
src/systemd/sd-icmp6-nd.h| 2 ++
2 files changed, 29 insertions(+)
diff --git a/src/libsystemd-network/sd-icmp6-nd.c
b/src/libsystemd-network/sd-icmp6-nd.c
Revise the address iteration functions so that one helper function
resets the iterator to the start of the address list while the
second one fetches addresses one by one.
The test case is also updated.
---
src/libsystemd-network/sd-dhcp6-lease.c| 26 -
Each ICMPv6 structure has an interface index and will therefore be
associated with an IPv6 link containing a list of of prefixes.
---
v2: Keep the check that 'len' is not equal to zero as the option header
points to the next option that might not exist
One struct CamelCapsed, the other
---
src/libsystemd-network/test-icmp6-rs.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/libsystemd-network/test-icmp6-rs.c
b/src/libsystemd-network/test-icmp6-rs.c
index be64d33..9d50c57 100644
--- a/src/libsystemd-network/test-icmp6-rs.c
+++
Keep the expired prefix for the duration of the prefix expiration event
and remove it afterwards.
---
src/libsystemd-network/sd-icmp6-nd.c | 20
src/systemd/sd-icmp6-nd.h| 2 ++
2 files changed, 22 insertions(+)
diff --git a/src/libsystemd-network/sd-icmp6-nd.c
Hi,
On Wed, 2015-01-14 at 16:37 +0100, Barbara Lazarowicz-Steube wrote:
As you can see in it, having received the RA networkd correctly
identifies the local network as managed and fires up the DHCPv6
client. The client then receives a reply from the server and... does
absolutely
On Wed, 2015-01-14 at 01:53 +0100, Zbigniew Jędrzejewski-Szmek wrote:
Yeah, there's no need to sent this to the mailing list. It is unlikely
to be wrong, and even if it it, we can revert or amend. The same for
1/11 in the other series.
If it scares you less that way I'll silently apply future
---
src/libsystemd-network/sd-dhcp6-client.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/libsystemd-network/sd-dhcp6-client.c
b/src/libsystemd-network/sd-dhcp6-client.c
index 017371e..940a606 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++
As the IPv6 prefixes are needed, update the ICMPv6 Router Advertisement
code to dynamically allocate a suitably sized buffer. Iterate through
the ICMPv6 options one by one returning error if the option length is
too big to fit the buffer.
---
src/libsystemd-network/sd-icmp6-nd.c | 75
.
Please review,
Patrik
Patrik Flykt (11):
sd-dhcp6-client: Remove unnecessary debug printout
sd-dhcp6-lease: Revise address iteration functions
sd-icmp6-nd: Update Router Advertisement handling
sd-icmp6-nd: Add link and prefix structures for ICMPv6
sd-icmp6-nd: Add helper function
---
src/libsystemd-network/test-icmp6-rs.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/libsystemd-network/test-icmp6-rs.c
b/src/libsystemd-network/test-icmp6-rs.c
index be64d33..8a42a34 100644
--- a/src/libsystemd-network/test-icmp6-rs.c
+++
Once IPv6 addresses have been acquired, assign these to the interface
with the prefix lengths taken from the ICMPv6 Router Advertisement
handling code. The preferred and valid IPv6 address lifetimes are
handed to the kernel which will clean up them if not renewed in time.
When a prefix announced
Revise the address iteration functions so that one helper function
resets the iterator to the start of the address list while the
second one fetches addresses one by one.
The test case is also updated.
---
src/libsystemd-network/sd-dhcp6-lease.c| 24 +++
Save each new onlink IPv6 prefix and attach an expiry timer to it.
If the prefixes overlap, take the shorter prefix and write a debug
message about the event. Once the prefix is resent in a Router
Advertisement, update the timer. Add a new event for the expiring
prefix.
Add two helper functions,
Each ICMPv6 structure has an interface index and will therefore be
associated with an IPv6 link containing a list of of prefixes.
---
src/libsystemd-network/sd-icmp6-nd.c | 99
1 file changed, 99 insertions(+)
diff --git a/src/libsystemd-network/sd-icmp6-nd.c
Keep the expired prefix for the duration of the prefix expiration event
and remove it afterwards.
---
src/libsystemd-network/sd-icmp6-nd.c | 23 +++
src/systemd/sd-icmp6-nd.h| 2 ++
2 files changed, 25 insertions(+)
diff --git
Add test cases that feeds an Router Advertisement to the ICMPv6 code
and verify that the correct prefix lengths are returned given an IPv6
address.
Enhance the prefix verification test by adding a shorter prefix and
check that the intended prefix lengths are now updated.
---
Store arrays of found DNS and NTP IPv6 addresses and strings of DNS
search domains and NTP host names as specified in RFC 3646 and RFC
5908.
---
src/libsystemd-network/dhcp6-internal.h | 3 +
src/libsystemd-network/dhcp6-lease-internal.h | 18
src/libsystemd-network/dhcp6-option.c
Update MTU according to the latest value received.
---
src/libsystemd-network/sd-icmp6-nd.c | 30 ++
src/systemd/sd-icmp6-nd.h| 2 ++
2 files changed, 32 insertions(+)
diff --git a/src/libsystemd-network/sd-icmp6-nd.c
On Tue, 2015-01-13 at 14:32 +0200, Patrik Flykt wrote:
Just a trivial TODO update, I'll push it right away.
Patch applied.
Patrik
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo
---
Hi,
Just a trivial TODO update, I'll push it right away.
Cheers,
Patrik
TODO | 1 -
1 file changed, 1 deletion(-)
diff --git a/TODO b/TODO
index 1d497b2..3c2c2c9 100644
--- a/TODO
+++ b/TODO
@@ -792,7 +792,6 @@ Features:
- write more test cases
- implement and
Suppyling a NULL lease is not a condition that needs to be asserted,
returning -EINVAL is informative enough to the caller. This simplifies
calling code and doesn't falsely indicate that something erroneous was
attempted.
---
src/libsystemd-network/sd-dhcp6-lease.c | 4 +++-
1 file changed, 3
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.
---
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.
---
src/libsystemd-network/sd-dhcp6-client.c | 5 -
1 file changed, 4 insertions(+), 1
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
it back to fetching additional information only is not
possible according to RFCs.
Please review,
Patrik
Patrik Flykt (6):
sd-dhcp6-client: Make end of successfull option parsing explicit
sd-dhcp6-lease: Return only -EINVAL when a NULL lease is supplied
sd-dhcp6-client: Implement
When ICMPv6 Other information is received, enable Information request
in DHCPv6. If the DHCPv6 client already exists, only update the client
if there is a transition from Other to Managed state.
---
src/network/networkd-dhcp6.c | 55
1 file changed, 50
Handle all aspects of ICMPv6 and DHCPv6 in a file of its own as is done
with DHCPv4 and IPv4LL.
---
Makefile.am | 1 +
src/network/networkd-dhcp6.c | 165 +++
src/network/networkd-link.c | 122 +---
On Thu, 2014-12-04 at 03:27 +0100, Tom Gundersen wrote:
Patrik, do you have any plans for this? I agree, this is likely
something we want.
I'm tempted to do something about it. Give me time until mid next week
and we'll see what happens.
Cheers,
Patrik
On Tue, 2014-11-18 at 18:41 +0100, Tom Gundersen wrote:
(but cc'ing Patrik just to make sure)
RFC 2131:
secs 2 Filled in by client, seconds elapsed since client
began address acquisition or renewal process.
@@ -422,7 +423,15 @@ static int
On Fri, 2014-10-03 at 10:04 -0500, Dan Williams wrote:
sd_dhcp_client_set_mac() does have an 'arp_type' parameter that's
cached
in the client struct, so that could be changed to:
if (client-arp_type == ARPHRD_ETHER)
if you'd like.
If it's there already, it is a good thing to use. It does
Hi,
On Thu, 2014-10-02 at 20:05 +0200, Tom Gundersen wrote:
The DHCPv4 header is the same format no matter what the LL address size,
but for non-ethernet the hlen is 0 and the chaddr is zeroed. The BPF is
seeded with an hlen of 0 and a valid ETH_ALEN sized buffer of all zeros.
On Fri, 2014-10-03 at 15:48 +0300, Patrik Flykt wrote:
On Fri, 2014-09-26 at 15:15 -0500, Dan Williams wrote:
/* RFC2132 section 4.1.1:
The client MUST include its hardware address in the ’chaddr’
field, if
- necessary for delivery of DHCP reply messages
On Tue, 2014-09-09 at 13:39 +0200, Tom Gundersen wrote:
Hi Patrik,
These all look good. Please push!
Done that.
Cheers,
Patrik
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
---
TODO | 1 -
1 file changed, 1 deletion(-)
diff --git a/TODO b/TODO
index 221b39f..4aebcc4 100644
--- a/TODO
+++ b/TODO
@@ -697,7 +697,6 @@ Features:
- implement reconfigure support, see 5.3., 15.11. and 22.20.
- implement information request, see 1.2. and 18.1.5.
- implement
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 0x, 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
for this option verifies that the option is present and
has a proper length.
Cheers,
Patrik
Patrik Flykt (3):
sd-dhcp6-client: Implement Elapsed Time option
test-dhcp6-client: Add checks for Elapsed Time option
TODO: Remove Elapsed Time DHCPv6 option as it is done
TODO
Verify that the Elapsed Time option is present.
---
src/libsystemd-network/test-dhcp6-client.c | 32 ++
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/libsystemd-network/test-dhcp6-client.c
b/src/libsystemd-network/test-dhcp6-client.c
index
The whole DHCPv6 test message length was incorrectly used as the length
of DHCPv6 options causing the following bad memory access:
$ build/test-dhcp6-client
Assertion 'interface_index = -1' failed at
../src/libsystemd-network/sd-dhcp6-client.c:129, function
sd_dhcp6_client_set_index().
is done in patch 07, seems that the DHCP server I'm using
doesn't want to rapid commit anything here, perhaps due to a missing
IPv6 address to request or something.
Last but not least the TODO file lists a few items that are left for
later.
Cheers,
Patrik
Patrik Flykt (8):
sd-dhcp6
When a link fails or looses carrier, always stop ongoing router
solicitation and any DHCPv6 client that may be running.
---
src/network/networkd-link.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
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.
---
src/libsystemd-network/dhcp6-protocol.h|
Create a helper function to compute the remaining time in seconds from
time T2 to the IPv6 address with the longest lifetime. The computed
time is used as the Maximum Retransmission Duration in Rebinding state.
See RFC 3315, section 18.1.4. for details.
---
In some use cases stopping an ongoing ICMPv6 discovery is more
useful than always unreferencing the whole structure.
---
src/libsystemd-network/sd-icmp6-nd.c | 13 +
src/libsystemd-network/test-icmp6-rs.c | 4
src/systemd/sd-icmp6-nd.h | 1 +
3 files changed, 18
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
In order to keep the refcounting working, a DONT_DESTROY macro similar
to the one in sd-bus has been added also to DHCPv6.
---
src/libsystemd-network/sd-dhcp6-client.c | 37 +++-
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git
---
TODO | 16
1 file changed, 16 insertions(+)
diff --git a/TODO b/TODO
index a5f482b..8d8d694 100644
--- a/TODO
+++ b/TODO
@@ -624,6 +624,22 @@ Features:
- export timezone information
- FORCERENEW
+* dhcp6:
+ - add functions to set previously stored IPv6 addresses
On Thu, 2014-06-26 at 12:59 +0200, Zbigniew Jędrzejewski-Szmek wrote:
+if (!GREEDY_REALLOC(client-req_opts, client-req_opts_allocated,
+(client-req_opts_len + 1) * sizeof(option)))
+return -ENOMEM;
GREEDY_REALLOC takes the number of
On Thu, 2014-06-26 at 13:01 +0200, Zbigniew Jędrzejewski-Szmek wrote:
+*expire = 0;
+
+LIST_FOREACH(addresses, addr, ia-addresses) {
+t = be32toh(addr-lifetime_valid);
+if (*expire t)
+*expire = t;
+}
On Thu, 2014-06-26 at 14:07 +0200, Zbigniew Jędrzejewski-Szmek wrote:
No comments, the rest looks great, as usual. I think you can push it.
Thanks. And pushed.
Cheers,
Patrik
___
systemd-devel mailing list
On Thu, 2014-06-26 at 13:24 +0300, Patrik Flykt wrote:
With this patch set it looks like basic DHCPv6 client functionality
should be covered as Renew and Rebind are now also handled.
Patch set updated according to Zbyszek's comments and pushed.
Cheers,
Patrik
Hi,
On Wed, 2014-06-18 at 15:50 +0200, Zbigniew Jędrzejewski-Szmek wrote:
+if (!client-retransmit_time) {
+client-retransmit_time =
+
client_timeout_compute_random(init_retransmit_time);
+} else {
+if
On Wed, 2014-06-18 at 16:25 +0200, Zbigniew Jędrzejewski-Szmek wrote:
On Wed, Jun 18, 2014 at 07:05:35AM -0700, Filipe Brandenburger wrote:
On Wed, Jun 18, 2014 at 6:58 AM, Zbigniew Jędrzejewski-Szmek
zbys...@in.waw.pl wrote:
+if (client-fd 0)
+
On Wed, 2014-06-18 at 16:27 +0200, Zbigniew Jędrzejewski-Szmek wrote:
Go ahead and push. It is probably simpler to make further
suggestions/comments in terms of patches anyway.
Agreed. I made some small comments, but the patch set looks great.
Patch set fixed according to your comments
On Wed, 2014-06-18 at 16:27 +0200, Zbigniew Jędrzejewski-Szmek wrote:
Go ahead and push. It is probably simpler to make further
suggestions/comments in terms of patches anyway.
Agreed. I made some small comments, but the patch set looks great.
Polished a bit more and pushed, enjoy!
Cheers,
Hi,
On Fri, 2014-06-13 at 12:17 -0500, Dan Williams wrote:
1) usage of struct ether_addr may prevent correct operation on
non-ethernet links, like Infiniband or PPP or GRE. They don't have
6-byte MAC addresses, so anywhere that currently uses a MAC address I'd
suggest passing u8*,
Feed a Router Advertisement to the code and expect proper events
each time. The sending part is ignored, as all of it is static code
in the real dhcp_network_icmp6_send_rs() function.
---
Makefile.am| 13 ++-
src/libsystemd-network/test-dhcp6-rs.c | 155
Try DHCPv6 if router solicitation times out as a link without routers
may use DHCPv6 according to RFC 4862 section 5.5.2.
---
src/libsystemd-network/sd-dhcp6-client.c | 70 +++-
src/systemd/sd-dhcp6-client.h| 1 +
2 files changed, 69 insertions(+), 2
Create a structure describing a DHCPv6 lease. Add internal functions
for creating a new lease and accessing the server ID, preference and
IAID. Provide functions for clearing addresses and associated timers.
External users are initially given only the capabilities of
referencing and unreferencing
Add a function that creates a UDP socket bound to the given interface
and optionally to an IPv6 address. Add another function that will
send the DHCPv6 UDP packet to its destination.
Using IPV6_PKTINFO in setsockopt to bind the IPv6 socket to an
interface is documented in section 4. of RFC 3542,
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
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.
---
Makefile.am| 4 +-
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
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
Copy Router Advertisement functions and data from the previous
test case and verify the created Solicit message. The test will
take some non-trivial time to run due to the DHCPv6 initial delay.
---
Makefile.am| 1 +
src/libsystemd-network/test-dhcp6-client.c |
Enhance the test case by replying with an Advertise message to the
client. Copy the transaction id, IAID and DUID from the Solicit
message. Verify the Request message created by the DHCPv6 client
implementation and move the main loop exit to the end of the Request
message verification.
Provide
Receive and parse a Reply from the server. Set up T1 and T2 timers and
notify the library user of an acquired DHCPv6 lease.
---
src/libsystemd-network/dhcp6-protocol.h | 1 +
src/libsystemd-network/sd-dhcp6-client.c | 145 +++
src/systemd/sd-dhcp6-client.h
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.,
From: Tom Gundersen t...@jklm.no
---
src/libsystemd-network/network-internal.c | 26 +++---
src/libsystemd-network/network-internal.h | 1 +
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/libsystemd-network/network-internal.c
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
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
1 - 100 of 240 matches
Mail list logo