Skip to content

Commit

Permalink
Add plugin's name to pcap log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Jul 3, 2020
1 parent ebc2deb commit 49fbd62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 49fbd62

Please sign in to comment.