Skip to contentSkip to conversation

Patch for ULOG save

PATCH Jimmy Hedman 2 participants 2 messages Sep 13, 2002 – Sep 15, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,
i found that ULOG target doesn't get saved right when doing a iptables-save so i created a small patch for it. The problem was that it wasn't putting "'s around ulog-prefix arguments.
Patch attached is against 1.2.7a but the cvs tree seem to have the same problem.

I don't subscribe to the developer mailinglist so if you answer, please
cc: me.

// Jimmy

Patch:

libipt_ULOG.c renamed from libipt_ULOG.c.old +1 -1
@@ -157,7 +157,7 @@
 	    = (const struct ipt_ulog_info *) target->data;
 
 	if (strcmp(loginfo->prefix, "") != 0)
-		printf("--ulog-prefix %s ", loginfo->prefix);
+		printf("--ulog-prefix \"%s\" ", loginfo->prefix);
 
 	if (loginfo->nl_group != ULOG_DEFAULT_NLGROUP) {
 		printf("--ulog-nlgroup ");
Signature · 4 lines
Jimmy Hedman                       South Pole AB
Phone:  +46 8 51420420             Gelbjutarvägen 5
Fax:    +46 8 51420429             SE - 17148 Solna 
e-mail: [email protected]  www.southpole.se
libipt_ULOG.c renamed from libipt_ULOG.c.old +1 -1
@@ -157,7 +157,7 @@
 	    = (const struct ipt_ulog_info *) target->data;
 
 	if (strcmp(loginfo->prefix, "") != 0)
-		printf("--ulog-prefix %s ", loginfo->prefix);
+		printf("--ulog-prefix \"%s\" ", loginfo->prefix);
 
 	if (loginfo->nl_group != ULOG_DEFAULT_NLGROUP) {
 		printf("--ulog-nlgroup ");
#1 lore raw
Quoted 6 lines · Jimmy Hedman

Hi,
i found that ULOG target doesn't get saved right when doing a iptables-save so i created a small patch for it. The problem was that it wasn't putting "'s around ulog-prefix arguments.
Patch attached is against 1.2.7a but the cvs tree seem to have the same problem.

thanks, patch applied.

Signature · 5 lines
Live long and prosper
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)