Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Segment fault when open port failed #64

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1.when drone open NFLOG (Linux netfilter log interface) failed, segment fault 
occur.

What version and revision of the product are you using (available in the
About dialog)? On what operating system?
ostinato version is 0.5, OS is arch linux, libpcap verison is 1.2.1


Please provide any additional information below.

in source file 'server/pcapport.cpp, Line 196',
when drone failed to open port, handle_ is set to NULL
in source file 'server/linuxport.cpp, Line 43,44', monitorRX_ & monitorTX_ is 
deleted. so 'PcapPort::PortMonitor::~PortMonitor()' be called, and execute 
'pcap_close(handle_)'. This is the cause of segment fault occur.

I change file 'server/pcapport.cpp, Line 255', from
    pcap_close(handle_);
to
    if (handle_ != NULL)
        pcap_close(handle_);

Now it worked. Is this a bug?

Attachmemt is patch file.

Original issue reported on code.google.com by printf...@gmail.com on 3 Mar 2012 at 5:59

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions