aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace-dns/main.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2022-12-09 10:27:02 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2022-12-09 10:27:02 -0500
commit01f9dc87bfe191a9e1ded7a1a1d52a61bbe227bd (patch)
treef2e07d56ecb48edfb8b3c34acb938ed4e690f54a /src/fnettrace-dns/main.c
parentMerge pull request #5504 from kmk3/build-cflags-improvements (diff)
downloadfirejail-01f9dc87bfe191a9e1ded7a1a1d52a61bbe227bd.tar.gz
firejail-01f9dc87bfe191a9e1ded7a1a1d52a61bbe227bd.tar.zst
firejail-01f9dc87bfe191a9e1ded7a1a1d52a61bbe227bd.zip
small nettrace fixes
Diffstat (limited to 'src/fnettrace-dns/main.c')
-rw-r--r--src/fnettrace-dns/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fnettrace-dns/main.c b/src/fnettrace-dns/main.c
index 32122754f..48bf14710 100644
--- a/src/fnettrace-dns/main.c
+++ b/src/fnettrace-dns/main.c
@@ -70,6 +70,7 @@ void print_dns(uint32_t ip_src, unsigned char *pkt) {
70 type, (nxdomain)? " NXDOMAIN": ""); 70 type, (nxdomain)? " NXDOMAIN": "");
71 if (strcmp(tmp, last)) { 71 if (strcmp(tmp, last)) {
72 printf("%s\n", tmp); 72 printf("%s\n", tmp);
73 fflush(0);
73 strcpy(last, tmp); 74 strcpy(last, tmp);
74 } 75 }
75 76
@@ -77,6 +78,7 @@ void print_dns(uint32_t ip_src, unsigned char *pkt) {
77 78
78errout: 79errout:
79 printf("%02d:%02d:%02d %15s Error: invalid DNS packet\n", t->tm_hour, t->tm_min, t->tm_sec, ip); 80 printf("%02d:%02d:%02d %15s Error: invalid DNS packet\n", t->tm_hour, t->tm_min, t->tm_sec, ip);
81 fflush(0);
80} 82}
81 83
82// https://www.kernel.org/doc/html/latest/networking/filter.html 84// https://www.kernel.org/doc/html/latest/networking/filter.html