Re: Ubiquiti EdgeRouter Lite

2015-08-21 Thread Hugo Osvaldo Barrera
On Tue, Aug 18, 2015, at 09:11, Ted Unangst wrote:
> Predrag Punosevac wrote:
> > Dear All,
> > 
> > I am contemplating buying a new machine which will act as a router/DNS
> > caching server for my home network. Is anybody currently running OpenBSD
> > on the Ubiquiti Networks EdgeRouter LITE in that capacity? I saw that in
> > June 2015 USB support was added which allows installing to local disk on
> > machine. Can anybody point me to a work in progress documentation diff
> > for installing 5.8 octeon port.  I am reading right now
> 
> Here are my notes, which are basic, but should be enough to get you
> through if
> you're familiar with openbsd.
> http://www.tedunangst.com/flak/post/OpenBSD-on-ERL
> 

Since this runs on a USB flash drive, did you do any special
configuration to avoid write-degradation? I remember running OpenBSD on
a [cheap] USB flash drives some years ago, and they kept died on my
pretty quickly. Did you maybe disable some logging, or something alike?
Or are high-quality USB flash drives okay for this?

Thanks,

-- 
Hugo Osvaldo Barrera



Re: IPv6 source addresse selection

2015-08-21 Thread Denis Fondras
On Thu, Aug 20, 2015 at 08:28:53AM +, Stuart Henderson wrote:
> You should be able force it to not be used by doing 'inet6 
> 2001:7f8:81::6:983:1
> pltime 0' (just applies to automatic selection, you can still set it manually
> for IXP peerings), but the behaviour you describe doesn't sound quite right so
> diving into in6_ifawithscope() seems like a good idea.
> 

Thank you Stuart, it works with pltime=0.
Anyway the code in in6_ifawithscope() might need a little love :)



feedback doas / sudo / xfce-extras

2015-08-21 Thread Heiko Zimmermann
Hello Tedu,

I'm using xfce. I tried to pkg_delete sudo because of doas.
doas is working fine for me.

But I cant remove sudo because of dependencies. xfce-extras ->
xfce-mount -> sudo.

So I cant remove sudo without removing xfce-extras.

Maybe - in future - there is a chance to integrate doas in xfce?

Best Regards,
Heiko



Re: KeePass 2.30- libpng and other errors

2015-08-21 Thread Aaron Bieber
Peter Van Eenoo writes:

> If you don't need the keepass 2x functionality, then the keepass 1x package
> is available and works great.
> On Aug 20, 2015 8:28 AM, "Andrzej Drewnowski" 
> wrote:

If you DO need keepass 2x functionality I have a WIP port that builds
the latest beta of keepassx: 
https://github.com/qbit/mystuff/tree/master/security/keepassx

It is buggy, but seems to work well enough.

>
>> Hello!
>>
>> I am trying to run KeePass on OpenBSD (amd64)- current (but on 5.7 are the
>> same errors). I installed Mono from packages and downloaded
>> KeePass-2.30-portable. Unfortunately I can't start KeePass because of this
>> errors:
>>
>>
>> SendMessage (25165861, 0x112c, 0x4, 0x4)
>>
>> libpng error: invalid after png_start_read_image or png_read_update_info
>>
>> libpng error: invalid after png_start_read_image or png_read_update_info
>>
>> libpng error: invalid after png_start_read_image or png_read_update_info
>>
>> libpng error: invalid after png_start_read_image or png_read_update_info
>>
>> SendMessage (25165855, 0x101f, 0x0, 0x0)
>>
>> SendMessage (0, 0x1203, 0x0, 0x7f7ee970)
>>
>> SendMessage (0, 0x1204, 0x0, 0x7f7ee970)
>>
>> SendMessage (0, 0x1203, 0x1, 0x7f7ee970)
>>
>> SendMessage (0, 0x1204, 0x1, 0x7f7ee970)
>>
>> SendMessage (0, 0x1203, 0x2, 0x7f7ee970)
>>
>> SendMessage (0, 0x1204, 0x2, 0x7f7ee970)
>>
>> SendMessage (0, 0x1203, 0x3, 0x7f7ee970)
>>
>> SendMessage (0, 0x1204, 0x3, 0x7f7ee970)
>>
>> SendMessage (0, 0x1203, 0x4, 0x7f7ee970)
>>
>> SendMessage (0, 0x1204, 0x4, 0x7f7ee970)
>>
>> * Assertion at strenc.c:183, condition `utf8!=NULL' not met
>>
>>
>> Stacktrace:
>>
>>
>> at  <0x>
>>
>> at (wrapper managed-to-native)
>> KeePass.Native.NativeMethods.GetFileAttributes (string) <0x>
>>
>> at KeePass.Native.NativeMethods.FileExists (string) <0x0002d>
>>
>> at KeePass.Util.WinUtil.RemoveZoneIdentifier (string) <0x0006e>
>>
>> at KeePass.Forms.MainForm.OnFormLoadParallelAsync (object) <0x00090>
>>
>> at (wrapper runtime-invoke) .runtime_invoke_void__this___object
>> (object,intptr,intptr,intptr) <0x>
>>
>>
>> =
>>
>> Got a SIGABRT while executing native code. This usually indicates
>>
>> a fatal error in the mono runtime or one of the native libraries
>>
>> used by your application.
>>
>> =
>>
>>
>> Abort trap (core dumped)
>>
>>
>>
>> I would appreciate your help
>>
>> Regards
>>
>> Andrzej

-- 
Sent with my mu4e



Re: feedback doas / sudo / xfce-extras

2015-08-21 Thread Stuart Henderson
On 2015-08-21, Heiko Zimmermann  wrote:
> Hello Tedu,
>
> I'm using xfce. I tried to pkg_delete sudo because of doas.
> doas is working fine for me.
>
> But I cant remove sudo because of dependencies. xfce-extras ->
> xfce-mount -> sudo.
>
> So I cant remove sudo without removing xfce-extras.
>
> Maybe - in future - there is a chance to integrate doas in xfce?
>
> Best Regards,
> Heiko

xfce-mount doesn't really use sudo any more, you can specify to
use it but that's done as user configuration. It looks like this
dependency can just be removed (and DESCR adjusted so mention
doas as well).



Re: per-vlan traffic control

2015-08-21 Thread Stuart Henderson
On 2015-08-20, Paulo Coimbra  wrote:
> Well, considering that only outbound packets can be queued, I've changed
> some rules at pf.conf. Packets that are "outgoing" at $if_Internet, is
> upload. Packets that are "outgoing" at vlan100 is download, all right? My
> changed pf.conf below: (but even with these changes, doesn´t work for me, I
> getting 300Mb+ each direction.). Am I a dumb? (LMFAO).

Some tips:

- Use the state table to your advantage. Get rid of the "no state", when you
understand the other tips you'll see why you don't need it.

- With "pass ... queue XX" (or match/whatever), when a packet matches that
rule, it creates PF state which is "tagged" with the queue name. When traffic
traffic is transmitted out of *any* interface, if a queue of the "tagged"
name exists on that interface, it will be used to throttle transmission.

  match from vlan100:network queue vlan100_traffic
  match to vlan100:network queue vlan100_traffic

(or similar with "pass", I just find it easier to split these things up)

- The "queue XX on YY" line relates to *where* on the path through the network
stack the queue takes place. This should normally be on the physical interface
(if you have "vlandev em2" then queue on em2) not the vlan itself.

- You can have the same queue name on more than one interface, e.g.

  queue Internet on em0 bandwidth 10M
  queue vlan100_traffic on em0 parent Internet bandwidth 5M max 5M default
  queue vlan101_traffic on em0 parent Internet bandwidth 1M max 1M default

  queue em1_root VLANs on em1 bandwidth 1G
  queue vlan100_traffic on em1 parent em1_root bandwidth 5M max 5M default
  queue vlan101_traffic on em1 parent em1_root bandwidth 1M max 1M default

etc.

Troubleshooting:

- Use "systat q" and check traffic is being assigned to the queues you
expect.

- If packets aren't in the expected queues, identify which rules are
creating PF state. (pfctl -ss -v, check the rule number, pfctl -sr -R ##).
If states are being created by unexpected rules, use "match log(matches)"
and something like "tcpdump -neipflog0 -v" to help debug your ruleset.



Re: problems compiling latest 5.7 patches

2015-08-21 Thread luke350

On 08/20/15 11:07, Stuart Henderson wrote:

On 2015-08-20, luke...@onemodel.org  wrote:

The error messages make it look like the code is wrong & won't
build.

Any suggestions?

Is there any chance you've tried building things without having done
'make obj' first? If so, you might have some files lying around under
/usr/src that shouldn't be there which may get in the way. There are
ways to clean things but simplest is probably to just wipe /usr/src
and try a clean checkout.

Thanks. I was able to apply the latest patches manually
per the instructions in each one, instead
of rebuilding all userspace, so that worry is gone.

But I still can't build, per the instructions, in case the
question still matters (ie, if I need to learn something
that upgrading to 5.8 later won't fix).  I get a different
error now.  Here's what I just did, and the error output
at the end:

umask   -->   0077

cd /usr
mv src src-old
cd /usr && cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get 
-rOPENBSD_5_7  -P src

echo $?
nice rm -rf /usr/obj/*
echo $?
cd /usr/src
nice make obj

[]
/usr/src/gnu/usr.bin/cc/collect2/obj -> /usr/obj/gnu/usr.bin/cc/collect2
===> gnu/usr.bin/gcc
/usr/src/gnu/usr.bin/gcc/obj -> /usr/obj/gnu/usr.bin/gcc
===> gnu/usr.bin/cxxfilt
/usr/src/gnu/usr.bin/cxxfilt/obj -> /usr/obj/gnu/usr.bin/cxxfilt
===> gnu/usr.bin/cvs
/usr/src/gnu/usr.bin/cvs/obj -> /usr/obj/gnu/usr.bin/cvs
===> gnu/usr.bin/binutils
*** Parse error in /usr/src/gnu/usr.bin/binutils: Malformed conditional 
(${BINUTILS_VERSION} == "binutils-2.17") (Makefile.bsd-wrapper:13)
*** Parse error: Need an operator in '"binutils-2.17"' 
(Makefile.bsd-wrapper:13)

*** Error 1 in gnu/usr.bin (:48 'obj')
*** Error 1 in gnu (:48 'obj')
*** Error 1 in /usr/src (:48 'obj')
asusbsd Fri Aug 21 10:09:22:/usr/src#echo $?
1


(BTW, I have learned the hard way that umask 0077 for root is not
helpful when running pkg_add.  So I have a script that sets the
umask back to the default, temporarily, before doing pkg_add.)



Re: KeePass 2.30- libpng and other errors

2015-08-21 Thread Stuart Henderson
On 2015-08-21, Aaron Bieber  wrote:
> Peter Van Eenoo writes:
>
>> If you don't need the keepass 2x functionality, then the keepass 1x package
>> is available and works great.
>> On Aug 20, 2015 8:28 AM, "Andrzej Drewnowski" 
>> wrote:
>
> If you DO need keepass 2x functionality I have a WIP port that builds
> the latest beta of keepassx: 
> https://github.com/qbit/mystuff/tree/master/security/keepassx
>
> It is buggy, but seems to work well enough.

There's a kpcli as well which claims 2.x support



Kernel Driver Question

2015-08-21 Thread sven falempin
Dear Readers,

is 'bus_dma'
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/bus_dma.9
the <> of  'ioremap/ioread32'
http://www.makelinux.net/ldd3/chp-9-sect-4--
?

trying to port a driver : watchdog/sp5100_tco.c, wondering the openbsd
equivalent of readl :
if (sp5100_tco_pci->revision >= 0x40) {
/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
[..bus space map equivalent..]
} else {
[...]
/* Check MMIO address conflict */
if (request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
  dev_name)) {
[...]
tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE);
[...]
/* Check that the watchdog action is set to reset the system */
[..ioread32 old school form..]
val = readl(SP5100_WDT_CONTROL(tcobase));


Best regards,



Re: Kernel Driver Question

2015-08-21 Thread Mike Larkin
On Fri, Aug 21, 2015 at 01:29:20PM -0400, sven falempin wrote:
> Dear Readers,
> 
> is 'bus_dma'
> http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/bus_dma.9
> the <> of  'ioremap/ioread32'
> http://www.makelinux.net/ldd3/chp-9-sect-4--
> ?
> 
> trying to port a driver : watchdog/sp5100_tco.c, wondering the openbsd
> equivalent of readl :
> if (sp5100_tco_pci->revision >= 0x40) {
> /* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
> outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
> [..bus space map equivalent..]
> } else {
> [...]
> /* Check MMIO address conflict */
> if (request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
>   dev_name)) {
> [...]
> tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE);
> [...]
> /* Check that the watchdog action is set to reset the system */
> [..ioread32 old school form..]
> val = readl(SP5100_WDT_CONTROL(tcobase));
> 
> 
> Best regards,
> 

no context here, but you're probably looking for something like
bus_space_read_4

-ml



Re: Kernel Driver Question

2015-08-21 Thread Miod Vallat
> is 'bus_dma'
> http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/bus_dma.9
> the <> of  'ioremap/ioread32'
> http://www.makelinux.net/ldd3/chp-9-sect-4--
> ?

I don't think so.

It looks like you are attempting to port a PCI driver, and attempting to
access the device's register.

PCI device regions in memory and I/O space are made available to the
kernel with pci_mapreg_map(), which gives you a bus_space_handle_t
suitable for use with thi bus_space(9) API. This would be a sugar-coated
equivalent of ioremap().

>From then on, bus_space_read_(N/8) will match ioreadN() calls.



Re: Kernel Driver Question

2015-08-21 Thread sven falempin
On Fri, Aug 21, 2015 at 3:30 PM, Miod Vallat  wrote:
>> is 'bus_dma'
>> http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/bus_dma.9
>> the <> of  'ioremap/ioread32'
>> http://www.makelinux.net/ldd3/chp-9-sect-4--
>> ?
>
> I don't think so.
>
> It looks like you are attempting to port a PCI driver, and attempting to
> access the device's register.
>
> PCI device regions in memory and I/O space are made available to the
> kernel with pci_mapreg_map(), which gives you a bus_space_handle_t
> suitable for use with thi bus_space(9) API. This would be a sugar-coated
> equivalent of ioremap().
>
> From then on, bus_space_read_(N/8) will match ioreadN() calls.


Thank you :-)  I figure it was not dma by grep the call of those everywhere,
still need to understand the mapping.

(
working on the AMD Bobcat WDT actually, i have the base adress trough
bus space map :
in acpi 0xFED0  and the then doc say go to 00b0 but i do not
understand where this address makes sense,
and how to write in it
)

-- 
-
() ascii ribbon campaign - against html e-mail
/\



Re: Ubiquiti EdgeRouter Lite

2015-08-21 Thread Michael McConville
Michael McConville wrote:
> This spring, I asked a few OpenBSD MIPS devs about the project's
> interest in a MIPS32 port for the Creator CI20. It turns out that
> MIPS32 support was quietly removed last year:
> 
> > 
> > revision 1.20
> > date: 2014/03/11 07:50:49;  author: jasper;  state: Exp;  lines: +1 -15;
> > remove #if(n)def __LP64__ from the mips64 codebase, as mips32 never really 
> > went anywhere.
> > 
> > ok miod@
> > 
> 
> I was pretty forcibly told that there was no interest, which is
> understandable.
> 
> [snip]

Miod gave me permission to share the emails, which I thought were
informative and interesting:

http://www.sccs.swarthmore.edu/users/16/mmcconv1/others/miod-mips32.txt