pgj / freebsd-wifibox

wifibox: Use Linux to drive your wireless card on FreeBSD
BSD 2-Clause "Simplified" License
164 stars 12 forks source link

Terminal mangled when attaching to existing console #122

Open vvillenave opened 1 month ago

vvillenave commented 1 month ago

Description

This is what I get when opening a console into a running wifibox image:

[root@arco ~]# wifibox console
Connecting, type "~." to leave the session...
Connected
root
wifibox:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A0:98:8A:05:71  
          inet addr:10.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::2a0:98ff:fe8a:571/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4958 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6358 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:622405 (607.8 KiB)  TX bytes:6470642 (6.1 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 14:13:33:E2:9A:C3  
          inet addr:192.168.206.153  Bcast:192.168.206.255  Mask:255.255.255.0
          inet6 addr: 2a0d:e487:48f:eab0:1613:33ff:fee2:9ac3/64 Scope:Global
          inet6 addr: fe80::1613:33ff:fee2:9ac3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6370 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4975 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5888956 (5.6 MiB)  TX bytes:622590 (607.9 KiB)

wifibox:~# 

So far, so good. Now if I open another terminal and try to type the same command, here’s what I get:

[root@arco ~]# wifibox console
Connecting, type "~." to leave the session...
Stale lock on nmdm-wifibox.1B PID=2426... overriding.
Connected
ot
: ro fundox:~#foieh0   nk cpEtheret  HWad A0:::051  
    int 0.1:.0 k       et6 add fe:2:9f:fe8a:574copeL
       UROADCAST RUNNING MLTICAST :15etr:1
     RXackets:5123 r0 dvrns fr:0
    ets:63erro:pe0 orunrri:0
   ollison:0eu0 
      RX bs:0 4 KTbytes:65058 (6 MiB)
lo incap:Local Loop
  ndr:2..  55.0.0.0
     inet6 addr::/12cHt
     UP LOB RUNINT:653c:1
          pat:rop:0 vr0me:0        TXackets:rrors:0pd overrrier:0
                                                                    lio tqeee     RX bytes (0B  X s:0 (0

       it6add d:87f:ea61:33e23/4 e:Glo   netf80::1633ff:ee2:9ac3/ :n    UROADCAST RNIMT00 ri:1    s:6rpe0 overruns0 frame:0
      ket errs:0 dropped:0 overru:0 carer:0
    ollis0 txqeen:1000 
   yes926 (5.Mi) byt:65348 (iB)

wfibx:~#

Host operating system

FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64

Wireless NIC

MT7921 802.11ax PCI Express Wireless Network Adapter

Wifibox version

Output of `wifibox version`.  Note that only the latest version is supported.

Disk image type and version

wifibox-alpine, git rev e0471d89221a3340c449ca4e0ece15c5f6d6a82b

Changes to the default configuration files

No response

Logs

No relevant log AFAICS.

Additional context

No response

Have you tried to turn it on and off?

pgj commented 4 weeks ago

Thanks for reporting the issue! Personally, I could not reproduce this. On my 13.4 system, the second invocation to wifibox console gives a error.

# wifibox console
Connecting, type "~." to leave the session...
all ports busy
Finished.

Maybe that is something specific to FreeBSD 14 and later versions. I will have to investigate this further.

pgj commented 3 weeks ago

I could not reproduce this issue on a freshly installed 14.1-RELEASE system either.