[Swan-dev] checking for printf("%s", NULL) in kvmresults.py

Andrew Cagney andrew.cagney at gmail.com
Thu Aug 23 21:32:43 UTC 2018


I finally got around to changing the algorithm list so that it didn't,
confusingly, include '(null)'.

This means things are pretty much ready to go. Currently *.console.txt contains:

$ ./testing/utils/kvmresults.py . | grep NULL
testing/pluto/addconn-02 passed east:%NULL
testing/pluto/addconn-03 failed west:%NULL,output-different

$ grep '(null)' testing/pluto/*/OUTPUT/*.console.txt | cut -d/ -f3,5-
addconn-02/east.console.txt:conn: "test" modecfgdns=(null)
addconn-02/east.console.txt:conn: "test" modecfgdomains=(null)
addconn-02/east.console.txt:conn: "test" modecfgbanner=(null)
addconn-02/east.console.txt:conn: "test" mark=(null)
addconn-02/east.console.txt:conn: "test" mark-in=(null)
addconn-02/east.console.txt:conn: "test" mark-out=(null)
addconn-02/east.console.txt:conn: "test" vti_iface=(null)
addconn-03/west.console.txt:conn: "test" modecfgdns=(null)
addconn-03/west.console.txt:conn: "test" modecfgdomains=(null)
addconn-03/west.console.txt:conn: "test" modecfgbanner=(null)
addconn-03/west.console.txt:conn: "test" mark=(null)
addconn-03/west.console.txt:conn: "test" mark-in=(null)
addconn-03/west.console.txt:conn: "test" mark-out=(null)
addconn-03/west.console.txt:conn: "test" vti_iface=(null)

Anyone?

Looking in *.pluto.log there is:

$ grep '(null)' testing/pluto/*/OUTPUT/*.pluto.log | cut -d/ -f3,5-
ikev2-algo-esn-02/east.pluto.log:"replay" #1: IKE SA responder
matching remote ESP/AH proposals responder SA processing returned
(null)
ikev2-algo-sha2-05/east.pluto.log:"westnet-eastnet-ipv4-psk-ikev2" #1:
IKE SA responder matching remote ESP/AH proposals responder SA
processing returned (null)
ikev2-leak-01-db_v2_prop_conj/east.pluto.log:"westnet-eastnet-ipv4-psk-ikev2"
#1: IKE SA responder matching remote ESP/AH proposals responder SA
processing returned (null)

which looks like something for me to fix.
On Thu, 10 May 2018 at 10:49, Andrew Cagney <andrew.cagney at gmail.com> wrote:
>
> Pluto, on occasion, is printing NULL strings, for instance:
>
> $ grep '(null)' testing/pluto/*/OUTPUT/*.pluto.log | grep -e '|' | cut
> '-d|' -f2- | sed -e 's/#[0-9]*/#0/g' | sort -u
>  child state #0: (null)(ignore) => delete
>  I am receiving an IKEv2 Request (null)
>  In keys.c, checking OTP filename: (null)
>  next payload type: previous 'IKEv2 Encryption Payload' 'next payload
> type' matches 'IKEv2 Bogus Payload' (255:(null))
>  next payload type: previous 'IKEv2 Identification - Initiator -
> Payload' 'next payload type' matches 'IKEv2 Bogus Payload'
> (255:(null))
>  next payload type: previous 'IKEv2 Notify Payload' 'next payload
> type' matches 'IKEv2 Bogus Payload' (255:(null))
>  next payload type: previous 'ISAKMP Message' 'next payload type'
> matches 'IKEv2 Bogus Payload' (255:(null))
>  parent state #0: new => (null)(ignore)
>
> while, thanks to the printf() implementation we rely on, it is mostly
> harmless, it's something easy to detect and fix (for instance, using
> the right enum lookup function).
> The only got-ya is in the algorithm list where '(null)' is valid.
>
> I'll add detecting this as part of running the tests as a TODO.
>
> Andrew


More information about the Swan-dev mailing list