* [9front] patch: add listenaddr plan9.ini variable
@ 2021-03-15 0:58 covertusername967
0 siblings, 0 replies; only message in thread
From: covertusername967 @ 2021-03-15 0:58 UTC (permalink / raw)
To: 9front
Hello,
This patch changes cpurc to check for a listenaddr= variable set from
plan9.ini. If set, cpu servers will only listen on the specified
address.
diff -r cc26fdf57bb2 rc/bin/cpurc
--- a/rc/bin/cpurc Sat Mar 13 14:57:53 2021 +0100
+++ b/rc/bin/cpurc Sun Mar 14 19:57:16 2021 -0500
@@ -105,11 +105,17 @@
}){
# cpu+auth server
auth/keyfs -wp -m /mnt/keys /adm/keys
- aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
+ if(test -e /env/listenaddr)
+ aux/listen -q -t /rc/bin/service.auth -d $serviced -a $listenaddr tcp
+ if not
+ aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
}
if not {
# cpu server
- aux/listen -q -d $serviced tcp
+ if(test -e /env/listenaddr)
+ aux/listen -q -d $serviced -a $listenaddr tcp
+ if not
+ aux/listen -q -d $serviced tcp
}
if(test -f /dev/apm)
diff -r cc26fdf57bb2 sys/man/8/plan9.ini
--- a/sys/man/8/plan9.ini Sat Mar 13 14:57:53 2021 +0100
+++ b/sys/man/8/plan9.ini Sun Mar 14 19:57:16 2021 -0500
@@ -450,6 +450,8 @@
can be specified with the boot parameter above.
.SS \fLnora6=
Disable automatic IPv6 configuration from incoming router advertisements.
+.SS \fLlistenaddr\fI=ip\fP
+On cpu servers, restrict the IP address that listen(8) announces on to the specified address.
.SS DISKS, TAPES
(S)ATA controllers are autodetected.
.SS \fL*nodma=\fP
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-15 1:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 0:58 [9front] patch: add listenaddr plan9.ini variable covertusername967
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).