cdio(1): cdplay with next and prev

2022-08-08 Thread Lucian Popescu
Hi,

I'm trying to play some music from a CD with the following command:

lucian-pc# cdio cdplay 
track 1 'a' 0200/00018053   1%

>From another terminal I issue the following command to play the next
song:

lucian-pc# cdio next #exit code is 0

However this does not work. Can I use next and prev with cdplay? The man
page does not make this clear.

What I observed is that when using 'cdio play' with 'cdio next' the
track reported by 'cdio status' is indeed changed. The problem with this
approach is that 'cdio play' does not output any sound.

Below is the output of audioctl, mixerctl and dmesg.

Thanks!

audioctl:
name=azalia0
mode=play,record
pause=0
active=1
nblks=16
blksz=480
rate=48000
encoding=s16le
play.channels=2
play.bytes=57296640
play.errors=0
record.channels=2
record.bytes=57296640
record.errors=0

mixerctl:
outputs.dig-dac-0:1_sou=hdaudio
inputs.dac-0:1=156,156
inputs.dac-2:3=156,156
inputs.hp_source=sel6,mix6
inputs.spkr_source=dac-2:3,mix6
record.adc-2:3_source=mic2
record.adc-2:3_mute=off
record.adc-2:3=124,124
record.adc-0:1_source=mic
record.adc-0:1_mute=off
record.adc-0:1=124,124
inputs.sel3_source=dac-0:1
inputs.sel4_source=dac-0:1
inputs.beep_mute=off
inputs.beep=119
outputs.hp_mute=off
outputs.hp_boost=off
outputs.spkr_mute=off
outputs.spkr_boost=off
outputs.spkr_eapd=on
inputs.mic=85,85
outputs.mic_dir=input-vr80
inputs.mic2=85,85
outputs.mic2_dir=input-vr80
outputs.SPDIF_source=dig-dac-0:1
outputs.SPDIF_mute=off
outputs.SPDIF=126,126
outputs.mic3_mute=off
outputs.mic3_dir=input-vr80
inputs.mix4_source=sel3,mix6
inputs.mix6_source=mic,mic2
inputs.mix6_mic=120,120
inputs.mix6_mic2=120,120
outputs.mix6_mute=off
outputs.mix6=120,120
inputs.sel6_source=dac-0:1
inputs.sel7_source=dac-0:1
inputs.mic3_source=sel7,mix6
inputs.mic3=85,85
outputs.hp_sense=unplugged
outputs.mic_sense=unplugged
outputs.mic3_sense=unplugged
outputs.spkr_muters=hp,mic3
outputs.master=158,158
outputs.master.mute=off
outputs.master.slaves=dac-0:1,dac-2:3,hp,spkr
record.volume=124,124
record.volume.mute=off
record.volume.slaves=adc-2:3,adc-0:1
outputs.mode=analog
record.enable=sysctl

dmesg:
OpenBSD 7.1 (GENERIC.MP) #465: Mon Apr 11 18:03:57 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4201316352 (4006MB)
avail mem = 4056686592 (3868MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (73 entries)
bios0: vendor LENOVO version "7LETC1WW (2.21 )" date 07/01/2008
bios0: LENOVO 6480W2Q
acpi0 at bios0: ACPI 3.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF! SSDT SSDT 
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) 
EHC0(S3) EHC1(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 2194.86 MHz, 06-0f-0a
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 1995.01 MHz, 06-0f-0a
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: disabling user TSC (skew=-1028185)
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0xfed4/0x5000, device 0x32031114 rev 0x9
acpibat0 at acpi0: BAT0 model "42T5262" serial 15089 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpipwrres0 at acpi0: 

Re: wg(4) on router - how to get working with clients

2022-08-08 Thread B. Atticus Grobe
I've been running wg since it was introduced into the kernel without any issues.

local pf.conf:
...
pass in on wg0 from (wg0:network) to any
match out on wg0 from any to any nat-to (wg0)
...
pass out modulate state

remote pf.conf:
...
pass in on wg0
pass out on wg0
match out on vio0 nat-to (vio0)
...

The wireguard tunnel carries a gif tunnel with IPv6 traffic, routes on
the VPN via OSPF, and traffic NAT-d from multiple VLANs without issue.

Taking a hard look at rule hits using `pfctl -vvsr' can be very useful. Running
tcpdump against the wg interfaces and the physical interfaces on both ends has
helped me resolve many issues I've had when I've messed something up.



Re: "set -o multiline" in ksh?

2022-08-08 Thread Christian Weisgerber
On 2022-08-08, Federico Giannici  wrote:

> What I really miss is multiline editing of current (very long) commands 
> (ksh simply horizontally "scrolls", showing only a part of the command 
> line).
>
> I know that in standard ksh this functionality is activated with "set -o 
> multiline", but under OpenBSD (7.1 amd64) it gives this error:

OpenBSD's ksh is a tweaked pdksh, which in turn was intended as a
clone of ksh88, which simply did not implement multiline editing,
and so OpenBSD's ksh does not either.

"set -o multiline" and the related functionality is a ksh93 feature.

> So, is there any way to activate the multiline option in ksh?

No.

The pdksh/ksh88 line editor only uses extremely basic terminal
controls (backspace, carriage return) and overprinting, so it just
works on any video terminal.  Multiline editing requires arbitrary
cursor positioning and thus the need to bring in termcap/terminfo.
Admittedly, after some 35 years that design decision is feeling
rather outdated.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: Relayd Questions

2022-08-08 Thread Todd Carpenter
thank you for your comments, I will dig into it.

cheers

Get Outlook for iOS

From: owner-m...@openbsd.org  on behalf of Stuart 
Henderson 
Sent: Sunday, August 7, 2022 3:56:16 AM
To: misc@openbsd.org 
Subject: Re: Relayd Questions

On 2022-08-06, Todd Carpenter  wrote:
> Hi all,
>
> I've been trying to get relayd up and running on my configuration and had a
> couple of questions I could not find answers for.
>
> As I understand it, relayd is capable of making a "protocol" where you
> could essentially take connection details and call it whatever you like,
> then create rules in pf via that protocol.
>
> for example, in mwl's relayd book he creates a "dns fix protocol"
> relay dns {
>  listen on 203.0.113.213 port 53
>  forward to check tcp
>  protocol dnsfix
> }
>
> questions:
> how can I pass this to pf.conf and apply stickines to it to ensure that if
> the protocol dnsfix was routed to server 52 on the back end.. that all
> future requests are sent to server 52 and not server 17 (ie is this a
> relayd.conf thing.. or a pf.conf thing)?

Relays are userland TCP proxies done inside relayd. Configuring them
is done in relayd.conf. See

man relayd.conf | less "+/set the scheduling algorithm"

> is it possible to have multiple ports and protocols wrapped into a new
> protocol?
> for example I need port 443 tcp, 10443 tcp, 8000 udp and 8001 tcp  .. to be
> treated as a single connection.  Is a protocol even the right tool for the
> job? If so, how do you add multiple ports? or does each rule need to be
> seperate?  (an example would be awesome)

As a single protocol definition? You can't, you need separate ones.

> Next question, in regards to the previous question. How would you apply a
> stickiness state to ensure that all 4 ports from the same client are sent
> to the same server?

"mode source-hash" is probably the only option.

> last question..
> how do you decide what configuration should be placed in pf.conf vs
> relayd.conf?  and if your using an anchor like relayd .. in terms of pf, is
> there 1 config or are they seperate?
>
> IE: if i have a  in relayd.conf that defines {server1,2,3,4}  do I
> need the same table in my pf.conf file? or should I make the exact same
> table with a unique name? or are the relayd.conf tables used as both an
> anchor and expanded into the default pf.conf?

For the main part relayd loads what it needs into PF under the anchor.

If you're using _redirections_ with sticky-address and want that to persist
across multiple connections then see "src.track" in pf.conf(5).


--
Please keep replies on the mailing list.



Re: "set -o multiline" in ksh?

2022-08-08 Thread void

Hello,

On Mon, Aug 08, 2022 at 03:21:34PM +0200, Federico Giannici wrote:

I recently switched my shell from tcsh to the default OpenBSD shell (ksh).

What I really miss is multiline editing of current (very long) 
commands (ksh simply horizontally "scrolls", showing only a part of 
the command line).


I know that in standard ksh this functionality is activated with "set 
-o multiline", but under OpenBSD (7.1 amd64) it gives this error:


ksh: set: multiline: bad option

So, is there any way to activate the multiline option in ksh?


I'm not sure about multiline. 

But have you tried set -o emacs ? I have used this to get tcsh-like 
functionality.


hope this helps,



"set -o multiline" in ksh?

2022-08-08 Thread Federico Giannici

I recently switched my shell from tcsh to the default OpenBSD shell (ksh).

What I really miss is multiline editing of current (very long) commands 
(ksh simply horizontally "scrolls", showing only a part of the command 
line).


I know that in standard ksh this functionality is activated with "set -o 
multiline", but under OpenBSD (7.1 amd64) it gives this error:


ksh: set: multiline: bad option

So, is there any way to activate the multiline option in ksh?

Thanks



Re: wg(4) on router - how to get working with clients

2022-08-08 Thread Stuart Henderson
On 2022-08-08, Rachel Roch  wrote:
> TL;DR I've got wg(4) working great on the router itself (i.e. VPN up, all 
> localhost traffic routes across VPN). But I can't get it working with 
> external clients (i.e. devices that use the router as their default gateway).
>
> ip.forwarding is on:
> net.inet.ip.forwarding=1
> net.inet6.ip6.forwarding=1
>
> I've tried various combinations of pf rules, e.g. :
> pass out inet from 10.0.0.0/8 to ! nat-to (wg0)
>
> My hostname.wg0 looks like this:
> inet 172.16.111.25 255.255.255.255
> wgkey 
> wgpeer  wgendpoint   wgaip 0.0.0.0/0 wgaip ::/0 
> wgpka 20up
>
> The only reference I've found to this issue is a brief thread on Reddit which 
> suggests maybe there are some shortcomings in the wg(4) implementation 
> (https://www.reddit.com/r/openbsd/comments/hy8lv0/routing_vmm4_guest_traffic_via_a_wg4_tunnel/?utm_source=share_medium=web2x=3)
>
> Personally I think its more likely I've missed something simple in my config, 
> but I don't know what or where.

Check that the packets from "external clients" are actually hitting
your pf nat-to rule.

You can check the state table (pfctl -ss -v) - if packets are hitting
the nat-to rule you will see the natted address - if not then check
the rule number from the state output and lookup with "pfctl -sr -R
$rule_number -v" to see which rule they really are hitting.

Or you can use "log" in pf.conf, maybe with "match log(matches)", and
check "tcpdump -nettipflog0".

I like using "match ... nat-to" rather than putting nat-to on a "pass"
rule. I find it's easier to deal with.

-- 
Please keep replies on the mailing list.



Re: Making pppoe more resiliant to outages?

2022-08-08 Thread Zach Nedwich
Not too helpful but I have been having the same issue (twice in the past 
two days!)


I am on Internode HFC and I 'spose you must be on some variety of the 
same going off VLAN2.


Powering off the NTD for a minute helps but it's getting annoying.

I'm on 7.1 and happy to help test any fixes :)

Zach

On 8/08/2022 7:39 pm, Stuart Longland wrote:

Hi all,

So, I have an OpenBSD 7.0 router on a PC Engines APU3 (I'll put `dmesg`
in shortly), which directly connects to a NBN-supplied modem (network
termination device / "NBN Connection box").  For reasons unknown, PPPoE
traffic is emitted to the router on VLAN ID 2.

I have the following configuration:

vk4msl-gap# cat /etc/hostname.em2
up mtu 1526
vk4msl-gap# cat /etc/hostname.vlan2
vnetid 2
parent em2
txprio 1
up mtu 1508
vk4msl-gap# cat /etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE \
 pppoedev vlan2 authproto chap \
 authname u...@example.com \
 authkey hunter2 up
dest 0.0.0.1
inet6 eui64
!/sbin/route add default -ifp pppoe0 0.0.0.1
!/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
!sleep 5
!/sbin/pfctl -f /etc/pf.conf
!/usr/local/sbin/restart-dhcp6c
!sleep 5
!/sbin/pfctl -f /etc/pf.conf

This had been working fine for ages… but the past week it's been up and
down like a yo-yo.  I suspect it is *NOT* my end, but rather, common
equipment in our area because others in my street (oddly enough,
related ISPs) have the same problem with connectivity.  *BUT* I need to
appease L1 tech support, some of whom think a serial port is where
sailors go for breakfast.

Sometimes, the connection drops out, then returns on its own, some
minutes later.

Sometimes it does not return until I reboot the router.


Aug  8 19:04:48 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:48 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
request for it
Aug  8 19:05:44 vk4msl-gap /bsd: pppoe0: received unexpected PADO
Aug  8 19:05:45 vk4msl-gap last message repeated 13 times
Aug  8 19:06:08 vk4msl-gap dhcp6c[11939]: client6_send: transmit failed: 
Network is down
Aug  8 19:06:47 vk4msl-gap /bsd: pppoe0: received unexpected PADO
Aug  8 19:06:47 vk4msl-gap last message repeated 6 times
Aug  8 19:06:47 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3
Aug  8 19:06:47 vk4msl-gap /bsd: pppoe: received PADO but c
Aug  8 19:06:47 vk4msl-gap /bsd: ould not fi
Aug  8 19:06:47 vk4msl-gap /bsd: nd
Aug  8 19:06:47 vk4msl-gap /bsd: requ
Aug  8 19:06:47 vk4msl-gap /bsd: est
Aug  8 19:06:47 vk4msl-gap /bsd:  fo
Aug  8 19:06:47 vk4msl-gap /bsd: r i
Aug  8 19:06:47 vk4msl-gap /bsd: t
Aug  8 19:06:48 vk4msl-gap /bsd: pppoe0: host unique tag found, but it belongs 
to a connection in state 3

That's an excerpt of /var/log/messages.

I no
te t
he o
dd w
rapp
ing
of t
he t
ext
in t
he l
og,
no i
dea
why
that
happ
ens.

I note that odd wrapping does not occur in `dmesg` output.  I'll see if
I can get some PPPoE frames when the link is next down.  I'm not sure
if there's a way to force a PADI attempt, man page does not mention
any.  Presumably the "state 3" is some-sort of offline state, I'd have
to read the source to figure what that is.

Should OpenBSD maybe respond to other PADO requests, or does it _have_
to respond to only the PADO replying to its PADI -- is that a PPPoE
requirement?

Have there been any significant changes in the PPPoE driver between 7.0
and 7.1?

The following is my `dmesg`:

OpenBSD 7.0 (GENERIC.MP) #0: Sun May 15 02:01:36 MDT 2022
 
t...@syspatch-70-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261076992 (4063MB)
avail mem = 4115894272 (3925MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: 

Re: Making pppoe more resiliant to outages?

2022-08-08 Thread Stuart Henderson
On 2022-08-08, Stuart Longland  wrote:
> This had been working fine for ages… but the past week it's been up and
> down like a yo-yo.  I suspect it is *NOT* my end, but rather, common
> equipment in our area because others in my street (oddly enough,
> related ISPs) have the same problem with connectivity.  *BUT* I need to
> appease L1 tech support, some of whom think a serial port is where
> sailors go for breakfast.

Do you have an ISP-supplied router you can use temporarily?
That's often a better bet when trying to get them to fix something
which you strongly suspect is their fault..removes anything "weird"
from the equation.

> Have there been any significant changes in the PPPoE driver between 7.0
> and 7.1?

Not really between 7.0 and 7.1. Session time calculation changed from
UTC time to uptime and there's handling for fetching nameserver addresses.

But there were some locking-related changes that went in before 7.0;
-current has taken steps back from these.




Re: Making pppoe more resiliant to outages?

2022-08-08 Thread void

On Mon, Aug 08, 2022 at 07:39:06PM +1000, Stuart Longland wrote:


Sometimes it does not return until I reboot the router.

Aug  8 19:04:48 vk4msl-gap /bsd: pppoe0: host unique tag found, 
but it belongs to a connection in state 3


I have this in my kernel:

option PPPOE_TERM_UNKNOWN_SESSIONS

and since including it and rebuilding/installing the new kernel,
the long-time-to-connect issue has gone. You may find it useful 
to do the same.


This is with an edgerouter lite 3 using pppoe on a fibre connection.
It's not specifying any vlan tag. it still takes a few minutes to
connect, but that might be down to my own lack of optimisation
of the pppoe connection. It's running 7.1-stable.

good luck,



Re: Upgrading from 7.0 to 7.1

2022-08-08 Thread Tobias Fiebig
Heho,
I would still assume that there is _something_ wrong with your network setup. 
The information that the system failing to upgrade runs on VMM is somewhat 
important. Please also not that seemingly both, http and https for retrieving 
the sets failed in your initial message.

Can you please provide the output of the following commands, ideally prefixed 
with the command, as a paste (not dumped into an email). You can redact the 
first three octets of IPv4 addresses and the first 48 bits of IPv6 addresses, 
if you prefer, as well as the top and second level part of domains, if you 
prefer.

On host.,:

cat /etc/mygate
cat /etc/resolv.conf
sysctl net.inet.ip.forwarding
sysctl net.inet6.ip6.forwarding
cat /etc/pf.conf
ls /etc/hostname.*
cat /etc/honstname.*
ifconfig
cat /etc/vm.conf

On the vm with the upgrade issue to 7.1, prior to the upgrade when booted into 
7.0:

cat /etc/mygate
cat /etc/resolv.conf
cat /etc/pf.conf
ls /etc/hostname.*
cat /etc/honstname.*
ifconfig

With best regards,
Tobias

P.S.: Please keep replies on list. There is nothing more frustrating than 
having the same issue as you, digging through promising mailing list archives, 
and then figuring out that the solution went off-list.

-Original Message-
From: latin...@vcn.bc.ca  
Sent: Sunday, 7 August 2022 20:58
To: Tobias Fiebig 
Subject: Re: Upgrading from 7.0 to 7.1

Hello Tobias

It ia a vm at host.
I am testing again with 7.0 installation to upgrade to 7.1, the reason is 
because it failed with something related to https. Please look the download 
stoped repently again; i think that dns resolution is not a problem; but you 
know better:

host$ vmctl console agrox
Connected to /dev/ttypf (speed 115200)

Server directory? [pub/OpenBSD/7.0/amd64]

Select sets by entering a set name, a file name pattern or 'all'. De-select 
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'.
[X] bsd   [X] comp70.tgz[X] xbase70.tgz   [X] xserv70.tgz
[X] bsd.rd[X] man70.tgz [X] xshare70.tgz
[X] base70.tgz[X] game70.tgz[X] xfont70.tgz
Set name(s)? (or 'abort' or 'done') [done]
Get/Verify SHA256.sig   100% |**|  2144   00:00
Signature Verified
Get/Verify bsd  100% |**| 21090 KB01:17
Get/Verify bsd.rd   100% |**|  4109 KB00:12
Get/Verify base70.tgz37% |* |   113 MB   
12:10 ETA

PS:
$ host agrox.host.
agrox.host. has address .96 agrox.host. has IPv6 address 
::

But ifconfig says .224





Making pppoe more resiliant to outages?

2022-08-08 Thread Stuart Longland
Hi all,

So, I have an OpenBSD 7.0 router on a PC Engines APU3 (I'll put `dmesg`
in shortly), which directly connects to a NBN-supplied modem (network
termination device / "NBN Connection box").  For reasons unknown, PPPoE
traffic is emitted to the router on VLAN ID 2.

I have the following configuration:
> vk4msl-gap# cat /etc/hostname.em2 
> 
> up mtu 1526
> vk4msl-gap# cat /etc/hostname.vlan2
> vnetid 2
> parent em2
> txprio 1
> up mtu 1508
> vk4msl-gap# cat /etc/hostname.pppoe0  
> 
> inet 0.0.0.0 255.255.255.255 NONE \
> pppoedev vlan2 authproto chap \
> authname u...@example.com \
> authkey hunter2 up
> dest 0.0.0.1
> inet6 eui64
> !/sbin/route add default -ifp pppoe0 0.0.0.1
> !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
> !sleep 5
> !/sbin/pfctl -f /etc/pf.conf
> !/usr/local/sbin/restart-dhcp6c
> !sleep 5
> !/sbin/pfctl -f /etc/pf.conf

This had been working fine for ages… but the past week it's been up and
down like a yo-yo.  I suspect it is *NOT* my end, but rather, common
equipment in our area because others in my street (oddly enough,
related ISPs) have the same problem with connectivity.  *BUT* I need to
appease L1 tech support, some of whom think a serial port is where
sailors go for breakfast.

Sometimes, the connection drops out, then returns on its own, some
minutes later.

Sometimes it does not return until I reboot the router.

> Aug  8 19:04:48 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:48 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:04:49 vk4msl-gap /bsd: pppoe: received PADO but could not find 
> request for it
> Aug  8 19:05:44 vk4msl-gap /bsd: pppoe0: received unexpected PADO
> Aug  8 19:05:45 vk4msl-gap last message repeated 13 times
> Aug  8 19:06:08 vk4msl-gap dhcp6c[11939]: client6_send: transmit failed: 
> Network is down
> Aug  8 19:06:47 vk4msl-gap /bsd: pppoe0: received unexpected PADO
> Aug  8 19:06:47 vk4msl-gap last message repeated 6 times
> Aug  8 19:06:47 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3
> Aug  8 19:06:47 vk4msl-gap /bsd: pppoe: received PADO but c
> Aug  8 19:06:47 vk4msl-gap /bsd: ould not fi
> Aug  8 19:06:47 vk4msl-gap /bsd: nd 
> Aug  8 19:06:47 vk4msl-gap /bsd: requ
> Aug  8 19:06:47 vk4msl-gap /bsd: est
> Aug  8 19:06:47 vk4msl-gap /bsd:  fo
> Aug  8 19:06:47 vk4msl-gap /bsd: r i
> Aug  8 19:06:47 vk4msl-gap /bsd: t
> Aug  8 19:06:48 vk4msl-gap /bsd: pppoe0: host unique tag found, but it 
> belongs to a connection in state 3

That's an excerpt of /var/log/messages.

I no
te t
he o
dd w
rapp
ing 
of t
he t
ext 
in t
he l
og, 
no i
dea 
why 
that
happ
ens.

I note that odd wrapping does not occur in `dmesg` output.  I'll see if
I can get some PPPoE frames when the link is next down.  I'm not sure
if there's a way to force a PADI attempt, man page does not mention
any.  Presumably the "state 3" is some-sort of offline state, I'd have
to read the source to figure what that is.

Should OpenBSD maybe respond to other PADO requests, or does it _have_
to respond to only the PADO replying to its PADI -- is that a PPPoE
requirement?

Have there been any significant changes in the PPPoE driver between 7.0
and 7.1?

The following is my `dmesg`:

OpenBSD 7.0 (GENERIC.MP) #0: Sun May 15 02:01:36 MDT 2022

t...@syspatch-70-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261076992 (4063MB)
avail mem = 4115894272 (3925MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @