Debian Codegraph @

tests/mmanon_simple_mallformed_ipv4.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # add 2022-07-28 by Andre Lorbach, released under ASL 2.0
3
4 . ${srcdir:=.}/diag.sh init
5 #export USE_VALGRIND="YES" # this test only makes sense with valgrind enabled
6 #export RS_TEST_VALGRIND_EXTRA_OPTS="--keep-debuginfo=yes"
7
8 #export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
9 #export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.debuglog"
10
11 generate_conf
12 add_conf '
13 template(name="outfmt" type="string" string="%msg%\n")
14
15 module(load="../plugins/mmanon/.libs/mmanon")
16 module(load="../plugins/imtcp/.libs/imtcp")
17 input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port" ruleset="testing")
18
19 ruleset(name="testing") {
20 action(type="mmanon" ipv4.bits="32" ipv4.mode="simple")
21 action(type="omfile" file=`echo $RSYSLOG_OUT_LOG` template="outfmt")
22 }'
23
24 startup
25 tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 165874883373.1.15599155266856607338.91@whatever
26 <129>Mar 10 01:00:00 172.20.245.8 tag: 1.165874883373.15599155266856607338.91@whatever
27 <129>Mar 10 01:00:00 172.20.245.8 tag: 15599155266856607338.165874883373.1.91@whatever
28 <129>Mar 10 01:00:00 172.20.245.8 tag: 91.165874883373.1.15599155266856607338.@whatever\""
29
30 shutdown_when_empty
31 wait_shutdown
32 export EXPECTED=' 165874883373.1.15599155266856607338.91@whatever
33 1.165874883373.15599155266856607338.91@whatever
34 15599155266856607338.165874883373.1.91@whatever
35 91.165874883373.1.15599155266856607338.@whatever'
36 cmp_exact
37 exit_test