Re: Install octeon on Qemu question(s)

2016-09-14 Thread soko.tica
I've got offlist three e-mail messages from the people having the same
problem as myself. I am still stuck with it.

If that matters I am not young and I have various health issues. I am
unable to start installation on qemu mips, e.g.

$ qemu-system-mips -m 512 -serial pty -hda IMAGEFORMIPS.img -hdb
MINIROOT60.fs -boot d

starts qemu, and on serial

#cu -l cua /dev/ttyp6
Connected to /dev/ttyp6 (speed 9600)

What should I do from there? Please, let someone give me a clue.

Thanks in advance.

On Fri, Sep 9, 2016 at 12:08 PM, soko.tica  wrote:

> Hello,
>
> I am unsucesfully trying to install octeon on Qemu (I have managed to
> install it on Ubiquity edge router Lite, but I need a qemu guest for
> updating the router as needed).
>
> After much trouble, i have managed to alter miniroot for booting via
> serial, if that was needed at all.
> ===
> # vnconfig vnd0 miniroot60.fs
>
> # mount /dev/vnd0i /mnt
> # ls -lh /mnt
> total 16672
> -rw-r--r--  1 root  wheel   8.1M Jul 29 08:32 bsd.rd
> # mkdir /mnt/etc
> # echo 'set tty com0'>/mnt/etc/boot.conf
>
> # umount /mnt
> # vnconfig -u vnd0
> ===
> I'm trying to install miniroot.fs according to the instructions from
> /usr/local/share/doc/pkg-readmes/qemu, but I am always getting the errors
> I don't understand, e.g.:
> ===
> $ qemu-system-mips64 -m 512 -serial stdio -hda octeon.img -hdb
> miniroot60.fs ->
> WARNING: Image format was not specified for 'miniroot60.fs' and probing
> guessed raw.
>  Automatically detecting the format is dangerous for raw images,
> write operations on block 0 will be restricted.
>  Specify the 'raw' format explicitly to remove the restrictions.
> qemu-system-mips64: Could not load MIPS bios 'mips_bios.bin', and no
> -kernel argument was specified
> $ qemu-system-mips64 -m 512 -serial stdio -hda octeon.img format=raw -hdb
> miniroot60<
> qemu-system-mips64: -hda octeon.img: drive with bus=0, unit=0 (index=0)
> exists
> ===
>
> Please point to what should I do to accomplish it, I have already wasted
> too much time on it.
>
> Thanks in advance.



Re: cwm crashes when launching soffice

2016-09-14 Thread Ted Unangst
Jan Stary wrote:
> On current/amd64, cwm crashes if I launch `soffice' from an xterm.
> The other window managers (fvwm and twm) don't crash with this.
> Other X clients don't crash cwm (firefox etc launch OK).

probably fixed about one minute ago.



Re: cwm crashes when launching soffice

2016-09-14 Thread Okan Demirmen
On Wed 2016.09.14 at 22:47 +0200, Jan Stary wrote:
> On current/amd64, cwm crashes if I launch `soffice' from an xterm.
> The other window managers (fvwm and twm) don't crash with this.
> Other X clients don't crash cwm (firefox etc launch OK).

Doh, brynet hit this a bit ago as well - fix should already be in...I
missed a case it seems :(

Thanks for the report!



cwm crashes when launching soffice

2016-09-14 Thread Jan Stary
On current/amd64, cwm crashes if I launch `soffice' from an xterm.
The other window managers (fvwm and twm) don't crash with this.
Other X clients don't crash cwm (firefox etc launch OK).

dmesg and Xorg.0.log below. A typical crashing session looks like this
(this is on the console that launched startx, not in Xorg.0.log):

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: OpenBSD 6.0 amd64
Current Operating System: OpenBSD dell.stare.cz 6.0 GENERIC.MP#0 amd64
Build Date: 12 September 2016  05:10:45PM

Current version of pixman: 0.32.8
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Sep 14 22:14:46 2016
(==) Using system config directory "/usr/X11R6/share/X11/xorg.conf.d"
mtrr set d000 1ff failed: Invalid argument
cwm(28321) in free(): error: bogus pointer (double free?) 0x1d672f35d060
Abort trap
xinit: connection to X server lost

waiting for X server to shut down xterm: fatal IO error 35 (Resource 
temporarily unavailable) or KillClient on X server ":0"
.(II) Server terminated successfully (0). Closing log file.


The "mtrr set failed" error message appears in all my X sessions
(i.e. including the working ones) and is not related to this crash. 

Without malloc.conf, the bogus pointer seemingly random,
such as 0x1d672f35d060 above.

With malloc.conf -> C, the bogus pointer is 0xdfdfdfdfdfdfdfdf.
With malloc.conf -> F, the bogus pointer is 0xdfdfdfdfdfdfdfdf.
With malloc.conf -> G, the bogus pointer is 0xdfdfdfdfdfdfdfdf.
With malloc.conf -> P, the bogus pointer is 0xdfdfdfdfdfdfdfdf.
With malloc.conf -> S, the bogus pointer is 0xd0d0d0d0d0d0d0d0.
With malloc.conf -> U, the bogus pointer is 0xdfdfdfdfdfdfdfdf.

These must be the "junk bytes" as described in malloc.conf(5).
This leads me to speculate that cwm has a malloc/free problem.

What puzzles me is that running anything else does not crash,
just soffice inside cwm. Running 'soffice' inside fvwm or twm works.
Running anything else inside cwm works.

Is anyone seeing this too?
How can I further debug this?

Jan


OpenBSD 6.0-current (GENERIC.MP) #0: Tue Sep 13 13:08:03 CEST 2016
h...@dell.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16810340352 (16031MB)
avail mem = 16296374272 (15541MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xeac10 (107 entries)
bios0: vendor Dell Inc. version "1.5.0" date 04/22/2016
bios0: Dell Inc. Latitude E5570
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT LPIT SSDT SSDT SSDT DBGP 
DBG2 SSDT UEFI SSDT SSDT SLIC ASF!
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
PXSX(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) 
PXSX(S4) RP13(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz, 2295.41 MHz
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz, 2294.65 MHz
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz, 2294.65 MHz
cpu2: 
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,

Re: configure ethernet and wireless(solved)

2016-09-14 Thread George Pediaditis
I found the problem.
The hostname.iwm0 was
"nwid COSMOTE-C4F2EC
wpakey QqCjuQZJfHAfZCbS
wpaakms psk
up"

and i change it to
"up
nwid COSMOTE-C4F2EC
wpakey QqCjuQZJfHAfZCbS
wpaakms psk"

thanks

On Wed, Sep 14, 2016 at 10:05 PM, Raf Czlonka  wrote:
> On Wed, Sep 14, 2016 at 06:59:49PM BST, George Pediaditis wrote:
>
>> then i followed the instructions on faq to setup a trunk interface.
>>
>> I created the files
>> /etc/hostname.re0 that contains:
>> "up"
>>
>> /etc/hostname.iwm0 that contains:
>> "nwid (ssid)
>> wpakey (wpa psk)
>> wpaakms (psk)
>> up"
>>
>> and /etc/hostname.trunk0 that contains:
>>
>> "trunkproto failover trunkport bge0
>> trunkport iwn0
>> dhcp"
>
> Hi George,
>
> You have you used bge(4) and iwn(4) - interfaces which you don't
> have - instead of re(4) and iwm(4)?
>
> ;^)
>
> Regards,
>
> Raf



Re: configure ethernet and wireless(solved)

2016-09-14 Thread George Pediaditis
@Raf Czlonka
Thanks for your replay.  The hostname.trunk0 is correct. My laptop
didn't have access to internet so i used another computer and copied
that part from the webpage and i forgot to change it.



On Wed, Sep 14, 2016 at 10:05 PM, Raf Czlonka  wrote:
> On Wed, Sep 14, 2016 at 06:59:49PM BST, George Pediaditis wrote:
>
>> then i followed the instructions on faq to setup a trunk interface.
>>
>> I created the files
>> /etc/hostname.re0 that contains:
>> "up"
>>
>> /etc/hostname.iwm0 that contains:
>> "nwid (ssid)
>> wpakey (wpa psk)
>> wpaakms (psk)
>> up"
>>
>> and /etc/hostname.trunk0 that contains:
>>
>> "trunkproto failover trunkport bge0
>> trunkport iwn0
>> dhcp"
>
> Hi George,
>
> You have you used bge(4) and iwn(4) - interfaces which you don't
> have - instead of re(4) and iwm(4)?
>
> ;^)
>
> Regards,
>
> Raf



Re: configure ethernet and wireless

2016-09-14 Thread Raf Czlonka
On Wed, Sep 14, 2016 at 06:59:49PM BST, George Pediaditis wrote:

> then i followed the instructions on faq to setup a trunk interface.
> 
> I created the files
> /etc/hostname.re0 that contains:
> "up"
> 
> /etc/hostname.iwm0 that contains:
> "nwid (ssid)
> wpakey (wpa psk)
> wpaakms (psk)
> up"
> 
> and /etc/hostname.trunk0 that contains:
> 
> "trunkproto failover trunkport bge0
> trunkport iwn0
> dhcp"

Hi George,

You have you used bge(4) and iwn(4) - interfaces which you don't
have - instead of re(4) and iwm(4)?

;^)

Regards,

Raf



Re: configure ethernet and wireless

2016-09-14 Thread Gregor Best
Hi George,

On Wed, Sep 14, 2016 at 08:59:49PM +0300, George Pediaditis wrote:
> then i followed the instructions on faq to setup a trunk interface.
> [...]
> and /etc/hostname.trunk0 that contains:
> 
> "trunkproto failover trunkport bge0
> trunkport iwn0
> dhcp"
> [...]

My /etc/hostname.trunk0 has the 'trunkport' entries on separate lines.
That shouldn't make a difference though. Apart from that, it looks
similar.

> 
> Ethernet and wifi doesn't work i reboot my laptop and instead of the
> desktop i ended up in command line. ethernet and wifi  still don't
> work.
> [...]

That sounds weird. Are there error messages of any kind? X should (tm)
work even if there's no network. Is xdm in the output of 'rcctl ls on'?

> [...]
> [demime 1.01d removed an attachment of type application/octet-stream which 
> had a name of dmesg.out]
> 
> [demime 1.01d removed an attachment of type application/octet-stream which 
> had a name of dmesg2.out]
> 

The mailing list stripped your attachments. You'll have to provide them
in-line. It'd also be cool if you could provide the output of ifconfig
and /etc/netstart with your new hostname files.

-- 
Gregor



Re: acpithinkpad(4): mute speaker on boot

2016-09-14 Thread Anton Lindqvist
On Tue, Sep 13, 2016 at 10:48:26AM -0600, Theo de Raadt wrote:
> > Anton Lindqvist wrote:
> > > I'm trying to fix a minor annoyance on my x240: the speaker mute key
> > > LED-state is not respected at boot. Pressing the mute key will mute the
> > > speaker while the expected behavior is to unmute. The LED-state will
> > > remain out-of-sync until I run `mixerctl -t outputs.master.mute`.
> > > 
> > > I've managed to determine if the speaker is muted in the acpithinkpad(4)
> > > attach function by reading from the embedded controller. However,
> > > calling wskbd_set_mixervolume at this stage returns ENODEV. I assume the
> > > audio device has not been attached yet. I'm new to kernel development
> > > and therefore wonder if this approach makes sense. If true, is it
> > > possible to postpone a task to run once a certain device has attached?
> > 
> > The function you're looking for is startuphook_establish.
> > 
> > But this requires crazy amounts of testing, since many thinkpads will be
> > different. It's well known that the mute button, hardware state, and 
> > software
> > state can became desynced, but the specifics vary by model. 
> > 
> 
> Actually, I think Anton might be onto something here.  The desyncronization
> may be due to the audio driver + BIOS not recognizing the other's state.

By using startuphook_establish, as proposed by tedu@, I managed to get
it working. Booting with the volume muted before reboot and the volume
not muted before reboot both behaves correctly.

A few comments regarding the patch:

- At first, I tried sticking all code in the startuphook function
  because it felt like a good approach to keep all the logic in one
  place and reduce the number of ifdef-conditionals. However, that
  caused my kernel to halt since the EC is busy at this point and the
  assertion in acpiec.c:337 failed. The only other usage of acpiec_read
  I can find is related to polling the sensors. I therefore kept volume
  reading from the EC inside the attached function and moved it prior
  attaching the sensors. The kernel then continued successfully, but I'm
  still worried a that potential race still can occur. Or is the action
  taken enough to make the volume EC read atomic?

- I didn't bother checking the return value of startuphook_establish
  since I couldn't find any other invocation in the kernel doing so.

- The VOLUME_MUTE_MASK is taken from the FreeBSD ThinkPad ACPI driver.

If the patch looks good, then I would like to add some logging prior
asking people to try it out.

Index: acpithinkpad.c
===
RCS file: /cvs/src/sys/dev/acpi/acpithinkpad.c,v
retrieving revision 1.52
diff -u -p -r1.52 acpithinkpad.c
--- acpithinkpad.c  5 May 2016 05:12:49 -   1.52
+++ acpithinkpad.c  14 Sep 2016 07:38:08 -
@@ -16,6 +16,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #include 
@@ -105,6 +106,7 @@
 #define THINKPAD_NSENSORS 9
 #define THINKPAD_NTEMPSENSORS 8
 
+#define THINKPAD_ECOFFSET_VOLUME   0x30
 #define THINKPAD_ECOFFSET_FANLO0x84
 #define THINKPAD_ECOFFSET_FANHI0x85
 
@@ -163,6 +165,7 @@ voidthinkpad_sensor_attach(struct ac
 voidthinkpad_sensor_refresh(void *);
 
 #if NAUDIO > 0 && NWSKBD > 0
+void thinkpad_attach_deferred(void *);
 extern int wskbd_set_mixervolume(long, long);
 #endif
 
@@ -252,12 +255,24 @@ thinkpad_attach(struct device *parent, s
 {
struct acpithinkpad_softc *sc = (struct acpithinkpad_softc *)self;
struct acpi_attach_args *aa = aux;
+   uint8_t vol = 0;
 
sc->sc_acpi = (struct acpi_softc *)parent;
sc->sc_devnode = aa->aaa_node;
 
printf("\n");
 
+#if NAUDIO > 0 && NWSKBD > 0
+   if (sc->sc_acpi->sc_ec != NULL) {
+   acpiec_read(sc->sc_acpi->sc_ec, THINKPAD_ECOFFSET_VOLUME,
+   1, &vol);
+#define VOLUME_MUTE_MASK 0x40
+   if ((vol & VOLUME_MUTE_MASK) == VOLUME_MUTE_MASK)
+   /* Defer speaker mute */
+   startuphook_establish(thinkpad_attach_deferred, sc);
+   }
+#endif
+
/* Set event mask to receive everything */
thinkpad_enable_events(sc);
thinkpad_sensor_attach(sc);
@@ -722,3 +737,11 @@ thinkpad_set_param(struct wsdisplay_para
return -1;
}
 }
+
+#if NAUDIO > 0 && NWSKBD > 0
+void
+thinkpad_attach_deferred(void *v __unused)
+{
+   wskbd_set_mixervolume(0, 1);
+}
+#endif



configure ethernet and wireless

2016-09-14 Thread George Pediaditis
Hello! Im new to openbsd.
I just installed it to my new laptop and i want to configure wireless
and ethernet.
my laptop has Intel dual band wireless ac 3165 for wireless and
realtek 8168 for ethernet.
Ethernet worked fine when i installed it.

I wanted to connect with ethernet (re0 interface) if its available. If
it isn't available then it should connect with my wifi. (iwm0
interface)
i follow the instructions on faq

First i created an hostname.iwm0 that contained:
"nwid (ssid)
wpakey (wpa psk)
wpaakms (psk)
dhcp"

i disconnect ethernet and used sh /etc/netstart iwm0 to restart the
network it worked fine.

then i followed the instructions on faq to setup a trunk interface.

I created the files
/etc/hostname.re0 that contains:
"up"

/etc/hostname.iwm0 that contains:
"nwid (ssid)
wpakey (wpa psk)
wpaakms (psk)
up"

and /etc/hostname.trunk0 that contains:

"trunkproto failover trunkport bge0
trunkport iwn0
dhcp"


Ethernet and wifi doesn't work i reboot my laptop and instead of the
desktop i ended up in command line. ethernet and wifi  still don't
work.

i attach the output of dmesg -s and dmesg

In dmesg i get messages like these

"arp: attempt to overwrite entry for 192.168.1.1 on re0 by
c8:3a:35:20:3c:d8 on iwm0
arp: attempt to add entry for 192.168.1.1 on re0 by 74:a7:8e:c4:f2:ec on trunk0
arp: attempt to add entry for 192.168.1.1 on re0 by 74:a7:8e:c4:f2:ec on trunk0
arp: attempt to add entry for 192.168.1.1 on re0 by 74:a7:8e:c4:f2:ec on trunk0
"
i search the man pages and i got this:
"arp: attempt to add entry for %s on %s by %s on %s
This usually indicates there is more than one interface connected to
the same hub, or that the networks have somehow been short-circuited
(e.g. IPs that should have been present on interface one are present
on interface two)."
I didn't find how to fix it.

Thank you for your help.

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of dmesg.out]

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of dmesg2.out]



ftp5.usa.openbsd.org going down 7pm-1am Sunday September 18th

2016-09-14 Thread Kurt Mosiejczuk
Due to a just-announced power outage happening this Sunday night, 
ftp5.usa.openbsd.org will be going down around 7pm EDT (UTC-4) on
Sunday September 14th.  I will bring it back up when the power comes 
back at midnight EDT, so it should be back up by 1am EDT.

FYI

--Kurt Mosiejczuk



Re: PPPoE (5.9 still): https gets stuck

2016-09-14 Thread Harald Dunkel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi folks,

On 09/13/2016 02:58 PM, Stuart Henderson wrote:
> 
> See "MTU/MSS ISSUES" in pppoe(4).
> 
indeed, its documented, but its also a little bit misleading.
Reading the man page I had the first impression that modifying
the mtu and max-mss are equally effective. Apparently they
are not.

AFAIU setting the max-mss affects TCP traffic only (e.g.
HTTPS). It defines the maximum payload block size on sending
and receiving(!) data via TCP. UDP and other protocols are not
affected. Very important to know if you run IPsec or openvpn
or other non-TCP protocols over the PPPoE tunnel.

The mtu works on ethernet level, giving the maximum packet
size to send(!) to the next hop without fragmentation,
regardless if the higher level protocol is TCP, UDP, ESP or
whatever.

Point is, setting the MTU does not affect the data flow from
the peer back to your site. AFAIU this made the difference
in this case. Reducing the max-mss seems to be a workaround
for some networking issue I cannot fix.

My current configuration uses both baby jumbo frames (mtu = 1508
on re0 and mtu = 1500 on pppoe0) and "scrub (max-mss 1452)" for
TCP traffic on pppoe0 (1500 bytes - 40 bytes TCP/IP header -
8 bytes PPPoE frame).


Regards
Harri


-BEGIN PGP SIGNATURE-

iQEcBAEBCAAGBQJX2XrzAAoJEAqeKp5m04HL6XcH/AsbZ4Cw0d/h3gwJGLYsk5/m
XehdN7Sc6c8yHRksVCShC59V24NO89Xx+/SM+oVz6cXrszhDKw2K0wkBhMj3+aRV
n6HUImpbkfnDE0TraxllcmDOljADLJut95LAetVkufiSIGsZVeofyx6JXdoW9xld
hHVGR90b31a4FdO2PZE9gn2Cq1vMroTOdhXzjvqbIPGoiBz1ojaETJbTZTYtbfDp
HeK0Sm1NMRtTZDO0IB/T+1G4CM/Ocmdtp6Pl1sIjsojJF5JKltt8J8D4gPFIS7dd
dTk81hTVAXJuTb5oMWizRyq95+5ZarPbMThBtgHDYotIafc1ZpuHqrAvuQcYmRs=
=QB+k
-END PGP SIGNATURE-



npppd dies, posiibly due to lost route to radius server

2016-09-14 Thread Marko Cupać
Hi,

I have two active/passive CARPed boxes of 5.9 with latest errata patches
which serve as NAT firewalls, but also as pptp servers, which
authenticate users from Microsoft's implementation of radius server
(NPS).

In last two weeks, I had three occurrences of npppd going down. Last
32650 (!) lines of npppd log are the following two lines:

---cut-here---
Sep 14 15:32:50 nat1 npppd[11097]: sendto() failed in radius_request0:
No route to host
Sep 14 15:32:50 nat1 npppd[11097]: ppp id=956 radius accounting request
failed: No route to host
---cut-here---

Interestingly enough, last two lines have timestamp of only one second
later from the first two (of 32650):

---cut-here---
Sep 14 15:32:51 nat1 npppd[11097]: ppp id=956 radius accounting request
failed: No route to host
Sep 14 15:32:51 nat1 npppd[11097]: sendto() failed in radius_request0:
No route to host
---cut-here---

I am redirecting all the npppd logging to separate file by the
following configuration in syslog.conf:

---cut-here---
!!npppd
*.* /var/log/npppd
!*
---cut-here---

So, I would say the system logged 32650 lines of inaccessible radius
server in just one second, and finally crashed.

I noticed also following message in daemon log from a few minutes
before the crash:

---cut-here---
Sep 14 15:29:22 nat1 ospfd[2087]: send_packet: error sending packet on
interface bnx0: No buffer space available
---cut-here---

bnx0 is the interface over which radius server is accessed. I am aware
of errata 008_bnx.patch, and it is applied on this box as I said
earlier.

Is there anything I can do to prevent this?

Thank you in advance,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/



Re: PPPoE (5.9 still): https gets stuck

2016-09-14 Thread Christian Weisgerber
On 2016-09-13, "Peter J. Philipp"  wrote:

> This interests me because I'm switching to Deutsche Telekom in february
> 2017.  I did research back in
>
> march or april of 2016 on how to connect to Telekom with an allnet vdsl
> modem and I came across hints that Telekom uses vlan tagging.  I made
> notes but I don't know how updated they are, but you

That setup is straightforward.

The Allnet VDSL modem doesn't require any configuration; you just
plug it in.  (The device is actually a fully-fledged CPE with the
usual home gateway functionality, but that's all disabled by default.)

On the OpenBSD gateway, I have this:

==> hostname.em2 <==
description WAN
up

==> hostname.vlan0 <==
description "T-Online Internet"
vlan 7 vlandev em2

==> hostname.pppoe0 <==
description T-Online
inet 0.0.0.0 255.255.255.255 NONE \
pppoedev vlan0 authproto pap \
authname m...@t-online.de authkey  up
dest 0.0.0.1
!route add default -ifp \$if 0.0.0.1


The authentication information is derived like above from the four
magic numbers provided by Telekom:

"Zugangsnummer" 
"Kennwort"  
"Anschlusskennung"  
"Mitbenutzernummer" 

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



Re: calendar(1) entries for Sep 14 & 15

2016-09-14 Thread Jason McIntyre
On Wed, Sep 14, 2016 at 07:53:19AM -0500, Carson Chittom wrote:
> I noticed a couple of minor things in my daily calendar reminder
> email to draw someone's attention to:
> 
> 
> car...@oxford.wistly.net (Reminder Service) writes:
> 
> > Sep 14  The Selective Service Act establishes the first peacetime 
> > draft, 1940
> 
> This is in calendar.history -- I would suggest moving it to
> calendar.ushistory and/or amending it to read "...in the US"; I assume
> this wasn't the first instance of a peacetime draft in the history of
> the world, which seems implausible.
> 

there is a (painful) overlap in some of these files. i went with the
path of least resistance and left it in calendar.history. i updated the
entry to "US peacetime draft" to keep it in 80chars.

> > Sep 15  The Nazi's adopt a new national flag with the swastika, 1935
> 
> The apostrophe is extraneous here; it should just be "The Nazis"
> 

ouch.

jmc



calendar(1) entries for Sep 14 & 15

2016-09-14 Thread Carson Chittom
I noticed a couple of minor things in my daily calendar reminder
email to draw someone's attention to:


car...@oxford.wistly.net (Reminder Service) writes:

> Sep 14The Selective Service Act establishes the first peacetime 
> draft, 1940

This is in calendar.history -- I would suggest moving it to
calendar.ushistory and/or amending it to read "...in the US"; I assume
this wasn't the first instance of a peacetime draft in the history of
the world, which seems implausible.

> Sep 15The Nazi's adopt a new national flag with the swastika, 1935

The apostrophe is extraneous here; it should just be "The Nazis"



Re: openbsd whois doesn't work with ipv6 address

2016-09-14 Thread Jiri B
On Wed, Sep 14, 2016 at 06:25:18AM -0400, Jiri B wrote:
> Is there any whois client on OpenBSD which would accept ipv6
> addresses? It works fine with an IPv4 address.
> 
> OpenBSD:
> 
> # whois 2620:52:0:2282::1f | grep NetRange
> # sysctl kern.version
> kern.version=OpenBSD 6.0-current (GENERIC.MP) #2432: Sat Sep 10 14:06:57 MDT 
> 2016
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
> EL7:
> 
> # cat /etc/redhat-release ; whois 2620:52:0:2282::1f | grep NetRange
> Red Hat Enterprise Linux Server release 7.2 (Maipo)
> NetRange:   2620:52:: - 2620:52:3:::::
> 
> j.

Sorry for noise, it seems just different NIC host is used on Linuxes...

OpenBSD:

# whois -h whois.arin.net 2620:52:0:2282::1f | grep NetRange
NetRange:   2620:52:: - 2620:52:3:::::

j.



openbsd whois doesn't work with ipv6 address

2016-09-14 Thread Jiri B
Is there any whois client on OpenBSD which would accept ipv6
addresses? It works fine with an IPv4 address.

OpenBSD:

# whois 2620:52:0:2282::1f | grep NetRange
# sysctl kern.version
kern.version=OpenBSD 6.0-current (GENERIC.MP) #2432: Sat Sep 10 14:06:57 MDT 
2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

EL7:

# cat /etc/redhat-release ; whois 2620:52:0:2282::1f | grep NetRange
Red Hat Enterprise Linux Server release 7.2 (Maipo)
NetRange:   2620:52:: - 2620:52:3:::::

j.



apu1d4 loosing network with 6.0-stable

2016-09-14 Thread Christian Widmer
I am loosing network connectivity since i installed 6.0-stable on my
apu1d4. Previously with 5.9-stable i haven't noticed any issues.

 apu1d4 [1] has 3 nics
  re0 -> wan -> direct connected to nucleus connect -> fiber
  re1 -> wifi -> direct connected to access point
  re2 -> lan -> connected to switch

What is happening: Shortly after i boot (30sec - 5min) i can't reach the
internet anymore
- i still can ping my apu1d4 through the lan-interface (re1) and the
wifi-interface (re2)
- but i cant ping the internet anymore; not from through the lan-interface
nor from the apu1d4 itself

The system works again for 30sec to 5 min when
-  I unplug and plug the ethernet cable on re0
-  i do 'ifconfig down re0 && dhclient re0'

I don't face any problems when I reconfigure the apu1d4 and switch the wifi
and wan interface
  re0 -> wifi -> direct connected to access point
  re1 -> wan -> direct connected to nucleus connect -> fiber
  re2 -> lan -> connected to switch

Any idea what could possibly be wrong? As mentioned above with 5.9-stable i
didn't face any issue. Also does the exact same configuration work fine on
a apu2d4 [2] which has intel nics.

Some more info on what is configured who
- wifi and lan interfaces have static IPs assigned
- wan get's its IP via dhcpd
- dhcpd-server is running on wifi and lan interface
- ubound is running (authoritative DNS server for local network)
- httpd, dhcpd and tftpd are running for netboot installations
- pf (see rules below)

# rcctl ls on
apmd
check_quotas
cron
dhcpd
ftpproxy
httpd
ntpd
pf
pflogd
smtpd
sndiod
sshd
syslogd
tftpd
unbound

#
dmesg

OpenBSD 6.0-stable (GENERIC.MP) #12: Sun Sep 11 21:39:13 SGT 2016
r...@talgo.coreid.ch:
/local/build/OpenBSD/6.0/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error
ff
real mem = 4246003712 (4049MB)
avail mem = 4112846848 (3922MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdf16d820 (7 entries)
bios0: vendor coreboot version "4.0" date 09/08/2014
bios0: PC Engines APU
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT
acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4)
PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3) UOH3(S3)
UOH4(S3) UOH5(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD G-T40E Processor, 1000.15 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD G-T40E Processor, 1000.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
acpiprt0 at acpi0: bus -1 (AGPB)
acpiprt1 at acpi0: bus -1 (HDMI)
acpiprt2 at acpi0: bus 1 (PBR4)
acpiprt3 at acpi0: bus 2 (PBR5)
acpiprt4 at acpi0: bus 3 (PBR6)
acpiprt5 at acpi0: bus -1 (PBR7)
acpiprt6 at acpi0: bus 5 (PE20)
acpiprt7 at acpi0: bus -1 (PE21)
acpiprt8 at acpi0: bus -1 (PE22)
acpiprt9 at acpi0: bus -1 (PE23)
acpiprt10 at acpi0: bus 0 (PCI0)
acpiprt11 at acpi0: bus 4 (PIBR)
acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
cpu0: 1000 MHz: speeds: 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:3e:b9:34
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb1 at pci0 dev 5 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:3e:b9:35
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb2 at pci0 dev 6 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci3 at ppb2 bu