Re: Zenbleed

2023-07-24 Thread Rafael Sadowski
I hit the same trap as Lucas with my HV (netcup.de). bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf5900 (10 entries) bios0: vendor netcup version "RS 1000 G9 Plus" date 12/17/2020 bios0: netcup KVM Server acpi0 at bios0: ACPI 1.0 acpi0: sleep states S5 acpi0: tables DSDT FACP APIC acpi0: wakeup devices

Re: qt.qpa.xcb: xcb_shm_attach() failed

2022-11-16 Thread Rafael Sadowski
On Sun Nov 13, 2022 at 08:37:55PM +0100, Rafael Sadowski wrote: > I don't know if this has worked in the past, but when debugging some Qt > applications I saw the following debug messages: > > $ gwenview > qt.qpa.xcb: Has MIT-SHM : true > qt.qpa.xcb: Has MIT-SHM

Re: qt.qpa.xcb: xcb_shm_attach() failed

2022-11-13 Thread Rafael Sadowski
On Sun Nov 13, 2022 at 08:37:55PM +0100, Rafael Sadowski wrote: > I don't know if this has worked in the past, but when debugging some Qt > applications I saw the following debug messages: > > $ gwenview > qt.qpa.xcb: Has MIT-SHM : true > qt.qpa.xcb: Has MIT-SHM

qt.qpa.xcb: xcb_shm_attach() failed

2022-11-13 Thread Rafael Sadowski
ed (%d: %s) for %p", errno, strerror(errno), addr); return false; If you want to test it run any Qt application with QT_LOGGING_RULES="qt.qpa.xcb.debug=true" exported. Should SHM with XCB generally work on OpenBSD? Rafael

Re: clang: compile static analyzer

2022-01-14 Thread Rafael Sadowski
there was any interest to > have this in our base clang? Please checkout devel/clang-tools-extra, if you missed something let me know. CLANG_ENABLE_STATIC_ANALYZER=ON is enabled by default. Rafael > > diff --git gnu/usr.bin/clang/Makefile gnu/usr.bin/clang/Makefile > index 6cf71d36

waitid(2)

2021-12-07 Thread Rafael Sadowski
s anyone have this in their diff stack already? I would love to test it with an port witch depends on boot/process.hpp Rafael

Re: sigwaitinfo(2) and sigtimedwait(2)

2021-10-04 Thread Rafael Sadowski
On Sun Sep 26, 2021 at 02:36:02PM +0200, Mark Kettenis wrote: > > Date: Fri, 24 Sep 2021 19:36:21 +0200 > > From: Rafael Sadowski > > > > I'm trying to port the more KDE stuff so my question is from porter > > perspective. > > > > I need sigwaitinf

Re: Missing include in sys/device.h

2021-09-27 Thread Rafael Sadowski
On Mon Sep 27, 2021 at 11:20:55PM -0600, Theo de Raadt wrote: > Oh, like how about you try compiling a kernel after your proposed diff? > > in userland - >size_t comes from sys/types.h >or a header file which pulls in sys/types.h, and there should be >no further new iteration added >

Missing include in sys/device.h

2021-09-27 Thread Rafael Sadowski
device.h misses a definition of size_t /usr/include/sys/device.h:128:2: error: unknown type name 'size_t' Index: device.h === RCS file: /cvs/src/sys/sys/device.h,v retrieving revision 1.55 diff -u -p -r1.55 device.h --- device.h1

sigwaitinfo(2) and sigtimedwait(2)

2021-09-24 Thread Rafael Sadowski
is it possible to unlock the functions? Thanks, Rafael

POSIX_C_SOURCE 200809L, XOPEN_SOURCE 700 and bsd_locale_fallbacks errors

2021-04-13 Thread Rafael Sadowski
Based on my cmake pull-request(1) to fix the cmake build on OpenBSD, the following question has arisen which is worth analysing? "It seems OpenBSD has a strange behavior because macro _POSIX_C_SOURCE is a standard! @sizeofvoid What are the errors raised if _POSIX_C_SOURCE or _XOPEN_SOURCE are def

Re: acme-client: improve account creation error message

2020-09-14 Thread Rafael Possamai
>please dont drop the all buffer , or keep it with -vv ? >example : warnx("%s: bad JSON object:%s", p->newaccount, c->buf.buf); > >i don't want to ktrace it to see why the new certbot version is not working Yeah, I think it's good to have the choice to inspect the vomit, maybe you stumble upon so

Re: [Patch] Change httpd's handling of request "Host:" headers

2020-09-11 Thread Rafael Possamai
>I've been using the following at the top of my httpd.conf for a while >now and it seems to be working fine: > >server "default" { >    listen on * port 80 >     block return 400 >} > >This should also prevent httpd from wasting cycles looking for >non-existent locations on the filesystem

Re: Start point to learn OpenBSD programming

2020-03-16 Thread Rafael Sadowski
On Mon Mar 16, 2020 at 07:23:15AM +, Martin wrote: > Hello list, > > The best way for beginner to start with OpenbBSD programming? > > Martin http://www.grenadille.net/post/2019/10/21/10-projects-to-start-contributing-to-OpenBSD Rafael

Re: [PATCH] Avoid leftover temporary mount points when using -P (mfs)

2019-09-08 Thread Rafael Neves
On Mon, Sep 02, 2019 at 03:59:48PM -0300, Rafael Neves wrote: > On Mon, Sep 02, 2019 at 07:26:27AM +0200, Otto Moerbeek wrote: > > On Sun, Sep 01, 2019 at 05:01:55PM -0300, Rafael Neves wrote: > > > > > On Wed, Aug 28, 2019 at 03:39:17PM +0200, Otto Moerbeek wrote: > &g

Re: [PATCH] Avoid leftover temporary mount points when using -P (mfs)

2019-09-02 Thread Rafael Neves
On Mon, Sep 02, 2019 at 07:26:27AM +0200, Otto Moerbeek wrote: > On Sun, Sep 01, 2019 at 05:01:55PM -0300, Rafael Neves wrote: > > > On Wed, Aug 28, 2019 at 03:39:17PM +0200, Otto Moerbeek wrote: > > > On Sat, Aug 17, 2019 at 12:13:50PM -0300, Rafael Neves wro

Re: [PATCH] Avoid leftover temporary mount points when using -P (mfs)

2019-09-01 Thread Rafael Neves
On Wed, Aug 28, 2019 at 03:39:17PM +0200, Otto Moerbeek wrote: > On Sat, Aug 17, 2019 at 12:13:50PM -0300, Rafael Neves wrote: > > > Hi, > > > > Submitting to tech@ to broader audience. > > > > When using -P option in mfs with a directory or a block devic

[PATCH] Avoid leftover temporary mount points when using -P (mfs)

2019-08-17 Thread Rafael Neves
ctually, gettmpmnt() must changed to it work properly. The `created` if uses a <= by symmetry. But this is a differente issue, that I think could be changed in a separated diff. Regards, Rafael Neves Patch: Index: newfs.c ===

Re: [PATCH]: Make -P option of mount_mfs(8) support DUIDs

2019-07-09 Thread Rafael Neves
On Sat, May 04, 2019 at 06:18:27PM +0100, Rafael Neves wrote: > On Sun, Apr 14, 2019 at 08:05:21PM +0100, Rafael Neves wrote: > > On Mon, Apr 08, 2019 at 12:35:41AM +0100, Rafael Neves wrote: > > > Hi tech@, > > > > > > When I had to change a HD between m

Re: Qt5's libtool link scripts are unusable

2019-06-20 Thread Rafael Sadowski
On Thu Jun 20, 2019 at 04:46:59PM +0100, Stuart Henderson wrote: > Thanks for the report, > > On 2019/06/20 17:30, Vadim Penzin wrote: > > I admit that I am not familiar with the release process of pre-built binary > > packages; I might be writing to a wrong mailing list and I apologize in > > adv

Re: [PATCH]: Make -P option of mount_mfs(8) support DUIDs

2019-05-04 Thread Rafael Neves
On Sun, Apr 14, 2019 at 08:05:21PM +0100, Rafael Neves wrote: > On Mon, Apr 08, 2019 at 12:35:41AM +0100, Rafael Neves wrote: > > Hi tech@, > > > > When I had to change a HD between machines I figured out that -P option > > of mount_mfs(8) does not work with DUID

Re: Tighten nl(1) pledge(2) a bit

2019-04-21 Thread Rafael Neves
On Sat, Apr 20, 2019 at 07:10:21PM -0600, Theo de Raadt wrote: > Rafael Neves wrote: > > > Hi tech@, > > > > The Patch 1 below tighten pledge(2) promises to stdio, after the > > freopen(3) call, > > I've commited this. > > > and replaces an

Tighten nl(1) pledge(2) a bit

2019-04-20 Thread Rafael Neves
ess, except the file supplied. But it seemed like a hack. Comments? Regards, Rafael Neves Patch 1 (just pledge): Index: usr.bin/nl/nl.c === RCS file: /cvs/src/usr.bin/nl/nl.c,v retrieving revision 1.6 diff -u -p -r1.6 nl.c --- u

Re: [PATCH]: Make -P option of mount_mfs(8) support DUIDs

2019-04-14 Thread Rafael Neves
On Mon, Apr 08, 2019 at 12:35:41AM +0100, Rafael Neves wrote: > Hi tech@, > > When I had to change a HD between machines I figured out that -P option > of mount_mfs(8) does not work with DUIDs: > > # mount_mfs -P ca7552589896b01e.d swap /mnt > mount_mfs: cannot stat ca7552

[PATCH]: Make -P option of mount_mfs(8) support DUIDs

2019-04-07 Thread Rafael Neves
Hi tech@, When I had to change a HD between machines I figured out that -P option of mount_mfs(8) does not work with DUIDs: # mount_mfs -P ca7552589896b01e.d swap /mnt mount_mfs: cannot stat ca7552589896b01e.d: No such file or directory mount_mfs(8) already allows a DUID as the `special` argume

New driver apupgio(4): interface for LEDs and button of APU1. (Advices needed)

2019-03-25 Thread Rafael Neves
e more, get the gpio0 driver. Any thoughts about it? 6. Any other comments or suggestions? Regards, Rafael If you have an APU1 and want to test the patch, before using the gpio(4) devices trough gpioctl(8), you must configure them before the securelevel is raised. For example, wi

Re: witness report: vmmaplk, inode

2018-06-12 Thread Rafael Sadowski
On Wed Jun 13, 2018 at 07:47:42AM +1200, richard.n.proc...@gmail.com wrote: > Hi, > > I found this witness log on my computestick but not here. > > I was doing little at the time besides using emacs and some vanilla > chrome and possibly firefox. Hope it's of use. > > cheers, > Richard. > >

Fix a typo in INSTALL.octeon

2017-11-29 Thread Rafael Neves
Hi, The patch below replace one "$loadaddr" to "${loadaddr}" in U-Boot instructions of INSTALL.octeon. Regards, Rafael Neves Index: install === RCS file: /cvs/src/distrib/notes/octeon/install,v retrieving revi

mcast-proxy daemon

2017-05-19 Thread Rafael Zalamena
32091 --- /dev/null +++ kroute.c @@ -0,0 +1,1251 @@ +/* $OpenBSD:$ */ + +/* + * Copyright (c) 2017 Rafael Zalamena + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice

Re: mpe(4), mpw(4) and splsoftnet()

2016-12-20 Thread Rafael Zalamena
On Mon, Dec 19, 2016 at 11:48:31AM +0100, Martin Pieuchot wrote: > Interface ioctl(2) are now always run at IPL_SOFTNET, so let's get rid > of recursive splsoftnet()/splx() dances. > > ok? ok rzalamena@

Re: igmp: set rtableid on new mbufs

2016-12-16 Thread Rafael Zalamena
On Wed, Dec 14, 2016 at 06:59:42PM +0100, Martin Pieuchot wrote: > On 14/12/16(Wed) 16:54, Rafael Zalamena wrote: > > After running the igmpproxy in multiple domains I noticed that the kernel > > started complaining about sending packets on wrong domains. Here is the &g

dhcrelay(8): support replacing Relay Agent Info

2016-12-15 Thread Rafael Zalamena
This diff adds dhcrelay support for replacing Relay Agent Information on incoming packets with our configuration. This might be useful if you want to override user sent information or to adapt the incoming packet to another network. ok? Index: dhcrelay.8 ==

igmp: set rtableid on new mbufs

2016-12-14 Thread Rafael Zalamena
After running the igmpproxy in multiple domains I noticed that the kernel started complaining about sending packets on wrong domains. Here is the exact message: " vio1: trying to send packet on wrong domain. if 1 vs. mbuf 0 " After some debugging I traced the problem to the igmp_sendpkt() function

dhcrelay(8): allow multiple interfaces on l2

2016-12-13 Thread Rafael Zalamena
This diff implements support for allowing dhcrelay(8) to run on multiple source interfaces with just one instance when using layer 2. This is useful if you want to run dhcrelay(8) on multiple interfaces and want to use the same circuit-id/remote-id (e.g. have multiple vlan(4)s on the same interface

dhcrelay(8): fix default layer 3 remote-id

2016-12-13 Thread Rafael Zalamena
After the many iterations of the layer 2 diff, I noticed I broke the layer 3 default Relay Agent Information insertion: the relayed packet is using the wrong address in the remote-id field. This diff makes the Relay Agent Information init function to run later and get the right address for the def

multicast: propagate rdomain for add_vif

2016-12-12 Thread Rafael Zalamena
After trying to run igmpproxy daemon in different rdomains I noted that it fails with the following message: " ERRO: MRT_ADD_VIF; Errno(49): Can't assign requested address " In the following line: " if ( setsockopt( MRouterFD, IPPROTO_IP, MRT_ADD_VIF, (char *)&VifCtl, size

Re: dhcrelay(8): add support for layer 2 relaying

2016-12-10 Thread Rafael Zalamena
On Fri, Dec 09, 2016 at 11:55:17PM +0100, Reyk Floeter wrote: > On Fri, Dec 09, 2016 at 10:08:09AM +0100, Rafael Zalamena wrote: > > On Thu, Dec 08, 2016 at 08:43:20PM +0100, Rafael Zalamena wrote: > > > This diff implements layer 2 relaying support for dhcrelay with further

Re: dhcrelay(8): add support for layer 2 relaying

2016-12-09 Thread Rafael Zalamena
On Thu, Dec 08, 2016 at 08:43:20PM +0100, Rafael Zalamena wrote: > This diff implements layer 2 relaying support for dhcrelay with further > support for Relay Agent Info (RFC 3046). This feature is mostly used by > switched networks that might not be using IP addresses when in the edge &

dhcrelay(8): filter BOOTREPLY packets

2016-12-08 Thread Rafael Zalamena
This diff makes dhcrelay(8) drop packets that were not meant for us. This is a safety check suggested by jca@ to avoid relaying packets with the address of other relays. ok? Index: dhcrelay.c === RCS file: /cvs/src/usr.sbin/dhcrelay/

dhcrelay(8): add support for layer 2 relaying

2016-12-08 Thread Rafael Zalamena
This diff implements layer 2 relaying support for dhcrelay with further support for Relay Agent Info (RFC 3046). This feature is mostly used by switched networks that might not be using IP addresses when in the edge with the customer. Basically this diff allows you to run dhcrelay on interfaces wi

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Thu, Dec 08, 2016 at 06:59:18PM +0100, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > [...] > > >> Another problem: the relay->server code uses send(2) on a connected > >> socket and thus has no destination IP issue. But the relay->client p

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Thu, Dec 08, 2016 at 05:07:41PM +0100, Jeremie Courreges-Anglas wrote: > ---sniped--- > I think you've summoned Cthulhu with this diff. :) > > I started noticing a wrong behavior with when testing a multi-relay > setup, as prompted by Patrick's diff. See > > marc.info/?l=openbsd-tech&m=14809

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 09:36:24PM +0100, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > > I'm implementing some features for dhcrelay and to make them fit I need > > some clean ups in the dhcrelay(8) first. This diff changes most of the > > input/o

Re: dhcrelay(8): simplify get_interface()

2016-12-07 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 05:34:05PM +0100, Rafael Zalamena wrote: > This diff simplifies the get_interface function and makes it more > straightforward, it also makes dhcrelay(8) throw a more informative error > message when running layer 3 mode (default) on interfaces without an

dhcrelay(8): simplify get_interface()

2016-12-07 Thread Rafael Zalamena
This diff simplifies the get_interface function and makes it more straightforward, it also makes dhcrelay(8) throw a more informative error message when running layer 3 mode (default) on interfaces without an address. I'll use this code later to be able to get_interfaces() without an IP address.

Re: dhcrelay: pledge(2)

2016-12-07 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 02:47:25PM +0100, Reyk Floeter wrote: > Hi, > > dhcrelay drops privs but isn't pledged yet - here it is. > > It is simpler than dhclient: it only needs stdio and route because it > pre-opens all file descriptors (UDP, bpf), does the bpf ioctls before, > and only needs "rou

Re: dhcrelay(8): clean up function prototypes

2016-12-07 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 02:49:55PM +0100, Rafael Zalamena wrote: > ---snipped--- > Actually the code below is not wrong, there are some scenarios where you need this to make relayed DHCP to work. I'm not touching the part I noted before. The diff that I sent before still stands and

dhcrelay(8): clean up function prototypes

2016-12-07 Thread Rafael Zalamena
I'm implementing some features for dhcrelay and to make them fit I need some clean ups in the dhcrelay(8) first. This diff changes most of the input/output functions prototypes to take one parameter with all addresses instead of passing multiple parameters. Basically this will make input functions

Re: ntpd(8): use stack instead of heap

2016-12-02 Thread Rafael Zalamena
On Sat, Oct 01, 2016 at 07:05:51PM +0200, Rafael Zalamena wrote: > The ntpd(8) constraint fork+exec diff changed the way the constraint > processes are created, but then it introduced new calloc()s to avoid > increasing diff size and to focus on the problem. Now that the fork+exec >

switchd(8): learn remote switch tables

2016-12-02 Thread Rafael Zalamena
Learn remote switch's flow table properties so we can use this information to decide where to install the default table-miss flow for OpenFlow 1.3. This is not needed by OpenFlow 1.0 since it already does this by default. This diff implements the functions to ask the remote switch for tables infor

Re: vio(4): fixup crash on up/down

2016-11-24 Thread Rafael Zalamena
On Wed, Nov 23, 2016 at 09:10:44PM +0100, Stefan Fritsch wrote: > On Wed, 23 Nov 2016, Rafael Zalamena wrote: > > > > Maybe something like this is enough already (untested): > > > > I tried your diff without Mike's if_vio diff and it doesn't panic

Re: vio(4): fixup crash on up/down

2016-11-23 Thread Rafael Zalamena
On Wed, Nov 23, 2016 at 09:03:46AM +0100, Stefan Fritsch wrote: > On Wed, 23 Nov 2016, Mike Belopuhov wrote: > > > I guess we could do that. But then we cannot free the mbufs on DOWN > > > until the device has used them. > > > > Diff to this effect is below. Works on vmd and qemu (original > > on

switchd(8): negotiate versions with hello

2016-11-22 Thread Rafael Zalamena
Teach switchd(8) how to negotiate protocol version using the hello bitmap header. This way switchd(8) is able to fallback or use higher version using the bitmap. This diff also prevents connections from switching version in the middle of the operation. This is the first step before adding a state

switchd(8): more oxm basic checks

2016-11-17 Thread Rafael Zalamena
This diff adds the missing IP_PROTO oxm validation and adds more hasmask checks for types that should not have that. ok? Index: ofp13.c === RCS file: /cvs/src/usr.sbin/switchd/ofp13.c,v retrieving revision 1.29 diff -u -p -r1.29 ofp1

switchd(8): add more packet-out validations

2016-11-07 Thread Rafael Zalamena
Now that we have the flow-mod validation with the action/instructions support we can extend the usage of this functions for the packet-out validation. This diff increases the packet-out validation coverage by also doing instructions and packet truncation checks. ok? Index: ofp13.c ==

Wrong character in hackathons.html

2016-10-31 Thread Rafael Sadowski
Hi tech@, see diff. Kind regrads, Rafael Index: hackathons.html === RCS file: /cvs/www/hackathons.html,v retrieving revision 1.104 diff -u -p -u -p -r1.104 hackathons.html --- hackathons.html 31 Oct 2016 04:20:42 -

Re: switchd(8): add flow_mod validation

2016-10-31 Thread Rafael Zalamena
On Mon, Oct 24, 2016 at 07:05:08PM +0200, Rafael Zalamena wrote: > On Wed, Oct 12, 2016 at 05:39:17PM +0200, Rafael Zalamena wrote: > > This diff teaches switchd(8) how to validate flow_mod messages, more > > specifically the flow instructions and actions. The oxm validations &

Re: switch(4): add more input validations

2016-10-31 Thread Rafael Zalamena
On Fri, Oct 28, 2016 at 07:56:12PM +0400, Reyk Floeter wrote: > > On 28.10.2016, at 19:20, Rafael Zalamena wrote: > > This diff teaches switch(4) how to do more validations on dynamic input > > field types, like: ofp_match (has N oxms), ofp_action_header (might be > > fo

switch(4): input validation: swofp_flow_entry_put_instructions

2016-10-31 Thread Rafael Zalamena
This diff is a part of the bigger diff to add more input validations to the switch(4) OpenFlow protocol parser. In this diff we reworked the swofp_flow_entry_put_instructions() function with the following changes: - Avoid leaking memory on repeated instructions. It is not possible to use the sam

switch(4): add more input validations

2016-10-28 Thread Rafael Zalamena
This diff teaches switch(4) how to do more validations on dynamic input field types, like: ofp_match (has N oxms), ofp_action_header (might be followed by N actions) and ofp_instruction (might have N actions inside). This is important because the internal switch structures reuse the ofp_match and

Re: snmpd(8): teach how to fork+exec

2016-10-28 Thread Rafael Zalamena
On Sat, Oct 22, 2016 at 10:32:27PM +0200, Rafael Zalamena wrote: > On Sat, Oct 22, 2016 at 08:14:16PM +0200, Jeremie Courreges-Anglas wrote: > > Rafael Zalamena writes: > > > On Fri, Oct 21, 2016 at 01:26:36PM +0200, Jeremie Courreges-Anglas wrote: > > >> Rafael Za

Re: switchd(8): add flow_mod validation

2016-10-24 Thread Rafael Zalamena
On Wed, Oct 12, 2016 at 05:39:17PM +0200, Rafael Zalamena wrote: > This diff teaches switchd(8) how to validate flow_mod messages, more > specifically the flow instructions and actions. The oxm validations > were already implemented so we get them for free here. I've updated the fl

tun(4)/tap(4): fix mbuf header space check

2016-10-24 Thread Rafael Zalamena
tun(4)/tap(4) function tun_dev_write() is checking for the wrong size for the mbuf packet header. We must check against MHLEN (the mbuf header data storage size) and not MINCLSIZE (smallest amount of data of a cluster). For the curious: MGETHDR() calls m_gethdr() which uses mbpool to get the mbuf

snmpd(8): turn snmpd_env the only global

2016-10-23 Thread Rafael Zalamena
This diff removes all "extern struct snmpd *" lines from source files, replaces all 'env' occurences with 'snmpd_env' and adds the extern declaration for snmpd_env in the snmpd.h header. With this diff we only need to guarantee that this variable is set, we avoid shadowing other 'env' variables an

Re: snmpd(8): teach how to fork+exec

2016-10-22 Thread Rafael Zalamena
On Sat, Oct 22, 2016 at 08:14:16PM +0200, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > > On Fri, Oct 21, 2016 at 01:26:36PM +0200, Jeremie Courreges-Anglas wrote: > >> Rafael Zalamena writes: > >> > On Fri, Oct 14, 2016 at 06:47:09PM +0200, Rafa

Re: tcpdump(8): teach how to read ofp

2016-10-21 Thread Rafael Zalamena
On Wed, Oct 19, 2016 at 12:28:13PM +0200, Rafael Zalamena wrote: > This is the first step to teach tcpdump(8) how to read OpenFlow protocol > packets. I've implemented support for most messages switchd(8) uses and > currently only for OpenFlow 1.3.5, but we might reuse some

Re: snmpd(8): teach how to fork+exec

2016-10-21 Thread Rafael Zalamena
On Fri, Oct 21, 2016 at 01:26:36PM +0200, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > On Fri, Oct 14, 2016 at 06:47:09PM +0200, Rafael Zalamena wrote: > >> On Mon, Sep 26, 2016 at 03:45:59PM +0200, Rafael Zalamena wrote: > >> ---snip--- > > >

Re: snmpd(8): teach how to fork+exec

2016-10-21 Thread Rafael Zalamena
On Fri, Oct 14, 2016 at 06:47:09PM +0200, Rafael Zalamena wrote: > On Mon, Sep 26, 2016 at 03:45:59PM +0200, Rafael Zalamena wrote: > > Lets teach snmpd(8) how to fork+exec using the proc.c file from the latest > > switchd(8) diff. > > > > Note 1: I just tested the ba

tcpdump(8): teach how to read ofp

2016-10-19 Thread Rafael Zalamena
bgp_print(bp, length); + else if (sport == OLD_OFP_PORT || dport == OLD_OFP_PORT || + sport == OFP_PORT || dport == OFP_PORT) + ofp_print(bp, length); #if 0 else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS

Re: ifconfig(8): fix set switch(4) datapath id

2016-10-17 Thread Rafael Zalamena
On Mon, Oct 17, 2016 at 02:30:41PM +0400, Reyk Floeter wrote: > > > Am 17.10.2016 um 14:16 schrieb Rafael Zalamena : > > > > There are two inconsistencies with the ifconfig(8) switch(4) configuring: > > 1) Datapath ID is an unsigned 64 bit integer, not a signed one;

ifconfig(8): fix set switch(4) datapath id

2016-10-17 Thread Rafael Zalamena
There are two inconsistencies with the ifconfig(8) switch(4) configuring: 1) Datapath ID is an unsigned 64 bit integer, not a signed one; 2) ifconfig(8) man pages says that the parameter is "datapath" not "datapathid"; This diff fixes both problems and let us configure the datapath id correctly

Re: snmpd(8): teach how to fork+exec

2016-10-14 Thread Rafael Zalamena
On Mon, Sep 26, 2016 at 03:45:59PM +0200, Rafael Zalamena wrote: > Lets teach snmpd(8) how to fork+exec using the proc.c file from the latest > switchd(8) diff. > > Note 1: I just tested the basic operations: startup and teardown. > Note 2: the kill with close will be implemented

Re: relayd(8): proc.c sync and remove fd limit change

2016-10-14 Thread Rafael Zalamena
On Tue, Oct 11, 2016 at 02:02:46AM +0200, Rafael Zalamena wrote: > This diff brings the relayd(8) proc.c up-to-date and removes the file limit > alteration in relayd.c. The file limit alteration is not needed anymore > since now the number of descriptors pre-allocated is very small

switch(4): kill unused function

2016-10-14 Thread Rafael Zalamena
The switch(4) device has a function called switch_forward_flooder() which doesn't seem to be used anywhere. In switchofp.c we have the swofp_action_output() which would be the place where it would be likely called, however it already has the code that does it. Since it doesn't seem to fit anywher

switch(4): fix packet_out message handling

2016-10-14 Thread Rafael Zalamena
The switch(4) packet_out handler wasn't handling some cases, so here is the missing code. 1) pout_buffer_id is a 4 bytes field and it was using the wrong define to check for absence of buffers; 2) When a buffer_id was sent the code didn't handle this, now when this happens we send an error m

switchd(8): add flow_mod validation

2016-10-12 Thread Rafael Zalamena
This diff teaches switchd(8) how to validate flow_mod messages, more specifically the flow instructions and actions. The oxm validations were already implemented so we get them for free here. ok? Index: sys/net/ofp.h === RCS file: /c

switchd(8): implement the setconfig message

2016-10-12 Thread Rafael Zalamena
This diff teaches switchd(8) how to send the set_config message for OpenFlow 1.3.5. We need this to set the default miss_send_len to a value greater than zero so we can receive packets from the switch(4) with the payload. ok? Index: ofp13.c ===

Re: vmd/vmctl load/reload/reset

2016-10-12 Thread Rafael Zalamena
On Wed, Oct 12, 2016 at 02:06:35PM +0200, Reyk Floeter wrote: > On Wed, Oct 12, 2016 at 01:44:25PM +0200, Reyk Floeter wrote: > > Hi, > > > > vmctl reload is currently broken, the attached diff fixes it and > > re-introduces the semantics that originally came from iked: > > > > - load/reload just

relayd(8): proc.c sync and remove fd limit change

2016-10-10 Thread Rafael Zalamena
This diff brings the relayd(8) proc.c up-to-date and removes the file limit alteration in relayd.c. The file limit alteration is not needed anymore since now the number of descriptors pre-allocated is very small (only one descriptor per child + 2 to distribute fds between child). It would be nice

Re: httpd(8)/proc.c: use less fds on startup

2016-10-10 Thread Rafael Zalamena
On Mon, Oct 10, 2016 at 12:32:49PM +0200, Reyk Floeter wrote: > On Tue, Oct 04, 2016 at 11:54:37PM +0200, Rafael Zalamena wrote: > > On Tue, Oct 04, 2016 at 07:46:52PM +0200, Rafael Zalamena wrote: > > > This diff makes proc.c daemons to use less file descriptors on startup,

switch(4): check for the right mbuf header len

2016-10-08 Thread Rafael Zalamena
This diffs corrects the check for the header length size: instead of looking for MINCLSIZE (which is the cluster mbuf space size) we should use MHLEN (the header mbuf space size). ok? Index: net/switchofp.c === RCS file: /home/obsdc

httpd(8): dup2() fix for proc.c

2016-10-05 Thread Rafael Zalamena
This diff fixes the same problem ntpd(8) had with the dup2() when oldd == newd. Quick background: when you dup2(oldd, newd) and oldd == newd the CLOEXEC flag won't be removed by the descriptor. We could use dup3() to detect this, but it is easier/faster just to compare the fds and do the fcntl() o

Re: httpd(8)/proc.c: use less fds on startup

2016-10-04 Thread Rafael Zalamena
On Tue, Oct 04, 2016 at 07:46:52PM +0200, Rafael Zalamena wrote: > This diff makes proc.c daemons to use less file descriptors on startup, > this way we increase the number of child we can have considerably. This > also improves the solution on a bug reported in bugs@ > "httpd err

httpd(8)/proc.c: use less fds on startup

2016-10-04 Thread Rafael Zalamena
This diff makes proc.c daemons to use less file descriptors on startup, this way we increase the number of child we can have considerably. This also improves the solution on a bug reported in bugs@ "httpd errors out with 'too many open files'". To achieve that I delayed the socket distribution an

bridge(4): fix span interface removal

2016-10-03 Thread Rafael Zalamena
While doing the "notify bridge of interface removal with hook" I noticed that the span ports suffer from not having something to remove them. To reproduce this problem, do the following steps: # ifconfig vether0 up # ifconfig bridge0 up # ifconfig bridge0 addspan vether0 # ifconfig vether0 destroy

Re: ntpd(8): use safer dup3() instead of dup2()

2016-10-02 Thread Rafael Zalamena
On Sun, Oct 02, 2016 at 02:30:11PM -0700, Philip Guenther wrote: > On Sun, 2 Oct 2016, Rafael Zalamena wrote: > > This diff is an improvement and an attempt to fix the bug where the > > ntpd(8) not always stays running. > > > > During the review of syslogd fork+exe

ntpd(8): use safer dup3() instead of dup2()

2016-10-02 Thread Rafael Zalamena
This diff is an improvement and an attempt to fix the bug where the ntpd(8) not always stays running. During the review of syslogd fork+exec diff I noticed the use of dup3() and went to read its man page: dup2() doesn't always remove the CLOEXEC flag from the descriptor, so using dup3() is a bette

bridge(4): use hook to notify interface detach

2016-10-02 Thread Rafael Zalamena
Just like the switch(4) diff, this one does the same thing for the bridge(4). This diff removes bridge(4) code from if.c and uses the detach hook to be notified about interface removals. ok? Index: net/if.c === RCS file: /home/obsd

switch(4): use hook to notify interface detach

2016-10-02 Thread Rafael Zalamena
mpi@ suggested that it would be possible to use if_detachhooks to handle the interface teardown instead of adding code to if.c, so this diff does exactly that. Not only we get to remove switch(4) code from if.c, we also get less lines of code by removing some duplicated teardown procedure in switc

Re: syslogd fork+exec

2016-10-01 Thread Rafael Zalamena
On Thu, Sep 29, 2016 at 08:09:23PM +0200, Alexander Bluhm wrote: > Hi, > > With this diff syslogd(8) does an exec on itself in the privileged > parent process to reshuffle its memory layout. > > As syslogd only forks once, it does not really matter wether we > fork+exec in the child or in the par

ntpd(8): use stack instead of heap

2016-10-01 Thread Rafael Zalamena
The ntpd(8) constraint fork+exec diff changed the way the constraint processes are created, but then it introduced new calloc()s to avoid increasing diff size and to focus on the problem. Now that the fork+exec is in, this diff make those variables to become a part of the stack. No functional chan

netstart+switch(4): delay interface start

2016-09-27 Thread Rafael Zalamena
switch(4) needs to have its interface start up delayed, otherwise the netstart script will fail to configure switch(4) with virtual interfaces like vether(4). This diff adds switch(4) to the delayed list just like bridge(4). ok? Index: netstart ===

switch(4): don't panic when destroying interfaces

2016-09-26 Thread Rafael Zalamena
switch(4) is currently not handling device removal when the interface is being destroyed. Example: # ifconfig switch0 up # ifconfig vether0 up # ifconfig switch0 add vether0 # ifconfig vether0 destroy # kernel panic here This diff fixes it by calling the switch port detach on the right time. ok?

snmpd(8): teach how to fork+exec

2016-09-26 Thread Rafael Zalamena
Lets teach snmpd(8) how to fork+exec using the proc.c file from the latest switchd(8) diff. Note 1: I just tested the basic operations: startup and teardown. Note 2: the kill with close will be implemented in another diff with the ps_pid removal. ok? Index: proc.c ==

snmpd(8): fix compilation warnings with DEBUG

2016-09-26 Thread Rafael Zalamena
This diff fixes two compiler warnings when compiling with DEBUG define. ok? Index: timer.c === RCS file: /home/obsdcvs/src/usr.sbin/snmpd/timer.c,v retrieving revision 1.5 diff -u -p -r1.5 timer.c --- timer.c 27 Aug 2016 01:50:0

switchd(8): set the pktbuf for packet_in messages

2016-09-23 Thread Rafael Zalamena
The pkt_buf variable is never set in incoming packet_in messages and this diff fixes it. ok? Index: packet.c === RCS file: /home/obsdcvs/src/usr.sbin/switchd/packet.c,v retrieving revision 1.3 diff -u -p -r1.3 packet.c --- packet.c

switchd(8): fix memory leak and loop

2016-09-23 Thread Rafael Zalamena
This diff fixes a memory leak in ofp_read() that happens in every message and a infinite loop that happens when the remote switch closes the connection. ok? Index: ofp.c === RCS file: /home/obsdcvs/src/usr.sbin/switchd/ofp.c,v retrie

switchd(8): more debug messages

2016-09-23 Thread Rafael Zalamena
Enable more debug messages to help developing the flow modification messages. ok? Index: ofp13.c === RCS file: /home/obsdcvs/src/usr.sbin/switchd/ofp13.c,v retrieving revision 1.5 diff -u -p -r1.5 ofp13.c --- ofp13.c 21 Jul 2016

Re: Manpage for uctuctl(4)

2016-09-18 Thread Rafael Neves
Hi, On Sun, Sep 18, 2016 at 06:46:48PM +0200, Ingo Schwarze wrote: > Hi Rafael, > > Rafael Neves wrote on Sun, Sep 18, 2016 at 12:29:35PM +0100: > > On Sun, Sep 18, 2016 at 03:33:00PM +0200, Ingo Schwarze wrote: > > >> - Put the correct manual page author into the

Re: Manpage for uctuctl(4)

2016-09-18 Thread Rafael Neves
Hi, On Sun, Sep 18, 2016 at 03:33:00PM +0200, Ingo Schwarze wrote: > Hi, > > Mike Belopuhov wrote on Sun, Sep 18, 2016 at 01:35:45PM +0200: > > On Sun, Sep 18, 2016 at 06:15 +, Visa Hankala wrote: > >> On Sat, Sep 17, 2016 at 02:40:09PM +0100, Rafael Neves wrote:

  1   2   >