9front - general discussion about 9front
 help / color / mirror / Atom feed
From: covertusername967@gmail.com
To: 9front@9front.org
Subject: [9front] patch: add listenaddr plan9.ini variable
Date: Sun, 14 Mar 2021 19:58:36 -0500
Message-ID: <2FBC435C73B76DF9CA33E979A5871720@gmail.com> (raw)

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



                 reply	other threads:[~2021-03-15  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2FBC435C73B76DF9CA33E979A5871720@gmail.com \
    --to=covertusername967@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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