diff options
author | mboelen <michael@cisofy.com> | 2016-04-13 18:08:58 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2016-04-13 18:08:58 +0300 |
commit | f4a1ee8ac2da429b4e4ac1fbc77f845cdcd3c1f7 (patch) | |
tree | 560a57764ae777b565543998f804abde49ac971b /include/tests_networking | |
parent | 9a0102384f2326687d1ae6fb04a03d3b47991547 (diff) |
[NETW-3014] Test whitelisted interface in enabled profiles
Diffstat (limited to 'include/tests_networking')
-rw-r--r-- | include/tests_networking | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/tests_networking b/include/tests_networking index 5c55a6e8..c32ae1f4 100644 --- a/include/tests_networking +++ b/include/tests_networking @@ -475,8 +475,17 @@ if [ ! "${FIND}" = "" ]; then LogText "Result: Promiscuous interfaces: ${FIND}" for I in ${FIND}; do - ISWHITELISTED=`grep "^if_promisc:${I}:" ${PROFILE}` - if [ "${ISWHITELISTED}" = "" ]; then + WHITELISTED=0 + for PROFILE in ${PROFILES}; do + Debug "Checking if interface ${I} is whitelisted in profile ${PROFILE}" + ISWHITELISTED=`grep "^if_promisc:${I}:" ${PROFILE}` + if [ ! "${ISWHITELISTED}" = "" ]; then + WHITELISTED=1 + LogText "Result: this interface was whitelisted in profile (${PROFILE})" + fi + done + # Check if this interface was whitelisted + if [ ${WHITELISTED} -eq 0 ]; then FOUNDPROMISC=1 ReportWarning ${TEST_NO} "H" "Found promiscuous interface (${I})" LogText "Note: some tools put an interface into promiscuous mode, to capture/log network traffic" |