Bug 580510 - tshark returns exit code 0 in case of errors
Summary: tshark returns exit code 0 in case of errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: wireshark
Version: 5.5
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-08 12:56 UTC by Karel Srot
Modified: 2013-01-08 04:59 UTC (History)
1 user (show)

Fixed In Version: wireshark-1.0.15-2
Doc Type: Bug Fix
Doc Text:
Previously, tshark, console packet analyzer, did not properly analyze exit code of dupcap, wireshark's packet capturing backend. As result, tshark returned exit code 0 when dupcap failed to parse its command line arguments. In this update, tshark properly propagates dumpcap's exit code and returns nozero exit code when dumpcap fails.
Clone Of:
Environment:
Last Closed: 2013-01-08 04:59:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0125 0 normal SHIPPED_LIVE Moderate: wireshark security, bug fix, and enhancement update 2013-01-08 09:22:17 UTC

Description Karel Srot 2010-04-08 12:56:32 UTC
Description of problem:
tshark returns exit code 0 in case of errors


Version-Release number of selected component (if applicable):
wireshark-1.0.8-1.el5_3.1.x86_64


How reproducible:
always


Steps to Reproduce:
# tshark -f 'jkghg' -w './testout.pcap'
Running as user "root" and group "root". This could be dangerous.
Capturing on peth0
tshark: Invalid capture filter: "jkghg"!

That string isn't a valid capture filter (syntax error).
See the User's Guide for a description of the capture filter syntax.
# echo $?
0
# tshark -i 'invalid-interface'
Running as user "root" and group "root". This could be dangerous.
Capturing on invalid-interface
tshark: The capture session could not be initiated (ioctl: No such device).
Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified.
0 packets captured
# echo $?
0

  
Actual results:
tshark return exit code 0


Expected results:
tshark should return exit code 1 as it does for wrong interface index:
# tshark -i 0
tshark: There is no interface with that adapter index
# echo $?
1

Comment 3 RHEL Program Management 2011-05-31 14:29:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2012-04-02 10:35:48 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 5 Jan Safranek 2012-04-18 08:11:49 UTC
Upstream patch is in SVN rev. 33387 in 1.2 branch.

Comment 7 Jan Safranek 2012-05-29 12:57:06 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, tshark, console packet analyzer, did not properly analyze exit code of dupcap, wireshark's packet capturing backend. As result, tshark returned exit code 0 when dupcap failed to parse its command line arguments. In this update, tshark properly propagates dumpcap's exit code and returns nozero exit code when dumpcap fails.

Comment 11 errata-xmlrpc 2013-01-08 04:59:59 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-0125.html


Note You need to log in before you can comment on or make changes to this bug.