1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2018 Oracle and/or its affiliates. 4 5TST_CNT=2 6TST_TESTFUNC="test" 7TST_MIN_KVER="4.2" 8TST_NEEDS_TMPDIR=1 9TST_TEST_DATA="tcp udp udp_lite dccp" 10 11. tst_net.sh 12 13test1() 14{ 15 local type="$2" 16 17 tst_res TINFO "test IP_BIND_ADDRESS_NO_PORT with $type socket" 18 # when using '-S' parameter, netstress sets IP_BIND_ADDRESS_NO_PORT 19 tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost) 20} 21 22test2() 23{ 24 local type="$2" 25 local rsize="65000" 26 27 [ "$type" = "dccp" ] && rsize=1300 28 29 tst_res TINFO "test bind() with $type socket and random size payload" 30 tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost) -A $rsize 31} 32 33 34tst_run 35