aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-28 20:09:01 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-06 19:47:17 -0700
commit855181e5e5edeb8bc4502448fa0b7803e79eb954 (patch)
treef7a130ffffae938870ab118ac1067f945d23dfb6 /src
parentfcf894fa1c7130dd0713188d725c1450a681b160 (diff)
downloadconsfigurator-855181e5e5edeb8bc4502448fa0b7803e79eb954.tar.gz
NETWORK:IPV4 & NETWORK:IPV6 are for public Internet addresses
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r--src/property/network.lisp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/property/network.lisp b/src/property/network.lisp
index 7a909ff..c0085ab 100644
--- a/src/property/network.lisp
+++ b/src/property/network.lisp
@@ -28,19 +28,31 @@ though its hostname is neither 'imap' nor 'smtp'."
:test #'string=))))
(defprop ipv4 :posix (&rest addresses)
- "Record the host's IPv4 addresses."
- (:desc (format nil "Has IPv4 ~{~A~^, ~}" addresses))
+ "Record the host's public Internet IPv4 addresses.
+
+If you need to record other addresses in hostattrs, such as on a LAN, write a
+similar property which pushes hostattrs identified by a non-keyword
+symbol (unless your consfig deals only in hosts without public IP addresses,
+in which case you can use this property)."
+ (:desc (format nil "Has public IPv4 ~{~A~^, ~}" addresses))
(:hostattrs (apply #'pushnew-hostattrs :ipv4 (flatten addresses))))
(defprop ipv6 :posix (&rest addresses)
- "Record the host's IPv6 addresses."
- (:desc (format nil "Has IPv6 ~{~A~^, ~}" addresses))
+ "Record the host's public Internet IPv6 addresses.
+
+If you need to record other addresses in hostattrs, such as on a LAN, write a
+similar property which pushes hostattrs identified by a non-keyword
+symbol (unless your consfig deals only in hosts without public IP addresses,
+in which case you can use this property)."
+ (:desc (format nil "Has public IPv6 ~{~A~^, ~}" addresses))
(:hostattrs (apply #'pushnew-hostattrs :ipv6 (flatten addresses))))
(defprop static :posix (interface address &optional gateway &rest options)
"Configures an interface with a static IP address.
OPTIONS is a list of even length of alternating keys and values."
(:desc #?"Static interface ${interface} configured")
+ ;; We don't push ADDRESS as an :IPV4 hostattr because perhaps it is not an
+ ;; address on the public Internet.
(:hostattrs (os:required 'os:debianlike))
(:apply
(when gateway