Skip to contentSkip to conversation

Fix XML output (with new libnetfilter_conntrack API)

PATCH Applied Victor Stinner 2 participants 2 messages Dec 28, 2006 – Dec 29, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I found a little mistake in new libnetfilter_conntrack API, in snprintf() code with XML output. I attached a patch to fix it.

Victor Stinner
http://www.inl.fr/

conntrack/snprintf_xml.c +2 -2
Index: src/conntrack/snprintf_xml.c
===================================================================
@@ -321,10 +321,10 @@
 			ret = snprintf(buf, len, "<flow type=\"new\">");
 			break;
 		case NFCT_T_UPDATE:
-			ret = snprintf(buf, len, "<flow type=\"update\"");
+			ret = snprintf(buf, len, "<flow type=\"update\">");
 			break;
 		case NFCT_T_DESTROY:
-			ret = snprintf(buf, len, "<flow type=\"destroy\"");
+			ret = snprintf(buf, len, "<flow type=\"destroy\">");
 			break;
 		default:
 			ret = snprintf(buf, len, "<flow>");
maintainer Applied
#1 lore raw
Quoted 2 lines · Victor Stinner

I found a little mistake in new libnetfilter_conntrack API, in snprintf() code with XML output. I attached a patch to fix it.

Applied, thanks.

BTW, if you were familiar with XML stuff, I'd like to hear a second opinion on the current layout.

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris