Thread (12 messages) 12 messages, 2 authors, 2009-07-28

Re: [RFC][PATCH 5/5] libxt_ipvs: user space lib for netfilter matcher xt_ipvs

From: Jan Engelhardt <hidden>
Date: 2009-07-27 18:40:26
Also in: lkml, lvs-devel, netfilter-devel

On Monday 2009-07-27 15:48, Hannes Eder wrote:
+
+	switch (c) {
+	case '0': /* --ipvs */
+		/* Nothing to do here. */
		Then why add it?
+	char buf[BUFSIZ];
+
+	if (family == NFPROTO_IPV4) {
+		if (!numeric && addr->ip == 0) {
+			printf("anywhere ");
+			return;
+		}
+		if (numeric)
+			strcpy(buf, xtables_ipaddr_to_numeric(&addr->in));
+		else
+			strcpy(buf, xtables_ipaddr_to_anyname(&addr->in));
+		strcat(buf, xtables_ipmask_to_numeric(&mask->in));
+		printf("%s ", buf);
There is no need to use the strcpy/strcat hacks. Just directly printf it.
quoted hunk ↗ jump to hunk
--- /dev/null
+++ b/extensions/libxt_ipvs.man
@@ -0,0 +1,7 @@
+ipvs tests where the packet was modified by IPVS, i.e. is the
+skb_buff->ipvs_property set.
+.TP
+[\fB!\fP] \fB--ipvs
+Does the packet have to IPVS property?
+
+TODO: Write proper documentation.
Yes.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help