adhcp.git
2 years agoDrop unneeded use clause v0.5.2
Adrian-Ken Rueegsegger [Fri, 10 Aug 2018 12:09:33 +0000 (14:09 +0200)]
Drop unneeded use clause

Auditors: reet

2 years agoAdjust doc cleanup in top-level Makefile
Reto Buerki [Thu, 2 May 2019 08:33:25 +0000 (10:33 +0200)]
Adjust doc cleanup in top-level Makefile

Auditors: ken

2 years agoImprove webpage styling
Reto Buerki [Thu, 2 May 2019 07:52:13 +0000 (09:52 +0200)]
Improve webpage styling

Summary:
- Explicitly import Open Sans font in stylesheet
- Enable section anchors
- Don't use special font for first paragraph
- Disable toc
- Add subtitle via CSS
- Add description to index file
- Convert RFC conformity table to Asciidoctor format

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D734

2 years agoAlso host font awesome locally
Reto Buerki [Thu, 2 May 2019 07:52:13 +0000 (09:52 +0200)]
Also host font awesome locally

2 years agoHost fonts locally
Reto Buerki [Wed, 1 May 2019 15:47:29 +0000 (17:47 +0200)]
Host fonts locally

2 years agoShorten GNAT compiler URL
Reto Buerki [Wed, 1 May 2019 16:05:42 +0000 (18:05 +0200)]
Shorten GNAT compiler URL

2 years agoAdjust release verification section
Reto Buerki [Wed, 1 May 2019 15:55:49 +0000 (17:55 +0200)]
Adjust release verification section

Avoid long pubkey URL as this is problematic for small screens.

2 years agoRename Standard column to RFC
Reto Buerki [Wed, 1 May 2019 12:33:50 +0000 (14:33 +0200)]
Rename Standard column to RFC

2 years agoDrop Cat column
Reto Buerki [Wed, 1 May 2019 12:21:26 +0000 (14:21 +0200)]
Drop Cat column

RFC MUST/SHOULD/MAY are separate tables now.

2 years agoConvert RFC conformity table to Asciidoctor format
Reto Buerki [Wed, 1 May 2019 07:32:49 +0000 (09:32 +0200)]
Convert RFC conformity table to Asciidoctor format

2 years agoAdd description to index file
Reto Buerki [Tue, 30 Apr 2019 19:10:09 +0000 (21:10 +0200)]
Add description to index file

2 years agoDisable toc, specify subtitle instead
Reto Buerki [Tue, 30 Apr 2019 18:58:46 +0000 (20:58 +0200)]
Disable toc, specify subtitle instead

2 years agoDon't use special font for first paragraph
Reto Buerki [Tue, 30 Apr 2019 18:39:25 +0000 (20:39 +0200)]
Don't use special font for first paragraph

2 years agoEnable section anchors
Reto Buerki [Tue, 30 Apr 2019 17:53:23 +0000 (19:53 +0200)]
Enable section anchors

2 years agoExplicitly import Open Sans font in stylesheet
Reto Buerki [Tue, 30 Apr 2019 17:13:04 +0000 (19:13 +0200)]
Explicitly import Open Sans font in stylesheet

2 years agoConvert website from asciidoc to asciidoctor
Reto Buerki [Tue, 30 Apr 2019 15:00:48 +0000 (17:00 +0200)]
Convert website from asciidoc to asciidoctor

Summary:
Asciidoc is facing end of life, see e.g. Debian bug #894194. Therefore,
convert project website to successor tool asciidoctor, perform minor
adjustments in README and index files and update release signing key
information.

Test Plan: Verified that the new website looks neat.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D732

2 years agoImprove RFC conformity section
Reto Buerki [Tue, 30 Apr 2019 15:00:48 +0000 (17:00 +0200)]
Improve RFC conformity section

The conformity table is about our DHCPv4 implementation, not DHCPv6.

2 years agoKeep rfc-conformity section in separate file
Reto Buerki [Tue, 30 Apr 2019 08:22:11 +0000 (10:22 +0200)]
Keep rfc-conformity section in separate file

2 years agoCall asciidoctor with TZ=UTC
Reto Buerki [Mon, 29 Apr 2019 09:26:20 +0000 (11:26 +0200)]
Call asciidoctor with TZ=UTC

2 years agoFix typo in RFC conformity table
Reto Buerki [Fri, 26 Apr 2019 08:02:41 +0000 (10:02 +0200)]
Fix typo in RFC conformity table

2 years agoUpdate licence
Reto Buerki [Fri, 26 Apr 2019 07:54:12 +0000 (09:54 +0200)]
Update licence

2 years agoUpdate release signing key information
Reto Buerki [Fri, 26 Apr 2019 07:52:35 +0000 (09:52 +0200)]
Update release signing key information

Upcoming releases will be signed with this new key.

2 years agoCapitalize headers in README
Reto Buerki [Fri, 26 Apr 2019 07:46:30 +0000 (09:46 +0200)]
Capitalize headers in README

2 years agoConvert website from asciidoc to asciidoctor
Reto Buerki [Wed, 24 Apr 2019 07:23:28 +0000 (09:23 +0200)]
Convert website from asciidoc to asciidoctor

3 years agoUse Long_Long_Integer for time conversion in D-Bus notify v0.5.1
Adrian-Ken Rueegsegger [Wed, 28 Mar 2018 16:22:01 +0000 (18:22 +0200)]
Use Long_Long_Integer for time conversion in D-Bus notify

Lifetimes are 32-bit numbers which cannot be represented by the Natural
type.

Auditors: reet

3 years agoTrim lease times before appending to D-Bus args
Adrian-Ken Rueegsegger [Tue, 27 Feb 2018 10:36:07 +0000 (11:36 +0100)]
Trim lease times before appending to D-Bus args

Otherwise the arguments will have a leading whitespace.

Auditors: reet

3 years agoMinor cleanups in GPRs and Makefile v0.5
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:27 +0000 (18:26 +0200)]
Minor cleanups in GPRs and Makefile

Summary: Thanks to Nicolas Boulenguez for the patches.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D685

3 years agoAllow user to override build flags
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:27 +0000 (18:26 +0200)]
Allow user to override build flags

3 years agoUse Make pattern for similar recipes
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:05 +0000 (18:26 +0200)]
Use Make pattern for similar recipes

3 years agoSimplify transmission of compiler options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:25:37 +0000 (18:25 +0200)]
Simplify transmission of compiler options

3 years agoSimplify transmission of linker options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:24:37 +0000 (18:24 +0200)]
Simplify transmission of linker options

Use them for tools and notifiers.

3 years agoSimplify transmission of binder options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:23:53 +0000 (18:23 +0200)]
Simplify transmission of binder options

3 years agoVarious minor cleanups and fixes
Reto Buerki [Fri, 9 Feb 2018 14:22:51 +0000 (15:22 +0100)]
Various minor cleanups and fixes

Summary:
Update documentation (man page, DHCPv4 RFC conformity and README).

Switch to gprbuild in Makefile since gnatmake is deprecated.

Update to latest Anet version and drop unneeded use type clauses.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D684

3 years agoUpdate to Anet version 0.4
Reto Buerki [Fri, 9 Feb 2018 14:22:51 +0000 (15:22 +0100)]
Update to Anet version 0.4

3 years agoDrop unneeded use type clauses
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 13:54:25 +0000 (14:54 +0100)]
Drop unneeded use type clauses

3 years agoREADME: Update licence
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:13:15 +0000 (12:13 +0100)]
README: Update licence

3 years agoMakefile: Switch to gprbuild
Adrian-Ken Rueegsegger [Thu, 13 Oct 2016 13:41:23 +0000 (15:41 +0200)]
Makefile: Switch to gprbuild

3 years agoAdd RFC 5227: IPv4 Address Conflict Detection
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:08:44 +0000 (12:08 +0100)]
Add RFC 5227: IPv4 Address Conflict Detection

3 years agoUpdate DHCPv4 RFC conformity due to ACD implementation
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:07:22 +0000 (12:07 +0100)]
Update DHCPv4 RFC conformity due to ACD implementation

3 years agodoc: Extend adhcp_client man page
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:00:35 +0000 (12:00 +0100)]
doc: Extend adhcp_client man page

3 years agoImplement IPv4 address collision detection (ACD)
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:44:35 +0000 (11:44 +0100)]
Implement IPv4 address collision detection (ACD)

Summary:
Closes T471. Add DHCPv4.ACD package which implements the Probe and Announce
subprograms for IPv4 address collision detection as specified by RFC 5227.

The Announce procedure announces that the specified IPv4 address is used by
sending gratitious ARP messages. Further announcements are scheduled via the
Announce timing events with the delay interval ANNOUNCE_INTERVAL specified in
the RFC.

The Probe procedure sends ARP probes for the given IPv4 address and reports if
a collision was detected. According to the RFC a conflict exists if either
another host reports use of the probed IP address or a second host is
concurrently probing for the same IP address.

ACD is performed upon reception of an ACK message in Requesting state before
the IP address is about to be used. If a collision is detected, a DHCP DECLINE
message is sent to the server and the IP acquisition process is restarted.
When no collision is detected the use of the IP address is then announced.

The DHCPv4 client command line option -A controls if ACD is performed. The
described operations are only performed if ACD has been enabled. The
adhcp_client_wrapper has been adjusted to enabled ACD by default.

The new arp-probe scapy helper script can be used to send ARP probes for a
given IPv4 address: arp-probe <IP address>. It is helpful to trigger address
collisions when sending an ARP probe while the DHCPv4 client is trying to
acquire an address.

Finally, fix DHCP.Random.Get to correctly scale the random value by (High -
Low). The problem was operator ordering.

Test Plan:
Verified that adhcp_client behavior is unchanged if -A parameter is *not*
given. Checked that collisions are detected with -A and announcements are sent
upon successful IP address acquisition. Also verified that after 10 collisions
the rate limiting interval is applied.

Reviewers: reet

Reviewed By: reet

Maniphest Tasks: T471

Differential Revision: https://dev.codelabs.ch/D683

3 years agoUse RESTART_DELAY constant in Requesting state
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:44:35 +0000 (11:44 +0100)]
Use RESTART_DELAY constant in Requesting state

3 years agoAdd RESTART_DELAY constant
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:43:15 +0000 (11:43 +0100)]
Add RESTART_DELAY constant

The restart delay is specified in a bit of a round-about way in RFC
2131, section 3.1 enumerated item 5:

  The client SHOULD wait a minimum of ten seconds before restarting the
  configuration process to avoid excessive network traffic in case of
  looping.

3 years agoSimplify iface name handling in ACD
Reto Buerki [Fri, 2 Feb 2018 08:33:48 +0000 (09:33 +0100)]
Simplify iface name handling in ACD

3 years agoAdd arp-probe scapy helper script
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 15:04:18 +0000 (16:04 +0100)]
Add arp-probe scapy helper script

The tool can be used to send an ARP probe for a specified address.

Usage: arp-probe <IP address>

3 years agoHandle reception of invalid ARP messages gracefully
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 14:18:30 +0000 (15:18 +0100)]
Handle reception of invalid ARP messages gracefully

3 years agoMake simultaneous probe detection more strict
Reto Buerki [Thu, 1 Feb 2018 12:59:21 +0000 (13:59 +0100)]
Make simultaneous probe detection more strict

An ARP probe is a request/reply with the sender IP address set to all
zeros (2.1.1). Otherwise an ordinary ARP request from another host is
detected as probe.

3 years agoEnable IPv4 ACD by default in client wrapper
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 10:32:41 +0000 (11:32 +0100)]
Enable IPv4 ACD by default in client wrapper

3 years agoLog ACD announcements
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 09:35:11 +0000 (10:35 +0100)]
Log ACD announcements

3 years agoAnnounce IP use after processing ACK with ACD enabled
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 17:06:53 +0000 (18:06 +0100)]
Announce IP use after processing ACK with ACD enabled

3 years agoDrop HW address from ACD.Announce
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:42:13 +0000 (16:42 +0100)]
Drop HW address from ACD.Announce

Use the MAC address which was specified during ACD initialization.

3 years agoAdd test for ACD.Initialize procedure
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 16:15:33 +0000 (17:15 +0100)]
Add test for ACD.Initialize procedure

It is now very easily testable since it does not perform any socket
operations.

3 years agoOnly open ARP socket when it is actually used
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 13:31:56 +0000 (14:31 +0100)]
Only open ARP socket when it is actually used

Otherwise if the socket remains open it will receive any ARP messages
that might be received by the interface.

3 years agoExtend collision count reset test
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:33:35 +0000 (16:33 +0100)]
Extend collision count reset test

Verify that the collision count is reset after successful probing
without a collision.

3 years agoMinor: Fix alignment
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:24:16 +0000 (16:24 +0100)]
Minor: Fix alignment

3 years agoPerform Address Collision Detection
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 13:32:09 +0000 (14:32 +0100)]
Perform Address Collision Detection

Prior to using an offered address, perform ACD according to RFC 5227 and
notify the server by sending a DECLINE message if a collision was
detected.

3 years agoFactor out restarting of Transaction in Requesting state
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 22:03:55 +0000 (23:03 +0100)]
Factor out restarting of Transaction in Requesting state

3 years agoDHCPv4 client: Enable ACD depending on -A parameter
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 17:05:05 +0000 (18:05 +0100)]
DHCPv4 client: Enable ACD depending on -A parameter

If the new -A command line parameter is specified, then Address
Collision Detection according to RFC 5227 is performed.

3 years agoOnly send announcements if ACD is enabled
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 17:04:03 +0000 (18:04 +0100)]
Only send announcements if ACD is enabled

3 years agoOnly perform collision detection if enabled
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 16:55:51 +0000 (17:55 +0100)]
Only perform collision detection if enabled

3 years agoUse separate Sleep procedure for ACD delays
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 15:09:11 +0000 (16:09 +0100)]
Use separate Sleep procedure for ACD delays

This improves testability since we can provide a different Sleep
implementation for tests which allows to validate delay interval values and
speeds up tests since no actual delaying happens.

3 years agoImplement DHCPv4.ACD.Probe subprogram
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 16:47:17 +0000 (17:47 +0100)]
Implement DHCPv4.ACD.Probe subprogram

The procedure probes if the given IPv4 address is already in use on the
local network link.

3 years agoFix DHCP.Random.Get
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 11:02:24 +0000 (12:02 +0100)]
Fix DHCP.Random.Get

The random value must be scaled by (High - Low). The problem was
operator ordering.

3 years agoRestrict ACD announcements to ANNOUNCEMENT_NUM
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:45:44 +0000 (16:45 +0100)]
Restrict ACD announcements to ANNOUNCEMENT_NUM

Add Announcement_Count parameter to ACD.Announce procedure which
specifies how many announcements should be performed. Pass decremented
count value to announce event and only schedule event if count is
greater than one.

3 years agoSchedule announce event in ACD.Announce
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:42:58 +0000 (16:42 +0100)]
Schedule announce event in ACD.Announce

Schedule an announce timing event delayed by ANNOUNCE_INTERVAL.

3 years agoAdd DHCPv4.Constants package
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:38:36 +0000 (16:38 +0100)]
Add DHCPv4.Constants package

The package currently defines constants required for IPv4 Address
Conflict Detection specified by RFC 5227.

3 years agoImplement DHCPv4.ACD.Initialize procedure
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 17:22:49 +0000 (18:22 +0100)]
Implement DHCPv4.ACD.Initialize procedure

The procedure sets information for the interface designated for sending
ARP messages and sets up the ARP socket by binding it to the designated
interface and enabling non-blocking mode.

3 years agoImplement DHCPv4.Timing_Events.Announce
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 14:39:56 +0000 (15:39 +0100)]
Implement DHCPv4.Timing_Events.Announce

The new event can be used to send an ARP announcement for a given IP/HW
address combination.

3 years agoAdd DHCPv4.ACD package
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 14:14:43 +0000 (15:14 +0100)]
Add DHCPv4.ACD package

The package will implement RFC 5227: IPv4 Address Conflict Detection.
Currently it provides the procedure Announce which announces that the
specified IPv4 address is used by the interface with the given hardware
address via ARP messages.

3 years agoMiscellaneous fixes
Adrian-Ken Rueegsegger [Tue, 14 Nov 2017 16:00:45 +0000 (17:00 +0100)]
Miscellaneous fixes

Summary:
Adapt to latest Anet changes and use IPv6 shortform addresses.

Drop unneeded use clauses to fix compiler warnings issued by current
GNAT compilers.

Append lease times as Natural to D-Bus args as duration is a fixed-point
type but we actually want a natural number string.

Test Plan:
Verified that DHCPv4 and v6 clients work as expected and are able to
acquire an IP address.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D665

3 years agoAdapt to IPv6 shortform addresses
Adrian-Ken Rueegsegger [Tue, 14 Nov 2017 16:00:45 +0000 (17:00 +0100)]
Adapt to IPv6 shortform addresses

Anet by default now provides shortform IPv6 address strings.

3 years agoAppend lease times as Natural to D-Bus args
Adrian-Ken Rueegsegger [Thu, 2 Nov 2017 15:06:50 +0000 (16:06 +0100)]
Append lease times as Natural to D-Bus args

Duration is a fixed-point type but we actually want a natural number
string.

3 years agoDrop unneeded use clauses
Adrian-Ken Rueegsegger [Fri, 6 Oct 2017 13:33:29 +0000 (15:33 +0200)]
Drop unneeded use clauses

3 years agoAdapt to latest Anet changes
Adrian-Ken Rueegsegger [Fri, 6 Oct 2017 13:32:41 +0000 (15:32 +0200)]
Adapt to latest Anet changes

3 years agoMake adhcp_client work with Debian stretch
Reto Buerki [Wed, 6 Sep 2017 15:20:48 +0000 (17:20 +0200)]
Make adhcp_client work with Debian stretch

Summary:
Closes T447. Factor out D-Bus send operation to separate package. This
is in preparation of making the actual publish method configurable. The
existing implementation uses an asynchronous D-Bus signal.

Make D-Bus target configurable by project variable.

Move Add_Lease_Data for V4 to Dbus_Target package. This allows us to
change option names depending on the D-Bus target.

Add NetworkManager method call target. Newer NetworkManagers use a sync
method call for the communication with the spawned DHCP client instead
of an asynchronous signal. Also, two option names have changed, so we
need to mangle them before sending the D-Bus message.

Add method variant to D-Bus target configuration variable and make this
the default.

Test Plan:
Verified that adhcp_client successfully acquires IPv4 and IPv6 addresses
on Debian GNU/Linux 9 with NetworkManager package 1.6.2-3. Thanks to ken
for assuring that acquiring an address still works on Debian jessie.

Reviewers: ken

Reviewed By: ken

Maniphest Tasks: T447

Differential Revision: https://dev.codelabs.ch/D642

3 years agoMake method the default D-Bus target
Reto Buerki [Wed, 6 Sep 2017 15:20:48 +0000 (17:20 +0200)]
Make method the default D-Bus target

3 years agoAdd method variant to D-Bus target variable
Reto Buerki [Wed, 6 Sep 2017 15:20:21 +0000 (17:20 +0200)]
Add method variant to D-Bus target variable

3 years agoAdd NetworkManager method call target
Reto Buerki [Wed, 6 Sep 2017 15:18:57 +0000 (17:18 +0200)]
Add NetworkManager method call target

Newer NetworkManagers use a sync method call for the communication with
the spawned DHCP client instead of an asynchronous signal. Also, two
option names have changed, so we need to mangle them before sending the
D-Bus message.

3 years agoMove Add_Lease_Data for V4 to Dbus_Target package
Reto Buerki [Wed, 6 Sep 2017 15:11:48 +0000 (17:11 +0200)]
Move Add_Lease_Data for V4 to Dbus_Target package

This allows us to change option names depending on the D-Bus target.

3 years agoFactor out To_Byte_Array to Utils_D_Bus package
Reto Buerki [Wed, 6 Sep 2017 15:04:52 +0000 (17:04 +0200)]
Factor out To_Byte_Array to Utils_D_Bus package

3 years agoMake D-Bus target configurable by project var
Reto Buerki [Wed, 6 Sep 2017 14:40:03 +0000 (16:40 +0200)]
Make D-Bus target configurable by project var

3 years agoFactor out D-Bus send operation to separate package
Reto Buerki [Wed, 6 Sep 2017 14:35:26 +0000 (16:35 +0200)]
Factor out D-Bus send operation to separate package

The package provides the NetworkManager signal target.

3 years agoMake Adhcp_Publishers.Dbus_Connection package private
Reto Buerki [Wed, 6 Sep 2017 14:05:23 +0000 (16:05 +0200)]
Make Adhcp_Publishers.Dbus_Connection package private

4 years agoExplicitly stop logger in profiler.adb
Reto Buerki [Mon, 24 Apr 2017 12:46:37 +0000 (14:46 +0200)]
Explicitly stop logger in profiler.adb

This is required because the message/options deserialization code
contains a log message now.

Auditors: ken

4 years agoREADME: Update licence v0.4.3
Reto Buerki [Mon, 24 Apr 2017 12:18:34 +0000 (14:18 +0200)]
README: Update licence

Auditors: ken

4 years agoadhcp_relay: Fix termination issues
Reto Buerki [Wed, 9 Nov 2016 16:27:33 +0000 (17:27 +0100)]
adhcp_relay: Fix termination issues

Summary:
In case of a Socket_Error in a receiver task, the registered error
callback signals termination via DHCP.Termination. It is preferable to
listen for such events in main to avoid service hang. Therefore, drop
usage of Signals package in adhcp_relay in favor of DHCP.Termination.

As the network may recover, treat Anet.Socket_Error as temporary failure
in the adhcp_relay send paths. This could happen if e.g. a route is not
yet present. Log a warning message and continue operation.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D521

4 years agoHandle Anet.Socket_Error in Relay_Server_Message
Reto Buerki [Tue, 18 Oct 2016 15:04:05 +0000 (17:04 +0200)]
Handle Anet.Socket_Error in Relay_Server_Message

4 years agoHandle Anet.Socket_Error in Relay_Client_Message
Reto Buerki [Tue, 18 Oct 2016 14:59:25 +0000 (16:59 +0200)]
Handle Anet.Socket_Error in Relay_Client_Message

In case of adhcp_relay it makes sense to just retry as the network may
recover. Therefore log a warning message and continue operation.

4 years agoadhcp_relay: Correctly use DHCP.Termination package
Reto Buerki [Tue, 18 Oct 2016 14:47:11 +0000 (16:47 +0200)]
adhcp_relay: Correctly use DHCP.Termination package

In case of a Socket_Error in a receiver task, the registered error
callback signals termination via DHCP.Termination. It is preferable to
listen for such events in order to avoid service hang.

4 years agoUpdate README and documentation v0.4.2
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 15:13:30 +0000 (17:13 +0200)]
Update README and documentation

Summary: Update licence and switch to https URLs in README and doc where possible

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D505

4 years agoREADME: Update licence
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 13:06:41 +0000 (15:06 +0200)]
README: Update licence

4 years agoSwitch to https URLs in README and doc where possible
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 13:02:21 +0000 (15:02 +0200)]
Switch to https URLs in README and doc where possible

4 years agoUpdate to Anet v0.3.4 and implement notify test
Reto Buerki [Tue, 11 Oct 2016 15:44:36 +0000 (17:44 +0200)]
Update to Anet v0.3.4 and implement notify test

Summary:
Implement test for Observers.Call_External_Notify procedure and update
to Anet version v0.3.4.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D503

4 years agoImplement test for Observers.Call_External_Notify
Reto Buerki [Tue, 11 Oct 2016 14:42:11 +0000 (16:42 +0200)]
Implement test for Observers.Call_External_Notify

4 years agoUpdate to Anet v0.3.4
Reto Buerki [Tue, 11 Oct 2016 14:02:02 +0000 (16:02 +0200)]
Update to Anet v0.3.4

4 years agoSkip invalid DHCPv4 options during deserialization
Adrian-Ken Rueegsegger [Tue, 11 Oct 2016 13:29:58 +0000 (15:29 +0200)]
Skip invalid DHCPv4 options during deserialization

Summary:
Instead of discarding the entire DHCPv4 message, skip invalid options
after logging diagnostic information.

Additionally, provide offending length or data value in validation error
messages to give more context for debugging purposes.

Assert invalid option messages in tests where appropriate.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D501

4 years agoSkip invalid DHCPv6 options during deserialization
Adrian-Ken Rueegsegger [Tue, 11 Oct 2016 12:47:37 +0000 (14:47 +0200)]
Skip invalid DHCPv6 options during deserialization

Instead of discarding the entire DHCPv6 message, skip invalid
options after logging diagnostic information.

4 years agoAssert invalid option messages where appropriate
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 14:25:37 +0000 (16:25 +0200)]
Assert invalid option messages where appropriate

4 years agoAdd info to validate exception messages
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 14:23:10 +0000 (16:23 +0200)]
Add info to validate exception messages

Provide offending length or data value where appropriate to give more
context for debugging purposes.

4 years agoSkip invalid DHCPv4 options during deserialization
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 13:57:41 +0000 (15:57 +0200)]
Skip invalid DHCPv4 options during deserialization

Instead of discarding the entire DHCPv4 message, skip invalid options
after logging diagnostic information.