From 01f9dc87bfe191a9e1ded7a1a1d52a61bbe227bd Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 9 Dec 2022 10:27:02 -0500 Subject: small nettrace fixes --- src/fnettrace-dns/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/fnettrace-dns/main.c') 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) { type, (nxdomain)? " NXDOMAIN": ""); if (strcmp(tmp, last)) { printf("%s\n", tmp); + fflush(0); strcpy(last, tmp); } @@ -77,6 +78,7 @@ void print_dns(uint32_t ip_src, unsigned char *pkt) { errout: printf("%02d:%02d:%02d %15s Error: invalid DNS packet\n", t->tm_hour, t->tm_min, t->tm_sec, ip); + fflush(0); } // https://www.kernel.org/doc/html/latest/networking/filter.html -- cgit v1.2.3-54-g00ecf