New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment fault when open port failed #64

Closed
GoogleCodeExporter opened this Issue Jul 2, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Jul 2, 2015

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:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 2, 2015

Yes, this is a bug. 

I appreciate your investigating the cause of the segfault and sending a patch 
for the same - Thank You! I'll apply it to the tree shortly.

Original comment by pstav...@gmail.com on 7 Mar 2012 at 1:53

  • Changed state: Accepted

GoogleCodeExporter commented Jul 2, 2015

Yes, this is a bug. 

I appreciate your investigating the cause of the segfault and sending a patch 
for the same - Thank You! I'll apply it to the tree shortly.

Original comment by pstav...@gmail.com on 7 Mar 2012 at 1:53

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 2, 2015

This issue was closed by revision 8c8344aac8eb.

Original comment by pstav...@gmail.com on 7 Mar 2012 at 1:55

  • Changed state: Fixed

GoogleCodeExporter commented Jul 2, 2015

This issue was closed by revision 8c8344aac8eb.

Original comment by pstav...@gmail.com on 7 Mar 2012 at 1:55

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 2, 2015

Issue 65 has been merged into this issue.

Original comment by pstav...@gmail.com on 9 Mar 2012 at 2:00

GoogleCodeExporter commented Jul 2, 2015

Issue 65 has been merged into this issue.

Original comment by pstav...@gmail.com on 9 Mar 2012 at 2:00

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jul 2, 2015

Issue 65 has been merged into this issue.

Original comment by pstav...@gmail.com on 18 May 2014 at 5:31

GoogleCodeExporter commented Jul 2, 2015

Issue 65 has been merged into this issue.

Original comment by pstav...@gmail.com on 18 May 2014 at 5:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment