diff --git a/.travis.yml b/.travis.yml
index ff2fa2e4810..4d7bbd85730 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,6 +19,8 @@ addons:
- python-sphinx
- libelf-dev
- selinux-policy-dev
+ - libunbound-dev
+ - libunbound-dev:i386
before_install: ./.travis/${TRAVIS_OS_NAME}-prepare.sh
diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
index 474c9e86157..fe30c19ad57 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -93,6 +93,10 @@ need the following software:
- Python 2.7. You must also have the Python ``six`` library version 1.4.0
or later.
+- Unbound library, from http://www.unbound.net, is optional but recommended if
+ you want to enable ovs-vswitchd and other utilities to use DNS names when
+ specifying OpenFlow and OVSDB remotes. If unbound library is already
+ installed, then Open vSwitch will automatically build with support for it.
On Linux, you may choose to compile the kernel module that comes with the Open
vSwitch distribution or to use the kernel module built into the Linux kernel
diff --git a/Documentation/ref/ovsdb.7.rst b/Documentation/ref/ovsdb.7.rst
index bcdcd717aeb..39d85b6e577 100644
--- a/Documentation/ref/ovsdb.7.rst
+++ b/Documentation/ref/ovsdb.7.rst
@@ -379,11 +379,11 @@ the opposite arrangement as well.
OVSDB supports the following active connection methods:
-ssl:
-
- The specified SSL port on the host at the given
- ip, which must be expressed as an IP address (not a DNS
- name) in IPv4 or IPv6 address format. If ip is an IPv6
- address, then wrap ip with square brackets, e.g.:
-
-
- Connect to the given TCP port on ip, where
- ip can be IPv4 or IPv6 address. If ip is an
- IPv6 address, then wrap ip with square brackets, e.g.:
-
ssl:ip:port
+ ssl:host:port
ssl:[::1]:6640
. The --private-key
,
- --certificate
and either of --ca-cert
- or --bootstrap-ca-cert
options are mandatory when this
- form is used.
+ The specified SSL port on the give host, which
+ can either be a DNS name (if built with unbound library) or an IP
+ address (IPv4 or IPv6). If host is an IPv6 address, then
+ wrap host with square brackets, e.g.: ssl:[::1]:6640
.
+ The --private-key
, --certificate
and either
+ of --ca-cert
or --bootstrap-ca-cert
options
+ are mandatory when this form is used.
tcp:ip:port
+ tcp:host:port
tcp:[::1]:6640
.
+ Connect to the given TCP port on host, where
+ host can be a DNS name (if built with unbound library) or
+ IP address (IPv4 or IPv6). If host is an IPv6 address,
+ then wrap host with square brackets,
+ e.g.: tcp:[::1]:6640
.
ssl:ip
[:port
]ssl:host
[:port
]The specified SSL port on the host at the given - ip, which must be expressed as an IP address - (not a DNS name). A valid SSL configuration must be provided - when this form is used, this configuration can be specified - via command-line options or the table. + host, which can either be a DNS name (if built with + unbound library) or an IP address. A valid SSL configuration must + be provided when this form is used, this configuration can be + specified via command-line options or the table.
If port is not specified, it defaults to 6640. @@ -2080,30 +2080,29 @@
tcp:ip
[:port
]tcp:host
[:port
]
The specified TCP port on the host at the given
- ip, which must be expressed as an IP address (not a
- DNS name), where ip can be IPv4 or IPv6 address. If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. tcp:[::1]:6640
.
+ host, which can either be a DNS name (if built with
+ unbound library) or an IP address. If host is an IPv6
+ address, wrap it in square brackets, e.g. tcp:[::1]:6640
.
If port is not specified, it defaults to 6640.
pssl:
[port][:ip
]pssl:
[port][:host
]
Listens for SSL connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap in square brackets,
- e.g. pssl:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IPaddress (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap in square brackets,
+ e.g. pssl:6640:[::1]
. If host is not
specified then it listens only on IPv4 (but not IPv6) addresses.
A valid SSL configuration must be provided when this form is used,
this can be specified either via command-line options or the
@@ -2117,17 +2116,17 @@
part of Open vSwitch.
ptcp:
[port][:ip
]ptcp:
[port][:host
]
Listens for connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap it in square brackets,
- e.g. ptcp:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IP address (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap it in square brackets,
+ e.g. ptcp:6640:[::1]
. If host is not
specified then it listens only on IPv4 addresses.
diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index b17110e4832..f9724d398ce 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -2840,14 +2840,14 @@ tcp.flags = RST; The following connection methods are currently supported:
ssl:ip
[:port
]ssl:host
[:port
]- The specified SSL port on the host at the given - ip, which must be expressed as an IP address - (not a DNS name). A valid SSL configuration must be provided - when this form is used, this configuration can be specified - via command-line options or the table. + The specified SSL port on the given host, + which can either be a DNS name (if built with unbound library) or + an IP address. A valid SSL configuration must be provided when + this form is used, this configuration can be specified via + command-line options or the table.
If port is not specified, it defaults to 6640. @@ -2858,30 +2858,29 @@ tcp.flags = RST;
tcp:ip
[:port
]tcp:host
[:port
]
- The specified TCP port on the host at the given
- ip, which must be expressed as an IP address (not a
- DNS name), where ip can be IPv4 or IPv6 address. If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. tcp:[::1]:6640
.
+ The specified TCP port on the given host,
+ which can either be a DNS name (if built with unbound library) or
+ an IP address (IPv4 or IPv6). If host is an IPv6
+ address, wrap it in square brackets, e.g. tcp:[::1]:6640
.
If port is not specified, it defaults to 6640.
pssl:
[port][:ip
]pssl:
[port][:host
]
Listens for SSL connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap in square brackets,
- e.g. pssl:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IP address (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap in square brackets,
+ e.g. pssl:6640:[::1]
. If host is not
specified then it listens only on IPv4 (but not IPv6) addresses.
A valid SSL configuration must be provided when this form is used,
this can be specified either via command-line options or the
@@ -2895,17 +2894,17 @@ tcp.flags = RST;
part of Open vSwitch.
ptcp:
[port][:ip
]ptcp:
[port][:host
]
Listens for connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap it in square brackets,
- e.g. ptcp:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IP address (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap it in square brackets,
+ e.g. ptcp:6640:[::1]
. If host is not
specified then it listens only on IPv4 addresses.
diff --git a/python/ovs/stream.py b/python/ovs/stream.py index d6c447a9736..5996497a50c 100644 --- a/python/ovs/stream.py +++ b/python/ovs/stream.py @@ -702,8 +702,8 @@ def usage(name): return """ Active %s connection methods: unix:FILE Unix domain socket named FILE - tcp:IP:PORT TCP socket to IP with port no of PORT - ssl:IP:PORT SSL socket to IP with port no of PORT + tcp:HOST:PORT TCP socket to HOST with port no of PORT + ssl:HOST:PORT SSL socket to HOST with port no of PORT Passive %s connection methods: punix:FILE Listen on Unix domain socket FILE""" % (name, name) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 2b01c5768e9..8c18d39c20f 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -87,8 +87,9 @@ BuildRequires: libpcap-devel numactl-devel BuildRequires: dpdk-devel >= 17.05.1 Provides: %{name}-dpdk = %{version}-%{release} %endif +BuildRequires: unbound unbound-devel -Requires: openssl hostname iproute module-init-tools +Requires: openssl hostname iproute module-init-tools unbound #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 #Requires: kernel >= 3.15.0-0 diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 9dca3873beb..43121429d18 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -38,6 +38,7 @@ BuildRequires: openssl-devel BuildRequires: checkpolicy, selinux-policy-devel BuildRequires: autoconf, automake, libtool BuildRequires: python-sphinx +BuildRequires: unbound-devel %bcond_without check %bcond_with check_datapath_kernel diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 46da45db9c7..71919693730 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -51,6 +51,7 @@ #include "openvswitch/vconn.h" #include "openvswitch/vlog.h" #include "lib/vswitch-idl.h" +#include "lib/dns-resolve.h" VLOG_DEFINE_THIS_MODULE(vswitchd); @@ -81,6 +82,7 @@ main(int argc, char *argv[]) set_program_name(argv[0]); ovsthread_id_init(); + dns_resolve_init(true); ovs_cmdl_proctitle_init(argc, argv); service_start(&argc, &argv); remote = parse_options(argc, argv, &unixctl_path); @@ -141,6 +143,7 @@ main(int argc, char *argv[]) service_stop(); vlog_disable_async(); ovsrcu_exit(); + dns_resolve_destroy(); return 0; } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 76094852d4e..8f4263d1691 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -4431,26 +4431,25 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ controllers:
ssl:ip
[:port
]ssl:host
[:port
]The specified SSL port on the host at the - given ip, which must be expressed as an IP - address (not a DNS name). The column in the - table must point to a valid SSL configuration when this form - is used.
+ given host, which can either be a DNS name (if built + with unbound library) or an IP address. The column in the table must + point to a valid SSL configuration when this form is used.If port is not specified, it defaults to 6653.
SSL support is an optional feature that is not always built as part of Open vSwitch.
tcp:ip
[:port
]tcp:host
[:port
]
The specified TCP port on the host at the given
- ip, which must be expressed as an IP address (not a
- DNS name), where ip can be IPv4 or IPv6 address. If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. tcp:[::1]:6653
.
+ host, which can either be a DNS name (if built with
+ unbound library) or an IP address (IPv4 or IPv6). If host
+ is an IPv6 address, wrap it in square brackets, e.g.
+ tcp:[::1]:6653
.
If port is not specified, it defaults to 6653. @@ -4462,19 +4461,19 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ controllers:
pssl:
[port][:ip
]pssl:
[port][:host
]
Listens for SSL connections on the specified TCP port.
- If ip, which must be expressed as an IP address (not a
- DNS name), is specified, then connections are restricted to the
- specified local IP address (either IPv4 or IPv6). If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. pssl:6653:[::1]
.
+ If host, which can either be a DNS name (if built with
+ unbound library) or an IP address, is specified, then connections
+ are restricted to the resolved or specified local IP address
+ (either IPv4 or IPv6). If host is an IPv6 address,
+ wrap it in square brackets, e.g. pssl:6653:[::1]
.
If port is not specified, it defaults to - 6653. If ip is not specified then it listens only on + 6653. If host is not specified then it listens only on IPv4 (but not IPv6) addresses. The column in the table must point to a @@ -4488,16 +4487,17 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ part of Open vSwitch.
ptcp:
[port][:ip
]ptcp:
[port][:host
]
Listens for connections on the specified TCP port. If
- ip, which must be expressed as an IP address (not a
- DNS name), is specified, then connections are restricted to the
- specified local IP address (either IPv4 or IPv6). If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. ptcp:6653:[::1]
. If ip is not
- specified then it listens only on IPv4 addresses.
+ host, which can either be a DNS name (if built with
+ unbound library) or an IP address, is specified, then connections
+ are restricted to the resolved or specified local IP address
+ (either IPv4 or IPv6). If host is an IPv6 address, wrap
+ it in square brackets, e.g. ptcp:6653:[::1]
. If
+ host is not specified then it listens only on IPv4
+ addresses.
If port is not specified, it defaults to 6653. @@ -4834,12 +4834,12 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ The following connection methods are currently supported:
ssl:ip
[:port
]ssl:host
[:port
]The specified SSL port on the host at the given - ip, which must be expressed as an IP address - (not a DNS name). The host, which can either be a DNS name (if built with + unbound library) or an IP address. The column in the table must point to a valid SSL configuration when this form is used. @@ -4853,30 +4853,30 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
tcp:ip
[:port
]tcp:host
[:port
]
The specified TCP port on the host at the given
- ip, which must be expressed as an IP address (not a
- DNS name), where ip can be IPv4 or IPv6 address. If
- ip is an IPv6 address, wrap it in square brackets,
- e.g. tcp:[::1]:6640
.
+ host, which can either be a DNS name (if built with
+ unbound library) or an IP address (IPv4 or IPv6). If host
+ is an IPv6 address, wrap it in square brackets, e.g.
+ tcp:[::1]:6640
.
If port is not specified, it defaults to 6640.
pssl:
[port][:ip
]pssl:
[port][:host
]
Listens for SSL connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap in square brackets,
- e.g. pssl:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IP address (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap in square brackets,
+ e.g. pssl:6640:[::1]
. If host is not
specified then it listens only on IPv4 (but not IPv6) addresses.
The column in the table must point to a valid SSL
@@ -4890,17 +4890,17 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
part of Open vSwitch.
ptcp:
[port][:ip
]ptcp:
[port][:host
]
Listens for connections on the specified TCP port.
Specify 0 for port to have the kernel automatically
- choose an available port. If ip, which must be
- expressed as an IP address (not a DNS name), is specified, then
- connections are restricted to the specified local IP address
- (either IPv4 or IPv6 address). If ip is an IPv6
- address, wrap it in square brackets,
- e.g. ptcp:6640:[::1]
. If ip is not
+ choose an available port. If host, which can either
+ be a DNS name (if built with unbound library) or an IP address,
+ is specified, then connections are restricted to the resolved or
+ specified local IP address (either IPv4 or IPv6 address). If
+ host is an IPv6 address, wrap it in square brackets,
+ e.g. ptcp:6640:[::1]
. If host is not
specified then it listens only on IPv4 addresses.
diff --git a/vtep/vtep.xml b/vtep/vtep.xml index 62075ca882d..927efed5fa6 100644 --- a/vtep/vtep.xml +++ b/vtep/vtep.xml @@ -116,12 +116,12 @@ The following connection methods are currently supported:
ssl:ip
[:port
]ssl:host
[:port
]- The specified SSL port (default: 6640) on the host at - the given ip, which must be expressed as an IP address - (not a DNS name). + The specified SSL port (default: 6640) on the given + host, which can either be a DNS name (if built with + unbound library) or an IP address.
SSL key and certificate configuration happens outside the @@ -129,27 +129,29 @@
tcp:ip
[:port
]tcp:host
[:port
]pssl:
[port][:ip
]pssl:
[port][:host
]Listens for SSL connections on the specified TCP port - (default: 6640). If ip, which must be expressed as an - IP address (not a DNS name), is specified, then connections are - restricted to the specified local IP address. + (default: 6640). If host, which can either be a DNS + name (if built with unbound library) or an IP address, is + specified, then connections are restricted to the resolved or + specified local IP address.
ptcp:
[port][:ip
]ptcp:
[port][:host
]