summaryrefslogtreecommitdiff
path: root/usr.sbin/switchd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/switchd')
-rw-r--r--usr.sbin/switchd/parse.y6
-rw-r--r--usr.sbin/switchd/types.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/switchd/parse.y b/usr.sbin/switchd/parse.y
index 81350328438..6da5e5ea0ee 100644
--- a/usr.sbin/switchd/parse.y
+++ b/usr.sbin/switchd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.12 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.13 2018/11/08 17:12:12 akoshibe Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -146,6 +146,8 @@ listen : LISTEN ON STRING opttls port {
YYERROR;
}
free($3);
+ ((struct sockaddr_in *)&conf->sc_server.srv_addr)
+ ->sin_port = htons(SWITCHD_CTLR_PORT);
}
;
@@ -627,7 +629,7 @@ parse_config(const char *filename, struct switchd *sc)
conf = sc;
- /* Set the default 0.0.0.0 6633/tcp */
+ /* Set the default 0.0.0.0 6653/tcp */
memset(&conf->sc_server.srv_addr, 0, sizeof(conf->sc_server.srv_addr));
sin4 = (struct sockaddr_in *)&conf->sc_server.srv_addr;
sin4->sin_family = AF_INET;
diff --git a/usr.sbin/switchd/types.h b/usr.sbin/switchd/types.h
index b89bae20712..4976e4cff1e 100644
--- a/usr.sbin/switchd/types.h
+++ b/usr.sbin/switchd/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.10 2016/11/18 16:49:35 reyk Exp $ */
+/* $OpenBSD: types.h,v 1.11 2018/11/08 17:12:12 akoshibe Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
@@ -37,8 +37,7 @@
#define SWITCHD_MAX_TAP 256
#define SWITCHD_MAX_SESSIONS 0xffff
-#define SWITCHD_CTLR_PORT 6633 /* Previously used by OpenFlow */
-#define SWITCHD_CTLR_IANA_PORT 6653 /* Assigned by IANA for OpenFlow */
+#define SWITCHD_CTLR_PORT 6653 /* Assigned by IANA for OpenFlow */
#define SWITCHD_CACHE_MAX 4096 /* Default MAC address cache limit */
#define SWITCHD_CACHE_TIMEOUT 240 /* t/o in seconds for learned MACs */