shithub: plan9front

Download patch

ref: 6285c19b3325e77c9056c369de1d64dd5132cb56
parent: 5de1f3d9cf30b0f3f96fdec267a393e7c33dc82b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Nov 3 16:21:03 EDT 2021

snoopy: adjust for new dns txt rr format

--- a/sys/src/cmd/ip/snoopy/dns.c	Wed Nov  3 16:09:02 2021
+++ b/sys/src/cmd/ip/snoopy/dns.c	Wed Nov  3 16:21:03 2021
@@ -140,7 +140,7 @@
 		break;
 	case Ttxt:
 		for(t=rr->txt; t; t=t->next)
-			m->p = seprint(m->p, m->e, " txt=%q", t->p);
+			m->p = seprint(m->p, m->e, " txt=\"%.*s\"", t->dlen, (char*)t->data);
 		break;
 	case Tnull:
 		m->p = seprint(m->p, m->e, " null=%.*H",
@@ -516,7 +516,7 @@
 	case Ttxt:
 		while(t = rp->txt){
 			rp->txt = t->next;
-			free(t->p);
+			free(t->data);
 			memset(t, 0, sizeof *t);	/* cause trouble */
 			free(t);
 		}