Replace nc command with ncat

Ncat has better capabilities like SCTP which nc doesn't have.

Change-Id: I7a3a955465aa05032ead63459191167cfe3f98bd
This commit is contained in:
Jakub Libosvar 2017-01-02 09:02:07 -05:00
parent 0092198b23
commit 8f37f2d34e
3 changed files with 5 additions and 7 deletions

@ -512,7 +512,7 @@ class NetcatTester(object):
return True
def _spawn_nc_in_namespace(self, namespace, address, listen=False):
cmd = ['nc', address, self.dst_port]
cmd = ['ncat', address, self.dst_port]
if self.protocol == self.UDP:
cmd.append('-u')
if listen:

@ -11,10 +11,7 @@ ping_kill: KillFilter, root, ping, -2
# enable curl from namespace
curl_filter: RegExpFilter, /usr/bin/curl, root, curl, --max-time, \d+, -D-, http://[0-9a-z:./-]+
nc_filter: CommandFilter, nc, root
# netcat has different binaries depending on linux distribution
nc_kill: KillFilter, root, nc, -9
ncbsd_kill: KillFilter, root, nc.openbsd, -9
ncat_filter: CommandFilter, ncat, root
ncat_kill: KillFilter, root, ncat, -9
ss_filter: CommandFilter, ss, root

@ -224,11 +224,12 @@ function _install_post_devstack {
if is_ubuntu; then
install_package isc-dhcp-client
install_package netcat-openbsd
install_package nmap
elif is_fedora; then
install_package dhclient
install_package nmap-ncat
else
exit_distro_not_supported "installing dhclient package"
exit_distro_not_supported "installing dhclient and ncat packages"
fi
# Installing python-openvswitch from packages is a stop-gap while