Age | Commit message (Collapse) | Author |
|
Replace the config option ra_management by the config options ra_flags
and ra_slaac. The latter allows to configure the autonomous-address
config flag used for stateless address configuration while the former
allows to configure the RA flags in the form of a list.
The list can hold the following values :
managed-config
other-config
home-agent
none
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
1. Remove 'ignore' config option for interface. Interface is still used if
any of 'ra', 'ndp', 'dhcpv4' or 'dhcpv6' options are different from
default 'disabled' mode. In config_parse_interface() update runtime
ignore value according to all mode values.
2. Reset ignore, ra, ndp, dhcpv4 and dhcpv6 values in set_interface_defaults().
Otherwise if option is deleted from config file and config is reloaded,
it will use the value from old config, potentiallly not turning services off.
3. Do not use implicit checks that 0 server mode means MODE_DISABLED.
4. Simplify code of all service setup functions if passed enabled = true
argument, but service mode is disabled.
Signed-off-by: Dainis Jonitis <dainis.jonitis@ubnt.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Adds the config options to set if DHCPv6 'stateful addresing' hands out
IA_NA (Internet Address - Network Address), IA_PD (Internet Address -
Prefix Delegation), both or none.
Signed-off-by: Matija Amidzic <matija.amidzic@sartura.hr>
|
|
Make announcing options Recursive DNS server and DNS search list
configurable via the ra_dns config option.
This allows to disable sending RA based DNS info if such info is
already provided by DHCPv6.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
IETF is moving toward implementing IPv6 multihoming by sending
multiple RAs on a single interface:
- draft-ietf-intarea-provisioning-domains-00
- draft-ietf-rtgwg-enterprise-pa-multihoming-02
odhcpd supports configuration of multiple software interfaces
on the same physical interface, which already advertises
multiple RAs, but had two issues:
- Each RA includes all the prefixes available on the interface.
- Replies to sollicits with a single RA.
This patch introduces the prefix_filter configuration parameter
which allows filtering prefixes that are sent in a given RA,
and fixes the sollicit code in order to reply with all the RAs
that are configured on a given interface.
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
|
|
Support force renew nonce authentication support in the DHCPv4 server as
described in RFC3203 and RFC6704.
The interface uci arameter dhcpv4_forcereconf allows to supports DHCPv4
clients which support force renew without authentication.
While at it align network byte order logic for simplicity.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Some client implementations expect DHCPv6 addresses to be assigned for
every prefix present in a RA as reported in FS#524; if not done the
client implementations spam the DHCPv6 server with SOLICIT messages
trying to get an DHCPv6 address for every prefix.
When ra_managed is set to 1 and an ULA prefix is configured; the DHCPv6
server will only assign an ULA DHCPv6 addresses which possibly leads to
DNS issues.
Fix these problems by providing dhcpv6_assignall config option which
assigns all viable DHCPv6 addresses to a client by default.
This is a trade off as it means client implementations will be assigned
more IPv6 addresses and lose the ability to quickly renumber clients
which don't support reconfigure accept in case of wan prefix change
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Allow to specify the router advertisement retrans time via the uci
parameter ra_retranstime. If retransmit time is not configured the
value is set to 0 in RA message meaning undefined.
|
|
Allow to specify the router advertisement reachable time via the uci
parameter ra_reachabletime. If reachable time is not configured the
value is set to 0 in RA message meaning undefined.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Allow to specify the router advertisement current hop limit via the uci
parameter ra_hoplimit. If hoplimit is not configured the hoplimit is
taken from the interface as before.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Allow to specify the router advertisement mtu via the uci parameter
ra_mtu. In case the config parameter is not set the MTU is taken from
the interface as before.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
In case maindhcp is set to disabled in global config one expect the DHCPv4
server not being started irrespective if the dhcpv4 interface config is set
to server.
Fix this by keeping maindhcp config apart from the legacy config parameter
as already documented in the README.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Add config option ra_useleasetime which allows the RA prefix lifetime
being set to the leasetime in case the valid and/or preferred prefix
lifetime is bigger than the configured leasetime.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Add support for uci parameters ra_mininterval and ra_lifetime as described
in RFC4861 paragraph 6.2.1.
Variable ra_mininterval allows to configure the minimum interval time
between unsolicited router advertisement messages; default value is
200 seconds. The minimum allowed value is 4 seconds while the maximum
value is limited to 0.75 of the maximum interval time.
The calculation of the maximum interval time between unsolicited
router advertisement messages has been reworked. The default value is 600
seconds as specified in RFC4861; if the maximum interval time exceeds
0.33 * the minimal valid lifetime of all IPv6 prefixes it will be limited
to 0.33 * the minimal valid lifetime of all IPv6 prefixes
Variable ra_lifetime allows to configure the Router Lifetime field
in the router advertisement messages; the value is either 0 or a value
between the maximum interval time and 9000 seconds. If the router lifetime
is smaller than the RA maximum interval it will be set equal to the RA
maximum interval time.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
The odhcpd documentation currently implies that "option ignore 1" in a section
of type "dhcp" will disable any services on the referenced interface while the
code actually ignores the setting when initializing referenced interfaces.
This commonly leads to situations where users think that "option disabled"
will prevent any server activity on a given interface while in reality odhcpd
effectively acts as rogue DHCPv6 server in its default configuration.
To fully inhibit any activity, one has to specify both "option ignore 1" as
well as "option ra disabled", "option ndp disabled" and
"option dhcpv6 disabled" which is highly counter intuitive at best.
A previous commit (5f425ed Respect interface "ignore" settings as documented.)
attempted to address the problem by observing the value of i->ignore instead
of unconditionally enabling all protocols but broke the ability to use DHCPv6
relay mode while having DHCPv4 disabled.
This patch changes ...
- the enabling of services on an interface to use the value of the ignore
option as default choice instead of hardcoding "true"
- the options "ra", "ndp", "dhcpv4" and "dhcpv6" to take precedence over the
default "ignore" state to allow selectively enabling services on ignored
interfaces
- the README to clarify the fact that "ra", "ndp", "dhcpv4" and "dhcpv6" can
now override "option ignore"
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Karl Palsson <karlp@etactica.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
|
|
|
|
RFC 2132 defines:
3.5. Router Option
The router option specifies a list of IP addresses for routers on the
client's subnet. Routers SHOULD be listed in order of preference.
The code for the router option is 3. The minimum length for the
router option is 4 octets, and the length MUST always be a multiple
of 4.
Code Len Address 1 Address 2
+-----+-----+-----+-----+-----+-----+-----+-----+--
| 3 | n | a1 | a2 | a3 | a4 | a1 | a2 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+--
|
|
|
|
|
|
|
|
|
|
|
|
|