Description of problem:
ss returns zero (ok) when invalid option is added.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
# ss --blabla && echo "OK" || echo "FAIL"
ss: unrecognized option '--blabla'
Program returns zero.
Program returns non-zero.
Bug is consistent with upstream, patch sent:
The following upstream commit needs to be backported:
Author: Phil Sutter <firstname.lastname@example.org>
Date: Thu Oct 15 21:01:16 2015 +0200
ss: return -1 if an unrecognized option was given
When getopt_long encounters an option which has not been registered, it
returns '?'. React upon that and call usage() instead of help() so ss
returns with a non-zero exit status.
Signed-off-by: Phil Sutter <email@example.com>
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.