Skip to content
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

Add plugin's name to pcap log messages #540

Merged
merged 1 commit into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add extended environmental variables info to greenbone-nvt-sync help text. [#488](https://github.com/greenbone/openvas/pull/488)
- Extend nasl functions which generate results with optional "uri" parameter [#526](https://github.com/greenbone/openvas/pull/526)
- Add nasl function to get the host kb index. [#530](https://github.com/greenbone/openvas/pull/530)
- Print the filter used by pcap in the error message.[#537](https://github.com/greenbone/openvas/pull/537)
- Print the filter used by pcap in the error message.
[#537](https://github.com/greenbone/openvas/pull/537)
[#540](https://github.com/greenbone/openvas/pull/540)

### Changed
- The logging of the NASL internal regexp functions was extended to include the pattern in case of a failed regcomp(). [#397](https://github.com/greenbone/openvas/pull/397)
Expand Down
4 changes: 3 additions & 1 deletion misc/bpf_share.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* Eventually it needs to be analysed whether this makes sense
* or can further be simplified. */

#include "../nasl/nasl_debug.h" /* for nasl_*_filename */

#include <gvm/base/logging.h>
#include <pcap.h>

Expand All @@ -41,7 +43,7 @@ void
print_pcap_error (pcap_t *p, char *prefix)
{
char *msg = pcap_geterr (p);
g_message ("%s : %s", prefix, msg);
g_message ("[%s] %s : %s", nasl_get_plugin_filename () ?: "", prefix, msg);
}

/**
Expand Down