OpenBSD CVS

CVS log for src/usr.sbin/switchd/Attic/parse.y


[BACK] Up to [local] / src / usr.sbin / switchd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17, Thu Nov 11 09:59:19 2021 UTC (2 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED

Retire switchd and switchctl. While interesting they never managed to
really get into a usable state. The OpenFlow API is mostly superseeded
by P4 and so this is a bit of a dead end.
OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:29 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
Changes since 1.15: +6 -6 lines
Diff to previous 1.15 (colored)

Don't declare variables as "unsigned char *" that are passed to
functions that take "char *" arguments.  Where such chars are
assigned to int or passed to ctype functions, explicitly cast them
to unsigned char.

For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.

With help from millert@
ok benno@ deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 13 22:57:08 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 8 17:48:06 2018 UTC (5 years, 7 months ago) by akoshibe
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Set sc_server.srv_tls value for "LISTEN ON STRING opttls".

OK phessler@

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 8 17:12:12 2018 UTC (5 years, 7 months ago) by akoshibe
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

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. switchd(8) also randomizes its listen ports when one is not
specified in switchd.conf(5).conf.

Consolidate the #defines for port values, and set a default listen port.

OK phessler@ claudio@, kn@ with separate switchd.conf(5) update

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 1 00:18:44 2018 UTC (5 years, 7 months ago) by sashan
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

- odd condition/test in PF lexer
  (and other lexers too)

This commit rectifies earlier change:

    in the lex... even inside quotes, a \ followed by space or tab should
    expand to space or tab, and a \ followed by newline should be ignored
    (as a line continuation).  compatible with the needs of hoststated
    (which has the most strict quoted string requirements), and ifstated
    (where one commonly does line continuations in strings).

OK deraadt@, OK millert@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Sep 7 07:35:31 2018 UTC (5 years, 9 months ago) by miko
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.10: +4 -9 lines
Diff to previous 1.10 (colored)

replace malloc()+strlcpy() with strndup() in cmdline_symset().

"looks good" gilles@ halex@

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jul 11 07:39:22 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Do for most running out of memory err() what was done for most running
out of memory log_warn(). i.e. ("%s", __func__) instead of manual
function names and redundant verbiage about which wrapper detected the
out of memory condition.

ok henning@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 9 12:05:11 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

No need to mention which memory allocation entry point failed (malloc,
calloc or strdup), we just need to log that we ran out of memory in a
particular function.

Recommended by florian@ and deraadt@

ok benno@ henning@ tb@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jul 8 17:15:07 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Be consistent in warn() and log_warn() usage when
running out of memory.

Next step, be correct *and* consistent.

ok dennis@ tb@ benno@ schwarze@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 11 09:57:01 2018 UTC (5 years, 11 months ago) by denis
Branch: MAIN
Changes since 1.6: +80 -48 lines
Diff to previous 1.6 (colored)

Fix an off-by-one line count when using include statements.

Thanks to otto@ for the initial diff.

OK benno@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Aug 28 06:00:05 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

65535 is a valid port to listen on.
Off-by-one pointed out by and diff from Kris Katterjohn katterjohn AT
gmail, thanks!
chris@ pointed out that more than httpd(8) is effected.
OK gilles@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 6 17:31:19 2017 UTC (6 years, 10 months ago) by rob
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

packet.c and parse.y no longer require err.h. ok jca@ florian@

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jan 5 12:42:19 2017 UTC (7 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.3: +7 -5 lines
Diff to previous 1.3 (colored)

Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQ
with more modern TAILQ_FOREACH(). This what symget() was already
doing.

Add paranoia '{}' around body of symget()'s TAILQ_FOREACH().

No intentional functional change.

ok bluhm@ otto@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 12 19:07:42 2016 UTC (7 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.2: +50 -27 lines
Diff to previous 1.2 (colored)

Start reworking the "device" support in switchd: Once connected, a
device is just an fd that is connected to a switch, either via TCP or
via /dev/switch.  Change the switchctl from "device add" to "connect"
etc.  This change is an intermediate step towards other changes,
including the configuration grammar, so a few things will be left
undocumented for now.

switchctl(8) examples,
switchctl connect /dev/switch0
switchctl connect /dev/switch0 forward-to 10.1.1.1
switchctl connect 127.0.0.1
switchctl connect 127.0.0.1 forward-to 10.1.1.1
switchctl disconnect /dev/switch0

Discussed with rzalamena@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 30 11:57:57 2016 UTC (7 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Implement socket server code that properly handles async I/O, partial
messages, multiple messages per buffer and important things like
connection limits and file descriptor accounting.  It works with TCP
connections as well as switch(4).  The ofrelay.c part replaces
networking that was in ofp.c and will soon handle all socket
connections of switchd.  It is called "ofrelay" because it will be
used as client, server, and forwarder.

OK rzalamena@

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 19 16:54:26 2016 UTC (7 years, 10 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0

Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.

switchd consists of two parts:
1. switchd(8) and switchctl(8), an OpenFlow controller or "vswitch".
2. switch(4), an OpenFlow-aware kernel "bridge".

This the 1st part, the driver will be imported later.  The code will
remain disabled for a while, but it helps development to have it in
the tree.  switchd currently supports partial OpenFlow 1.0, but the
goal is to use OpenFlow 1.3.5 instead (switch(4) already does 1.3.5).

For more background information see:
http://www.openbsd.org/papers/bsdcan2016-switchd.pdf
https://youtu.be/Cuo0qT-lqig

With help from yasuoka@ goda@
Import discussed with deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.