* [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
9front - general discussion about 9front
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/9front
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
9front@9front.org
public-inbox-index 9front
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.9front
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git