Fixes for padding in OpenFlow header match fields

2019-11-26 Thread Ayaka Koshibe
Currently, we assume that OpenFlow 1.3 set_field actions can contain multiple header match fields (OXMs). According to specification, a set_field action contains exactly one OXM, followed by padding to align the action field in a OpenFlow message to 64 bits. This diff changes how we handle OpenFlo

switch(4): port protection man page updates

2019-05-10 Thread Ayaka Koshibe
Hi, These are the manpage updates to go with the port protection diffs for switch(4). Thanks, Ayaka Index: sbin/ifconfig/ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrieving revision 1.334 diff -u -p -u -r1.334

switch(4): add support for protected domains

2019-05-09 Thread Ayaka Koshibe
Hi, The following adds port protection support to switch(4). The behavior copies that of bridge(4), where ports can be added to up to 31 protected domains with a list of IDs using ifconfig(8): # ifconfig switch0 protected pair1 1,2,.. Domain membership is checked for unicast, flooded (broadcast)

switchd.conf(5): mention default values used for global configurations

2018-11-08 Thread Ayaka Koshibe
Hi all, After a second thought, I've split off the diff for switchd.conf(5) from the diffs for changing switchd(8)'s default listen port. As suggested by kn@, it now notes the default listen port and address. Comments/OKs? Thanks, Ayaka Index: switchd.conf.5 ==

Re: switchd(8): change default listen port to the standardized OpenFlow port

2018-11-07 Thread Ayaka Koshibe
On Wed, Nov 07, 2018 at 10:52:59AM +0100, Klemens Nanni wrote: > On Tue, Nov 06, 2018 at 11:01:37PM -0800, Ayaka Koshibe wrote: > > Currently, switchd(8) defaults to listening on port 6633, which was > > the defacto port value used by OpenFlow. A decent chunk of OpenFlow >

switchd(8): change default listen port to the standardized OpenFlow port

2018-11-06 Thread Ayaka Koshibe
Hi all, Currently, switchd(8) defaults to listening on port 6633, which was the defacto port value used by OpenFlow. A decent chunk of OpenFlow controllers have switched over to the IANA standardized OpenFlow port, 6653. While testing the change, I noticed that switchd(8) will listen on random por

switchctl(8): additional pledge for 'show *' commands

2018-10-23 Thread Ayaka Koshibe
Hi all, I've taken claudio@'s advice and restricted the pledge further. All of the promises except stdio were for parsing args and opening sockets. OK? Thanks, Ayaka Index: switchctl.c === RCS file: /cvs/src/usr.sbin/switchctl/sw

Re: switchctl(8): Add ability to reference control device for 'dump' option

2018-10-16 Thread Ayaka Koshibe
On Mon, Oct 15, 2018 at 03:17:28PM -0700, Ayaka Koshibe wrote: > Hi all, > > Currently, switchctl(8) is able to query a switch for information by > specifying > the switch's network address. The following adds support for querying a > switch(4) instance via its control

switchctl(8): Add ability to reference control device for 'dump' option

2018-10-15 Thread Ayaka Koshibe
Hi all, Currently, switchctl(8) is able to query a switch for information by specifying the switch's network address. The following adds support for querying a switch(4) instance via its control device: $ doas switchctl switch /dev/switch0 dump features any > /dev/switch0: version 1_3 type FEATU

Re: vmd stdio /dev/null

2018-09-10 Thread Ayaka Koshibe
On Mon, Sep 10, 2018 at 01:48:23PM +0200, Alexander Bluhm wrote: > On Mon, Sep 10, 2018 at 09:59:31AM +0200, Reyk Floeter wrote: > > I already gave my OK for relayd but asked to adjust all proc.c instances. > > I have fixed relayd, httpd, vmd. > akoshibe@ cares about switchd. switchd is also now

switchd(8) stdio /dev/null

2018-09-10 Thread Ayaka Koshibe
Hi, Mirroring bluhm's fixes for proc.c daemons to dup /dev/null for child processes, for switchd(8). OK? Thanks, Ayaka Index: proc.c === RCS file: /cvs/src/usr.sbin/switchd/proc.c,v retrieving revision 1.13 diff -u -p -u -r1.13 pr

switchd(8): don't set output port to OFP*_PORT_ANY for input == output

2018-09-09 Thread Ayaka Koshibe
Hi, This is a new version of a previous diff that I had for making switchd(8) ignore PACKET_IN messages generated from looped traffic. Currently, it will respond to the PACKET_IN with an invalid PACKET_OUT onto OFP*_PORT_ANY, resulting in the switch responding with an error that makes switchd disc

[patch] switchd(8) on sparc64: panic: trap type 0x34

2018-08-19 Thread Ayaka Koshibe
Hi, At BSDCan, someone reported that a sparc64 machine would panic if it was receiving any traffic on a member interface of a switch(4) during reboot. We got as far as getting this trace: panic: trap type 0x34 (mem address not aligned): pc=15864ec npc=15864f0 pstate=99820006 Stopped at db_en

Check lo(4) rdomain before attempting to move it to another

2018-08-05 Thread Ayaka Koshibe
Hi, I noticed that if you try to move an immovable lo(4) to a nonexistent rdomain, a new routing table will be created despite the operation failing with an EPERM. The following moves the rdomain/index check for lo(4) to before the creation of a nonexisting target routing table. OK? Thanks, Ay

remove pledge(2) cpath from switchd(8)

2018-08-04 Thread Ayaka Koshibe
On Sat, Aug 04, 2018 at 12:18:45PM +0100, Ricardo Mestre wrote: > Hi, > > Here's another one for switchd(8) which removes cpath promise from pledge(2) > > OK? This makes sense to me, and my usual tests worked without any issues. ok akoshibe@ > > Index: control.c > ==

switchd(8): ignore packet_out with dstport = OFP_PORT_ANY

2018-05-08 Thread Ayaka Koshibe
On Fri, Apr 20, 2018 at 10:18:34AM -0700, Ayaka Koshibe wrote: > Hi, > > switchd(8) sends packet_outs with OFP_PORT_ANY as the dstport, causing > switches receiving them to disconnect due to validation failure of the said > message. The comments indicate that looping packets sh

switchd(8): ignore packet_out with dstport = OFP_PORT_ANY

2018-04-28 Thread Ayaka Koshibe
On Fri, Apr 20, 2018 at 10:18:34AM -0700, Ayaka Koshibe wrote: > Hi, > > switchd(8) sends packet_outs with OFP_PORT_ANY as the dstport, causing > switches receiving them to disconnect due to validation failure of the said > message. The comments indicate that looping packets sh

ifconfig: add -tunneldomain option

2018-04-25 Thread Ayaka Koshibe
On Wed, Apr 25, 2018 at 11:58:30AM +0100, Jason McIntyre wrote: > On Wed, Apr 25, 2018 at 12:20:35PM +0200, Sebastian Benoit wrote: > > ok > > > > while doing it, can you move the tunneldomain options (both) to after > tunneldf instead of before it (both in the mini synopsis and the list)? > if n

ifconfig: add -tunneldomain option

2018-04-25 Thread Ayaka Koshibe
Hi, A while back I got a suggestion to add a '-tunneldomain' option as shorthand for 'tunneldomain 0' to be consistent with '-rdomain'. OK? Thanks, Ayaka Index: ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrievin

switchd(8): ignore packet_out with dstport = OFP_PORT_ANY

2018-04-20 Thread Ayaka Koshibe
Hi, switchd(8) sends packet_outs with OFP_PORT_ANY as the dstport, causing switches receiving them to disconnect due to validation failure of the said message. The comments indicate that looping packets should be ignored, which I agree is the expected behavior for a controller implementing a learn

Re: ifconfig: add -rdomain option

2018-02-22 Thread Ayaka Koshibe
On Thu, Feb 22, 2018 at 4:54 AM, David Gwynne wrote: > > >> On 22 Feb 2018, at 5:00 pm, Ayaka Koshibe wrote: >> >> On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: >>> Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: >>&

Re: ifconfig: add -rdomain option

2018-02-21 Thread Ayaka Koshibe
On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: > Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > > > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > > >

Re: ifconfig: add -rdomain option

2018-02-20 Thread Ayaka Koshibe
On Tue, Feb 20, 2018 at 5:08 AM, Stefan Sperling wrote: > On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: >> Index: sbin/ifconfig/ifconfig.c >> === >> RCS file: /cvs/src/sbin/ifconfig/ifcon

Re: ifconfig: add -rdomain option

2018-02-20 Thread Ayaka Koshibe
On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : >> >>> On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: >>> This diff would allow saying 'ifconfig foo -rdomain' instead of '

ifconfig: add -rdomain option

2018-02-19 Thread Ayaka Koshibe
Hi, This diff would allow saying 'ifconfig foo -rdomain' instead of 'ifconfig foo rdomain 0'. OK? Thanks, Ayaka Index: sbin/ifconfig/ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrieving revision 1.292 diff -u -