Merged
Conversation
4db9499 to
34f7141
Compare
d30f4b8 to
52f5df9
Compare
d9ac0ad to
e0c18bd
Compare
jovatn
approved these changes
Jan 30, 2025
Contributor
jovatn
left a comment
There was a problem hiding this comment.
Great work!!
In have some comments inline - use as you judge best.
In addition, I wonder if there are some problems with formatting the output when running "help" inside "subnet" and "host" contexts in DHCP server. I'll paste some output below.
admin@ix-00-00-00:/config/dhcp-server/subnet/192.168.2.0/24/> help
description Additional information about this subnet (e.g., purpose, location, or notes).
enabled Enable or disable DHCP server on this subnet.
if-name Optional interface to bind this subnet to.
option pool host List of static host entries.
admin@ix-00-00-00:/config/dhcp-server/subnet/192.168.2.0/24/>
admin@ix-00-00-00:/config/dhcp-server/subnet/192.168.2.0/24/host/192.168.2.10/> help
description Additional information about this entry, e.g., owner's name, equipment details, or location.
match hostname Optional hostname to assign with the lease.
lease-time Lease time, or 'infinite'.
option
admin@ix-00-00-00:/config/dhcp-server/subnet/192.168.2.0/24/host/192.168.2.10/>
Contributor
Author
Thanks! 😃
Ouch, seems to be missing descriptions for nodes/lists/etc. Thanks!
|
mattiaswal
approved these changes
Jan 31, 2025
Contributor
mattiaswal
left a comment
There was a problem hiding this comment.
LGTM. Great addition for Infix! 🚀 🏅 ❤️
e0c18bd to
6a1920d
Compare
6a1920d to
9a245e5
Compare
This was
linked to
issues
Jan 31, 2025
Similar to the run_multiline() method, sometimes files contain more than one line and a common read_multiline() quickly becomes useful. This is currently only used by ietf-system for reading /etc/resolv.conf.head. Also, fix pylint warning for missing encoding to all open() calls. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Instead of 'show ntp' =>
Error, top level "ietf-system:system-state" missing
Try something nicer:
NTP client not enabled.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The sr_get_item() function logs an error: "No data found for ..." in case the referenced XPatjh does not exist, causing unnecessarily scary log message about missing genkey elements in /ietf-keystore:keystore/ Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Skip the password node in operational data for entries that have locked or empty password, otherwise the YANG validation (regexp) will fail. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch introduces a new yang yang model for DHCP server and relay, using dnsmasq to provide the functionality on a per-interface basis. Available DHCP options will be queried by confd on startup and can then be configured in a flexible manner. The DHCP option 82 feature has been realized by patching dnsmasq (see patches/dnsmasq/2.90/0000-relay-agent-info.patch). Signed-off-by: Stefan Schlosser <sgs@grmmbl.org>
For consistency with the new dhcp-server model, which has an option value 'name', options are now referred to as id's or identifiers. This means bumping the confd syntax version 1.3 -> 1.4 and adding a migration script for existing dhcp-client configuration files. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
A DHCP client should be able to request a DHCP server assigned hostname,
*and* advertise its current hostname (as a client-id). This change lets
the client do either, instead of always assuming the latter.
Alt 1)
option id:hostname => request hostname
Alt 2)
option id:hostname, value:<STRING | auto> => advertise hostname
This also fixes a bug where the hostname sent to the server could be the
old hostname. The fix picks up any new hostname directly from sysrepo.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The hostname leaf in ietf-system.yang defines it as an fqdn. This patch adds support for splitting the host and domain parts to set them in Linux according to hosts(5). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- dnsmasq:
- allow listening to all interfaces again to serve DHCP leases
- disable most of the default DHCP options, keep broadcast and
netmask because when dnsmasq can infer these they are better
than breaking networking for clients -- note, they can still
be overridden from global/subnet/host scope -- and for relay
setups they need to be supplied anyway
- confd:
- drop per-interface dnsmasq, although practical for many use-cases,
having a per-subnet focused server means improved integration with
future stand-alone dhcp relay setup
- implement suggested, simplified, yang model
Fixes #703
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Fixes #899 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Example status output:
"infix-system:dns-resolver": {
"options": {
"timeout": 3,
"attempts": 5
},
"search": [
"example.com",
"foo.com"
],
"server": [
{
"address": "1.2.3.4",
"origin": "static"
},
{
"address": "192.168.2.1",
"origin": "dhcp",
"interface": "e5"
}
]
}
Fixes #510
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
With support for dns resolver in place, the ietf-system output needs to be complemented with additional data collected from both the dnsmasq and openresolv subsystems. System date taken from 'client3' in the Infix DHCP server-subnets test. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Instead of encoding hex data in regular strings, using an 'id:' prefix,
or guessing based on pattern in C code, we have decided for a breaking
change in the DHCP client model.
This commit introduces string and hex values for client-id in the models
for both DHCP client and server. The *breaking* part of the changes are
strictly related to how a user pass binary data as colon-separated hex
digits. The dedicated leaf node `client-id` is now reserved for string
values and the generic `list option` can be used to input user defined
string or hex values. Even non-conformant client-id options can now be
encoded. All described in detail in infix-dhcp-client.yang
The server model has been updated to be able to send generic options in
hex format, and the static host lease matcher for client-id now require
a 'str' or 'hex' modifier.
Note: dnsmasq is RFC compliant and will not match non-conforming option
61 (client-id) even though the client can send such payload.
To increase test coverage, the server_host test has been updated to
check both string and hex client-id. Matching on hostname is already
covered by other test(s).
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Counters should follow the format from ieee802-ethernet-interface model, which use: - in/out for Rx/Tx - plural from Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Fixes #798 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
9a245e5 to
028fc57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This work fixes #703 for Infix v25.01. Further work, as laid out in #446, is planned after that.
Based on the work by @sgsx3 for @minexn
Checklist
Tick relevant boxes, this PR is-a or has-a: