From nobody Wed Nov 01 08:27:49 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SL0WH33DQz500M6 for ; Wed, 1 Nov 2023 08:27:55 +0000 (UTC) (envelope-from atma@convalesco.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SL0WG5RDXz3DRJ for ; Wed, 1 Nov 2023 08:27:54 +0000 (UTC) (envelope-from atma@convalesco.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=convalesco.org header.s=fm3 header.b=Zd5+hf2A; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=B3WH2dyD; spf=pass (mx1.freebsd.org: domain of atma@convalesco.org designates 64.147.123.25 as permitted sender) smtp.mailfrom=atma@convalesco.org; dmarc=pass (policy=reject) header.from=convalesco.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 34CE0320093A for ; Wed, 1 Nov 2023 04:27:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 01 Nov 2023 04:27:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=convalesco.org; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1698827272; x=1698913672; bh=7NgU+vuysb2D0FM6M9vGzIhUD xN+RgMCGjYCEXlw/OE=; b=Zd5+hf2AfRVwEBcEo3fd7peZJcaMvtSjn0p+acL2U grw4v0gGwiTlIcx44zkpm4/56Ynqi+QyICoX5X3WuUb3JBtKWBMoLEuhXxhRzXdM ihNERe/r+5MDeZ2FKFkBX8b5DBmwMHg67U1P8YUCLzNuiiZQE68lHrqa11qm30Rx DEzGdneLBFCOVyTWYVwhB0pHLMf5FSbGnx4zh3Nj/4MMJpB1ddrJXmvPZlRlhfdj eD/dJgC83UiKpDuqr8SJrmLiIZR8egvF0z95m3V87J18ZPUntQ8BeUqe+3gzUGcD bK8yhdyKI8YV/t6AivR7OUi8wmgTp6zhbXIFvYZ1QJiug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698827272; x=1698913672; bh=7NgU+vuysb2D0FM6M9vGzIhUDxN+RgMCGjY CEXlw/OE=; b=B3WH2dyDaanvvxWeDSBBhkwFeXBQC2uKFZkQ0VNaVNpVqAO8Q5o bi/z0/MpxDZ4Z5ZlPSMlxFOoASqKsrkV0caF8kMUGxdusQZ8Keea1+VSXCHA3q4X rxKqVY5mcPRMpLJsHdzYZi+083lTgHVS74M8yF0ulLUM8abic8aZYeb7Y4EYndzk iUD86S8BA1BZgqcRFsz+IbiQhzs706TQJjDHQznGWmE6W+9J2V8lQGXk0b2/qeOi tIHzVyHXebyGl1CkCF95j9QqxvXoJJanA5ftdelCI2NujEXi74d/7TpB2GjxyfHA vBLXRVQX3qOeNNvBo2NOCt1k+VwDPmXdrWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddtfedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephfgtggfukfffvffosegrtdhmre hhtdejnecuhfhrohhmpefrrghnrghgihhothhishcutehtmhgrthiiihguihhsuceorght mhgrsegtohhnvhgrlhgvshgtohdrohhrgheqnecuggftrfgrthhtvghrnhepkedtteeigf ekuefhleettdetfeffkedufefhffegleetieffffdvkeeikeduffeinecuffhomhgrihhn pegtohhnvhgrlhgvshgtohdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrthhmrgestghonhhvrghlvghstghordhorhhg X-ME-Proxy: Feedback-ID: if8a042fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 1 Nov 2023 04:27:51 -0400 (EDT) From: Panagiotis Atmatzidis Content-Type: multipart/alternative; boundary="Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: tailscaled init script doesn't create tun0 Message-Id: <2328529D-F25F-44D0-B78D-6CED15A2974B@convalesco.org> Date: Wed, 1 Nov 2023 10:27:49 +0200 To: "freebsd-arm@freebsd.org" X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spamd-Result: default: False [-4.80 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[convalesco.org,reject]; RWL_MAILSPIKE_VERYGOOD(-0.20)[64.147.123.25:from]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; R_DKIM_ALLOW(-0.20)[convalesco.org:s=fm3,messagingengine.com:s=fm3]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.25:from]; MID_RHS_MATCH_FROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DKIM_TRACE(0.00)[convalesco.org:+,messagingengine.com:+]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@FreeBSD.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4SL0WG5RDXz3DRJ X-Spamd-Bar: ---- --Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, I installed =E2=80=9Ctailscale=E2=80=9D application as a binary package = in FreeBSD 13.2 running on RPi2. The architecture is arm7. When adding the the application to startup via `sysrc = tailscaled_enable=3D\=E2=80=9DYES\=E2=80=9D` the application hangs = because device tun0 is not being created. Once the device has been created manually, tailscaled will rename the = device to =E2=80=9Ctailscale0=E2=80=9D. The two existing flags =E2=80=9Ctailscaled_up_args=E2=80=9D and = =E2=80=9Ctailscaled_tun_dev=E2=80=9D cannot be used to create the = device. For the init to work as expected, I added these lines: ``` diff tailscaled /usr/local/etc/rc.d/tailscaled 67a68 > start_precmd=3D"${name}_prestart" 70a72,80 > > > tailscaled_prestart() > { > if [ ! -c /dev/tun ]; then > logger -s -t tailscale "Interface /dev/tun0 not found. = Creating /dev/tun0" > /sbin/ifconfig tun0 create > fi > } ``` I have no idea if this happens to other architectures and I=E2=80=99m = not sure if this should be handled by the init script or the application = itself. Kind regards, -- Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0x1A7BFEC5 gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5 "Everyone thinks of changing the world, but no one thinks of changing = himself.=E2=80=9D - Leo Tolstoy --Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello,

I = installed =E2=80=9Ctailscale=E2=80=9D application as a binary package in = FreeBSD 13.2 running on RPi2. The architecture is arm7.

When adding the the = application to startup via `sysrc tailscaled_enable=3D\=E2=80=9DYES\=E2=80= =9D` the application hangs because device tun0 is not being = created.
Once the device has been created manually, = tailscaled will rename the device to =E2=80=9Ctailscale0=E2=80=9D.

The two existing = flags =E2=80=9Ctailscaled_up_args=E2=80=9D and =E2=80=9Ctailscaled_tun_dev= =E2=80=9D cannot be used to create the device.

For the init to work as expected, I = added these lines:

```
diff tailscaled = /usr/local/etc/rc.d/tailscaled
67a68
> start_precmd=3D"${name}_prestart"
70a72,80
>
>
> = tailscaled_prestart()
> {
> = if [ ! -c /dev/tun ]; then
> = logger -s -t tailscale "Interface /dev/tun0 not found. Creating = /dev/tun0"
> /sbin/ifconfig tun0 = create
> fi
> = }
```

I have no idea if this happens to other = architectures and I=E2=80=99m not sure if this should be handled by the = init script or the application itself.


Kind= regards,

--
Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: = http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"Everyone thinks of changing = the world, but no one thinks of changing himself.=E2=80=9D - Leo = Tolstoy





= --Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD--