Re: ed viewing trailing spaces

2018-05-23 Thread Martijn van Duren
Hello Predrag,

I assume that you don't run -current. I changed this about a month ago.

martijn@

On 05/24/18 06:28, Predrag Punosevac wrote:
> Hi Misc,
> 
> I just got Michael Lucas' Ed Mastery. While reading through the book I
> tried few things and I realized that viewing trailing spaces on OpenBSD
> 6.3 doesn't work the way described in man pages, Michael's book, and
> other OSs (I tired Red Hat 7.5, FreeBSD 11.1p10, DFBSD 5.2.1)
> 
> Namely command 
> 
> ,l
> 
> doesn't allow me to see trailing spaces. I would expect to see a dollar
> sign at the end of the line.
> 
> Am I missing something obvious here. I like probably most of you use ed
> only when trying to edit something in the single user mode so I don't
> recall using this particular command before.
> 
> Cheers,
> Predrag
> 
> P.S. It is nice to see that after Jacek Artymiak, Michael took a shot
> and wrote this short book on Ed. The book is nice read and so far my
> main complaint with it is the lack of the summary of all Ed commands
> which is actually present in man pages as well as in this GNU manual
> (obviously different version of the editor)
> 
> https://www.gnu.org/software/ed/manual/ed_manual.html
> 



ed viewing trailing spaces

2018-05-23 Thread Predrag Punosevac
Hi Misc,

I just got Michael Lucas' Ed Mastery. While reading through the book I
tried few things and I realized that viewing trailing spaces on OpenBSD
6.3 doesn't work the way described in man pages, Michael's book, and
other OSs (I tired Red Hat 7.5, FreeBSD 11.1p10, DFBSD 5.2.1)

Namely command 

,l

doesn't allow me to see trailing spaces. I would expect to see a dollar
sign at the end of the line.

Am I missing something obvious here. I like probably most of you use ed
only when trying to edit something in the single user mode so I don't
recall using this particular command before.

Cheers,
Predrag

P.S. It is nice to see that after Jacek Artymiak, Michael took a shot
and wrote this short book on Ed. The book is nice read and so far my
main complaint with it is the lack of the summary of all Ed commands
which is actually present in man pages as well as in this GNU manual
(obviously different version of the editor)

https://www.gnu.org/software/ed/manual/ed_manual.html



Confusing IPv6 route(8) results

2018-05-23 Thread David Higgs
I am using route(8) in a script but found some odd behavior when
querying routes for some IPv6 addresses - lookups seem to fail if the
trailing address bytes are zero (implicit or explicitly) as shown
below.  However, the routing table still seems to be forwarding
traffic correctly, as shown in my final example.

Can anyone shed light on this, perhaps explain how I'm misusing route(8)?

This is on amd64 running 6.3-stable.

Thanks.

--david


$ route -n get 2607:f8b0:4004:805::2004
   route to: 2607:f8b0:4004:805::2004
destination: ::
   mask: ::
gateway: fe80:1::201:5cff:fe86:7046%em0
  interface: em0
 if address: fe80::5e8c:75d:e349:26fd%em0
   priority: 56 (default)
  flags: 
  label: slaacd
 use   mtuexpire
  220369 0 0
sockaddrs: 

$ route -n get 2607:f8b0:4004:805::
get net 2607:f8b0:4004:805::: not in table

$ route -n get 2600:1901:0:94b6::
get net 2600:1901:0:94b6::: not in table

$ ping6 2600:1901:0:94b6::
PING 2600:1901:0:94b6:: (2600:1901:0:94b6::): 56 data bytes
64 bytes from 2600:1901:0:94b6::: icmp_seq=0 hlim=54 time=10.302 ms
64 bytes from 2600:1901:0:94b6::: icmp_seq=1 hlim=54 time=11.270 ms



Re: Building ramdisk_cd (6.3)

2018-05-23 Thread Philip Guenther
On Wed, May 23, 2018 at 4:19 PM, Alfredo Rainho Neves 
wrote:

> I am trying to build the ramdisk_cd, but having some problems with
> permission of the ramdisk_cd directory. It is set to my user and group
> wsrc,
> but when I try to do a make I get the following:
>

If you want to do that you should follow *exactly* the instructions in the
release(8) manpage up through at least step 4.


I tried adding the "build" user to the wsrc group but still get the problem.
>

Undo that.  The group file shipped with base is correct for this: user
'build' should have 'build' as its default group and additionally be in
group 'wobj' and no others.  I mean, if you needed to add it to another
group we would have documented that in the release(8) manpage...


Philip Guenther


Re: utf-8 support in OpenBSD's httpd

2018-05-23 Thread justina colmena
 Original message From: Larry Hynes  
Date: 5/23/18  10:03 AM  (GMT-09:00) To: justina colmena  
Subject: Re: utf-8 support in OpenBSD's httpd 
> I think the usual response to this is "use relayd to add headers".> There's a 
> hack here, that works:
> https://marc.info/?l=openbsd-tech&m=150263245318202&w=2
> For personal stuff, I just add a byte order mark to the head of text files.
I like the relayd suggestion, as someone else also mentionedbecause you didn't 
post to the list.
Technically you shouldn't be doing anything wrong by addingbyte order mark, 
because anything that interprets utf-8 is reallysupposed to accept a BOM.
The thing to verify is that the BOM doesn't cause the PHPinterpreter to pass it 
through as output before the opening "

runit

2018-05-23 Thread Ken M
I noticed runit is in the ports, looking at the runit website I see instructions
for OpenBSD installation but they are many versions back. Does anyone use runit
as a replacement init system on their OpenBSD installs in the list?

Experiences and possibly a source for more current information on the
installation process would be awesome. Thank you.

Ken



Building ramdisk_cd (6.3)

2018-05-23 Thread Alfredo Rainho Neves
Hi,

 

I am trying to build the ramdisk_cd, but having some problems with
permission of the ramdisk_cd directory. It is set to my user and group wsrc,
but when I try to do a make I get the following:

 

cnc# make -j2

crunchgen -E -D /usr/src -L /usr/lib  -c instbin.c -e instbin -m instbin.mk
instbin.conf

cd
/usr/src/distrib/amd64/ramdisk_cd/../../../sys/arch/amd64/compile/RAMDISK_CD
&&  su build -c 'make config && make clean && env COPTS=-Oz make'

cd /usr/obj/sys/arch/amd64/compile/RAMDISK_CD && config -s /usr/src/sys -b
/usr/src/sys/arch/amd64/compile/RAMDISK_CD/obj
/usr/src/sys/arch/amd64/conf/RAMDISK_CD

config: cannot write Makefile: Permission denied

*** Stop.

*** Error 1 in /usr/src/sys/arch/amd64/compile/RAMDISK_CD (Makefile:1385
'config')

*** Error 2 in target 'bsd'

*** Error 2 in /usr/src/distrib/amd64/ramdisk_cd (Makefile.inc:81 'bsd')

cnc#

 

I tried adding the "build" user to the wsrc group but still get the problem.


 

Can anyone shed some light.

 

Alfredo

 

 



Re: opensmtpd / ldap unreliable

2018-05-23 Thread Paul B. Henson
> From: Gilles Chehade
> Sent: Wednesday, May 23, 2018 1:20 PM
> 
> That's bad but could easily be fixed if you want to help us

Definitely; I'll pull the latest github head down and see if that fixes the
LDAP connection recovery after startup issue, and then I can try any
suggestions to make it more reliable at startup or possibly fiddle with that
code myself.

> That would be a bad idea... it's experimental :-p

I did see that mentioned circa 2013, but I guess I kind of hoped it had
moved beyond that by now :).

Thanks much.



Re: attach chroot-jail to switchd(8) ?

2018-05-23 Thread Reyk Floeter
switchd is already privsep‘ed with a chroot jail.

But I don’t quite understand what you mean.

> Am 23.05.2018 um 10:35 schrieb Thomas Huber :
> 
> Hi all,
> 
> I´m just tinkering a little bit and try to mimic some "containerization" on
> OpenBSD with chroot. Is it somehow possible to attach a chrooted
> envirionment to swtichd(8) ?
> 
> Thanks
> Thomas



Re: Beg for Atheros wifi driver

2018-05-23 Thread Chris Bennett
On Mon, Apr 16, 2018 at 07:43:09AM +, Antal Ispanovity wrote:
> By the way, you just need to have a look at this page, click on a driver
> and you can see a list of supported devices:
> https://man.openbsd.org/?query=wireless&apropos=1
> 

This DOES NOT always work. I have bought several supported model numbers
that had been replaced with new chipsets.
I'm having the same problem and I am going to order one online today.
Pretty frustrating buying one after the next only to fail.

Chris Bennett

P.S.
I'm installing a snapshot first to see if that solves the problem since
I have one to return to the store with me




Re: opensmtpd / ldap unreliable

2018-05-23 Thread Allan Streib
"Paul B. Henson"  writes:

>> What you ask is a very general question: If A depends on B, and B is
>> missing, how do expect A to behave?
>
> In this specific case, I expect A to complain it was unable to contact
> B, to continue initializing, return temporary failures for any
> operation which requires B, and reattempt a connection to B on a
> regular basis until it is successful. From a reliability and full
> tolerance perspective, falling over and dying doesn't seem a very good
> choice for the circumstances.

Falling over and dying is the simplest thing. It makes no assumptions
about the cause of the problem and when it might be resolved. It does
not attempt to carry on in some hobbled fashion, possibly creating
further problems.

If you depend on services being up, you will need monitors/supervisors
to detect when they are not up, and attempt restarts and/or notify you
as appropriate. Baking this into the services themselves is a
duplication of functionality that can be handled externally.

Allan







Re: vlan without IP address not working (parent not in promisc mode)

2018-05-23 Thread Sigi Rudzio
2018-05-23 15:42 GMT+02:00 David Dahlberg :
>> On 2018-05-22, Sigi Rudzio  wrote:
>> > With this configuration, the parent interface on router 2 (sk0)
>> > isn't in
>> > promiscous mode and no traffic can pass into the vlan interface
>
> Sounds pretty much like the same problem that I had:
> https://marc.info/?t=15242230593
>
> Does a "ifconfig $dev up" help you?
>
This indeed works, see my previous e-mail to sthen@, thanks for the suggestion!

Regards,

Sigi



Re: vlan without IP address not working (parent not in promisc mode)

2018-05-23 Thread Sigi Rudzio
2018-05-23 12:04 GMT+02:00 Stuart Henderson :
> It's not clear from your mail, did you bring the vlan interface up?
> Assigning an IP address (currently) does that automatically.

Thanks for your answer, the vlan interface is up, as well as the vxlan interface
and the corresponding bridge.

However, running ifconfig vlan106 up again also puts sk0 (the parent) in promisc
mode and traffic can flow, putting a second "up" in hostname.vlan106
and rebooting
also works.

sk0 before the second ifconfig vlan106 up:
sk0: flags=8843 mtu 1500

after the second ifconfig vlan106 up:
sk0: flags=8b43
mtu 1500

(I compared ifconfig outputs with diff, this is the only difference)

hostname.vlan106:

vnetid 106 parent sk0
description "XXX"
up

In case it matters, apart from IPSec/iked the machine is also running
ospfd, ospf6d,
isc-dhcpd, isc-named and rtadvd, but not on the relevant interfaces.

>
> Full ifconfig output might be useful.
slightly anonymized ifconfig output below, vlan106 is the relevant interface:

lo0: flags=8049 mtu 32768
index 7 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7
inet 127.0.0.1 netmask 0xff00
sk0: flags=8843 mtu 1500
lladdr 00:00:5a:9e:4c:9b
description: XXX
index 1 priority 0 llprio 3
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
acx0: flags=8843 mtu 1500
lladdr 00:80:c8:2d:67:62
index 2 priority 4 llprio 3
groups: wlan
media: IEEE802.11 autoselect (autoselect mode 11g hostap)
status: active
ieee80211: nwid XXX chan 5 bssid 00:80:c8:2d:67:62
inet 192.168.43.1 netmask 0xff00 broadcast 192.168.43.255
nfe0: flags=8802 mtu 1500
lladdr 00:21:97:a6:39:a1
index 3 priority 0 llprio 3
media: Ethernet autoselect (none)
status: no carrier
ix0: flags=8843 mtu 9001
lladdr a0:36:9f:1f:78:f0
description: XXX
index 4 priority 0 llprio 3
media: Ethernet autoselect (10GbaseLR full-duplex,rxpause,txpause)
status: active
inet 172.16.31.2 netmask 0xfffc broadcast 172.16.31.3
ix1: flags=8802 mtu 1500
lladdr a0:36:9f:1f:78:f2
index 5 priority 0 llprio 3
media: Ethernet autoselect
status: no carrier
enc0: flags=0<>
index 6 priority 0 llprio 3
groups: enc
status: active
bridge0: flags=41
description: XXX
index 8 llprio 3
groups: bridge
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
vether0 flags=3
port 13 ifpriority 0 ifcost 0
etherip0 flags=3
port 12 ifpriority 0 ifcost 0
bridge106: flags=41
description: XXX
index 9 llprio 3
groups: bridge
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
vxlan106 flags=3
port 22 ifpriority 0 ifcost 0
vlan106 flags=3
port 14 ifpriority 0 ifcost 0
bridge112: flags=41
description: XXX
index 10 llprio 3
groups: bridge
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
vxlan112 flags=3
port 23 ifpriority 0 ifcost 0
vlan112 flags=3
port 15 ifpriority 0 ifcost 0
enc1: flags=0<>
description: XXX
index 11 priority 0 llprio 3
groups: enc
etherip0: flags=8943 mtu 1500
lladdr fe:e1:ba:d0:18:0f
description: XXX
index 12 priority 0 llprio 3
groups: etherip
media: Ethernet autoselect
status: active
tunnel: inet 172.16.31.2 -> 172.16.31.1 ttl 64 nodf
vether0: flags=8943 mtu 8000
lladdr fe:e1:ba:d1:6c:0a
description: XXX
index 13 priority 0 llprio 3
groups: vether egress
media: Ethernet autoselect
status: active
inet 192.168.0.2 netmask 0xff00 broadcast 192.168.0.255
inet6 fe80::dc17:9a93:c18a:db83%vether0 prefixlen 64 scopeid 0xd
inet6 2001:XXX prefixlen 64
vlan106: flags=8943 mtu 1500
lladdr 00:00:5a:9e:4c:9b
description: XXX
index 14 priority 0 llprio 3
encap: vnetid 106 parent sk0
groups: vlan
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
vlan112: flags=8943 mtu 1500
lladdr 00:00:5a:9e:4c:9b
description: XXX
index 15 priority 0 llprio 3
encap: vnetid 112 parent sk0
groups: vlan
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
vlan202: flags=8843 mtu 1500
lladdr 00:00:5a:9e:4c:9b
description: XXX
index 16 priority 0 llprio 3
encap: vnetid 202 parent sk0
groups: vlan
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active

Re: opensmtpd / ldap unreliable

2018-05-23 Thread Gilles Chehade
On Wed, May 23, 2018 at 10:19:47PM +0200, Gilles Chehade wrote:
> On Tue, May 22, 2018 at 06:13:23PM -0700, Paul B. Henson wrote:
> > So I recently converted my opensmtpd server to use ldap as the backend
> > for user authentication. It seems it's a bit untolerant to ldap issues?
> >
> > [...]
> > 

Just to clarify, the "extras" are add-ons which we believe not to belong
in the smtpd code base, so the amount of efforts we pour on them is very
dependant on the interest of developers and the interest the community's
showing for the add-on, it's a community and volunteer driven effort.

None of the add-ons are part of the opensmtpd roadmap, some became quite
popular like table-sqlite or table-passwd and are well maintained, other
have very few users who aren't pushing much for improvement, so the code
doesn't evolve much and/or we are not aware of shortcomings.

If you want proper ldap support, become active and it will happen :-)x


-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg



Re: opensmtpd / ldap unreliable

2018-05-23 Thread Gilles Chehade
On Tue, May 22, 2018 at 06:13:23PM -0700, Paul B. Henson wrote:
> So I recently converted my opensmtpd server to use ldap as the backend
> for user authentication. It seems it's a bit untolerant to ldap issues?
> 

yes most likely


If the ldap server isn't available when opensmtpd is started, it says it
> started:
> 
> # /etc/rc.d/smtpd start
> smtpd(ok)
> 
> But it isn't there:
> 
> # ps -aux | grep smtpd
> root 89090  0.0  0.0   304  1208 p6  S+p5:52PM0:00.00 grep smtpd
> 
> And it's not really obvious why:
> 
> May 22 17:52:51 bart smtpd[46044]: info: OpenSMTPD 6.0.4 starting
> May 22 17:52:51 bart smtpd[23325]: warn: table-proc: pipe closed
> May 22 17:52:51 bart smtpd[23325]: lookup: table-proc: exiting
> May 22 17:52:51 bart smtpd[73239]: smtpd: process lka socket closed
> 

not good


> Starting in debug mode:
> 
> # smtpd -d
> info: OpenSMTPD 6.0.4 starting
> users[43283]: debug: reading key "url" -> "ldap://localhost:3389";
> users[43283]: debug: reading key "basedn" ->
> users[43283]: debug: reading key "username" ->
> users[43283]: debug: reading key "password" ->
> users[43283]: debug: reading key "credentials_filter" -> 
> "(&(objectClass=uidObject)(uid=%s))"
> users[43283]: debug: parsing attribute "credentials_attributes" (2) -> 
> "uid,description"
> users[43283]: debug: done reading config
> users[43283]: warn: aldap_parse
> users[43283]: fatal: failed to connect
> warn: table-proc: pipe closed
> lookup: table-proc: exiting
> smtpd: process lka socket closed
> 
> You can see it looks like it fails to connect to the ldap server at
> startup and just dies.
> 
> Further, if the ldap server is up at startup, but ever restarts or has
> the connection broken, authentication just fails:
> 
> May 21 13:22:10 bart smtpd[42132]: warn: user credentials lookup fail for 
> users:henson
> 
> The opensmtpd process needs to be restarted before authentication works
> again.
> 

not good


> In debug mode, it shows:
> 
> users[7295]: debug: table_ldap: ldap_query:
> filter=(&(objectClass=uidObject)(uid=henson)), ret=0
> 5e46e2fabbf8d72e smtp event=authentication user=henson
> address=134.71.249.41 host=134.71.249.41 result=permfail
> 
> Is it expected that the ldap support is currently not production ready?
> I see in a presentation from back in 2013 that ldap was classified
> experimental at the time, but it's not clear if that's still the case.
> 

Yes, sadly

I wrote the initial ldap support but I don't use ldap myself and I could
not get any user to spend time with me testing related diffs more than a
couple times, so...


> I see in the repo at
> 
> https://github.com/OpenSMTPD/OpenSMTPD-extras/blob/master/extras/tables/table-ldap/table_ldap.c
> 
> there's a change to add ldap reconnection support:
> 
> https://github.com/OpenSMTPD/OpenSMTPD-extras/commit/04e4c521b34d1987af915ff97dcb0d87daf122b0#diff-369c0fcbfbc85bf2cdad7dba1131b872
> 
> but it's dated 7/27/2017, and the last github release seems to be
> 201601072302 (although the openbsd port appears to be 201703132115, I
> guess it's not downloading it from github?).
> 

It's been a while since the last -extras release indeed,
I suppose the openbsd port pulls from github, I dunno really


> It looks like the code in head still fails to start if the ldap server
> isn't available when opensmtpd is started though.
> 

That's bad but could easily be fixed if you want to help us


> Is anybody using opensmtpd with ldap in production? If so, how are you
> working around this issue?
> 

That would be a bad idea... it's experimental :-p



-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg



Re: utf-8 support in OpenBSD's httpd

2018-05-23 Thread Ve Telko
Hi, Justina.

You can not set HTTP headers in httpd.conf, there is no such feature.

You need to run relayd in front of it to set some headers by example
for text files like "contacto.txt", where it is not possible to set headers
on application level, like calling header() function in case of PHP.


Ve.



Re: opensmtpd / ldap unreliable

2018-05-23 Thread Paul B. Henson

> From: justina colmena
> Sent: Tuesday, May 22, 2018 9:08 PM
> 
> Are they being started in the wrong order at boot time?

The LDAP server in use is not running on the local openBSD system. It might not 
be available due to an underlying network issue or some other problem that 
temporarily prevents successful connections/queries.

> What you ask is a very general question: If A depends on B, and B is
> missing, how do expect A to behave?

In this specific case, I expect A to complain it was unable to contact B, to 
continue initializing, return temporary failures for any operation which 
requires B, and reattempt a connection to B on a regular basis until it is 
successful. From a reliability and full tolerance perspective, falling over and 
dying doesn't seem a very good choice for the circumstances.




Re: Intranet routing with dynamic IPs

2018-05-23 Thread giant

Thanks Stuart! Knowing that, implementing it will be easy.



utf-8 support in OpenBSD's httpd

2018-05-23 Thread justina colmena
My question is: How can I get OpenBSD's httpd to serve a particular
file, or all files of a particular extension, as the case may be, with
the following HTTP header?

Content-type: text/plain; charset=utf-8

I have written a simple "hello-world" PHP script which creates a table
and inserts some data into the PostgreSQL database, queries the
database, and displays the results.

https://amarillo.colmena.biz/~justina/contacto.php

There is a link at the bottom of that page "ver la fuente" to view the
source, which appears to be served properly by php-fpm, since PHP
allows one to specify HTTP headers verbatim. I have also copied the
exact same script to 

https://amarillo.colmena.biz/~justina/contacto.txt

but this file is not served with the correct character set encoding to
view properly in a web browser. In particular I have initialized the
database with the locale "es_MX.UTF-8" which was available on my
OpenBSD system.  My script names one of the columns in the database
table with the literal Spanish word "método", containing the utf-8
character "é" which is outside the 7-bit US-ASCII set.

In /etc/httpd.conf, I have the following section.

types {
include "/usr/share/misc/mime.types"
}

In /usr/share/misc/mime.types,

There is the line

text/plain  txt

but there does not seem to be a way to specify the correct character set
in the HTTP header from OpenBSD's httpd. What am I missing here?



Re: vlan without IP address not working (parent not in promisc mode)

2018-05-23 Thread David Dahlberg
> On 2018-05-22, Sigi Rudzio  wrote:
> > With this configuration, the parent interface on router 2 (sk0)
> > isn't in
> > promiscous mode and no traffic can pass into the vlan interface 

Sounds pretty much like the same problem that I had:
https://marc.info/?t=15242230593

Does a "ifconfig $dev up" help you?



Re: Intranet routing with dynamic IPs

2018-05-23 Thread Stuart Henderson
> Regardless of which routing protocol I use, I run into the same problem. 
> I can't find a way to configure this on OpenBSD.

Given you only want the /32 you can't use the address (with netmask)
directly from the interface.

You could do this with bgpd by *not* announcing it directly from
bgpd.conf but instead run something that monitors the DHCP address, and
uses "bgpctl network flush" and "bgpctl network add $ip/32".

Or you could monitor the DHCP address and add that same address but
with a /32 netmask to a new loopback interface (e.g. lo1) and redistribute
that loopback address.

Either way, to monitor the dhcp address you can watch
/var/db/dhclient.leases.$iface, you can try entr (in packages) to
trigger on updates rather than polling.

> Is this such an exotic set-up?

Yes.



Re: vlan without IP address not working (parent not in promisc mode)

2018-05-23 Thread Stuart Henderson
It's not clear from your mail, did you bring the vlan interface up?
Assigning an IP address (currently) does that automatically.

Full ifconfig output might be useful.

On 2018-05-22, Sigi Rudzio  wrote:
> Hi misc@,
>
> I'm trying to bridge a VLAN between two routers with a vxlan(4) interface.
>
> Setup:
> router 1 (6.3):
> physical interface (em) - vlan (with IP address) - bridge - vxlan
>
> The two routers are connected directly, the traffic is encrypted with IPSec
> and encapsulated in etherip(4), routed traffic is working perfectly.
>
> router 2 (6.3-current):
> vxlan - bridge - vlan (no IP address) - parent interface (sk0) -
> switch - devices
>
> With this configuration, the parent interface on router 2 (sk0) isn't in
> promiscous mode and no traffic can pass into the vlan interface on router 2
> (the devices attached to the switch receive echo requests and answer, but the
> answer is not received on the vlan interface, only on the parent interface 
> (sk0)
> in encapsulated form).
> Outgoing traffic can be seen on the vlan interface.
>
> If I assign an IP address to the vlan device on router 2, the parent
> interface (sk0)
> flags change from:
> sk0: flags=8843 mtu 1500
> to:
> sk0: flags=8b43
> mtu 1500
>
> and traffic can flow over the vlan interface, it keeps working even
> after deleting the
> IP address (sk0 stays in promisc. mode).
> Even when I delete the vlan interface after deleting the IP address
> and add the vlan
> interface again it keeps working until I reboot.
>
> running tcpdump on sk0 or adding it to a bridge with no other members also 
> makes
> traffic flow and puts sk0 in promisc mode, but exiting
> tcpdump/destroying the bridge
> removes the PROMISC flag again.
>
> Easiest way to reproduce this is creating a vlan interface on top of a
> ethernet interface
> with and without an IP address for the vlan interface. (also tried it
> with an rl interface,
> got the same behaviour).
>
> disabling pf doesn't change anything.
>
> Am I doing something wrong/is this behaviour intended or indeed a bug?
>
> If you need any more information/want me to reproduce this with a simpler 
> setup,
> I'll be happy to help.
>
> dmesg of router 2 is attached.
>
> Thanks for any help!
>
> Regards,
>
> Sigi Rudzio
>
> dmesg router 2:
> OpenBSD 6.3-current (GENERIC) #41: Sat May 19 22:35:35 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
> real mem = 989462528 (943MB)
> avail mem = 951570432 (907MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f400 (51 entries)
> bios0: vendor American Megatrends Inc. version "080014" date 09/12/2008
> bios0: ECS GeForce7050M-M
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG OEMB HPET NVHD SSDT
> acpi0: wakeup devices NSMB(S4) USB0(S4) USB2(S3) US15(S4) US12(S3)
> NMAC(S5) P0P1(S4) HDAC(S4) BR10(S4) BR11(S4) BR12(S4) BR13(S4)
> BR14(S4) BR15(S4) BR16(S4) PWRB(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Sempron(tm) Processor LE-1150, 1995.48 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,NXE,MMXX,FFXSR,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,EAPICSP,AMCR8,3DNOWP
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 256KB
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 199MHz
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 2500 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (P0P1)
> acpiprt2 at acpi0: bus 2 (BR10)
> acpiprt3 at acpi0: bus 3 (BR11)
> acpiprt4 at acpi0: bus 4 (BR12)
> acpiprt5 at acpi0: bus 5 (BR13)
> acpiprt6 at acpi0: bus 6 (BR14)
> acpiprt7 at acpi0: bus 7 (BR15)
> acpiprt8 at acpi0: bus 8 (BR16)
> acpicpu0 at acpi0: C1(@1 halt!), PSS
> acpitz0 at acpi0: critical temperature is 110 degC
> acpicmos0 at acpi0
> "*pnp0c14" at acpi0 not configured
> acpibtn0 at acpi0: PWRB
> cpu0: PowerNow! K8 1995 MHz: speeds: 2000 1800 1000 MHz
> pci0 at mainbus0 bus 0
> "NVIDIA MCP67 Memory" rev 0xa2 at pci0 dev 0 function 0 not configured
> pcib0 at pci0 dev 1 function 0 "NVIDIA MCP67 ISA" rev 0xa2
> nviic0 at pci0 dev 1 function 1 "NVIDIA MCP67 SMBus" rev 0xa2
> iic0 at nviic0
> spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-6400CL6
> iic1 at nviic0
> ohci0 at pci0 dev 2 function 0 "NVIDIA MCP67 USB" rev 0xa2: apic 1 int
> 10, version 1.0, legacy support
> ehci0 at pci0 dev 2 function 1 "NVIDIA MCP67 USB" rev 0xa2: apic 1 int 11
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface

Re: Viewport for man.openbsd.org -- readability on phones

2018-05-23 Thread Marko Cupać
On May 2018
Multiple list members wrote:

> I took and iPhone with iOS and Safari ( i think!) on it and pointed
> the browser to the current link of man pages [1]. All i can say is the
> layout is displayed on full display, not stretched.
> Text is fine, paragraphs are scaled ok, not even a simple problem.
> Font is fine.

> I tried it on my iPhone 5s and everything looks great!

> I can second that.  It looks perfect on iPhone using Safari.

>From last few posts, I can conclude one should use Safari on iPhone for
the purpose of reading OpenBSD manpages on a mobile device.

One of the things I like about OpenBSD is the ability to focus on its
goal of trying to be the most secure operating system, not fads.

I am sure OpenBSD will correct their errors in html/css code, if any,
according to established standards, for the benefit of their users. I
believe OpenBSD won't bend over to fullfill 'embrace, extend,
extinguish'-style expectations of big browser vendors.

Keep up the good work.
-- 
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

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



attach chroot-jail to switchd(8) ?

2018-05-23 Thread Thomas Huber
Hi all,

I´m just tinkering a little bit and try to mimic some "containerization" on
OpenBSD with chroot. Is it somehow possible to attach a chrooted
envirionment to swtichd(8) ?

Thanks
Thomas