Skip to contentSkip to conversation

arptables respect LDFLAGS

PATCH New Peter Volkov 2 participants 5 messages Sep 15, 2010 – Oct 24, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arptables respect LDFLAGS

Hi. The patch in attachment makes arptables respect LDFLAGS. Please, apply. Thank you.

Signature · 1 line
Peter.

=== modified file 'Makefile'

Makefile +1 -1
@@ -31,7 +31,7 @@
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
-	$(CC) $(CFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 $(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8
 	mkdir -p $(@D)
#1 lore raw

PATCH 1/1 arptables: some patches from debian

Hi again. What is the best way to contact arptables developers? My previous patch was left without attention, should I resend it? In attachment there are three fixes from debian:

1. arptables_save patch makes arp_tables don't resolve host names and don't convert '*' interface names to any. Remove '*' interface names.
2. manpage patch removes old version from man page
3. is a patch from Jeroen van Wolffelaar to make arptables --proto-type also accept hexadecimal inputs (ethernet protocol numbers are often specfied in hex, not decimal), using standard strtol() behaviour (hex iff starts with 0x).

Please, apply.

Signature · 1 line
Peter.

# Don't resolve host names and don't convert '*' interface names to any. # Remove '*' interface names.

arptables-save +3 -1
diff -urNad arptables-0.0.3.3~/arptables-save arptables-0.0.3.3/arptables-save
@@ -35,6 +35,8 @@
 	# Due to arptables "issues" with displaying device names
         # we need to use -v and then do some processing
 	$line =~ s/\s,\s.*//;
+	$line =~ s/-i\s\*//;
+	$line =~ s/-o\s\*//;
         $rules = $rules . "-A $chain $line\n";
     }
 
@@ -47,7 +49,7 @@
 # ========================================================
 
 unless (-x "$tool") { print "ERROR: Tool $tool isn't executable"; exit -1; };
-$table =`$tool -t filter -L -v`;
+$table =`$tool -t filter -L -v -n`;
 unless ($? == 0) { print $table; exit -1 };
 &process_table($table);
 
arptables.8 +1 -1
diff -urNad arptables-0.0.3.3~/arptables.8 arptables-0.0.3.3/arptables.8
@@ -22,7 +22,7 @@
 .\"
 .\"
 .SH NAME
-arptables (v.0.0.3-3) \- ARP table administration
+arptables \- ARP table administration
 .SH SYNOPSIS
 .BR "arptables " [ "-t table" ] " -" [ AD ] " chain rule-specification " [ options ]
 .br

# Patch from Jeroen van Wolffelaar <[email protected]> to make

# arptables --proto-type also accept hexadecimal inputs (ethernet protocol
# numbers are often specfied in hex, not decimal), using standard strtol()
# behaviour (hex iff starts with 0x).
arptables.c +1 -1
diff -urNad arptables-0.0.3.3~/arptables.c arptables-0.0.3.3/arptables.c
@@ -2039,7 +2039,7 @@
 			check_inverse(optarg, &invert, &optind, argc);
 			set_option(&options, OPT_P_TYPE, &fw.arp.invflags,
 				   invert);
-			if (get16_and_mask(argv[optind - 1], &fw.arp.arpro, &fw.arp.arpro_mask, 10)) {
+			if (get16_and_mask(argv[optind - 1], &fw.arp.arpro, &fw.arp.arpro_mask, 0)) {
 				if (strcasecmp(argv[optind-1], "ipv4"))
 					exit_error(PARAMETER_PROBLEM, "Problem with specified protocol type");
 				fw.arp.arpro = htons(0x800);
#2 lore raw

Re: [patch] arptables: some patches from debian

Hello Peter,

Patch 2 and 3 are committed.
For the '*' part of patch 1 I'd rather remove the -v usage in arptables-restore. This will require fixing the reason why -v is used in the first place. I wasn't aware this is due to a bug: the -i and -o interfaces aren't printed unless -v is specified. I'll look into this.

cheers,
Bart

Quoted 14 lines · Peter Volkov

Hi again. What is the best way to contact arptables developers? My previous patch was left without attention, should I resend it? In attachment there are three fixes from debian:

1. arptables_save patch makes arp_tables don't resolve host names and don't convert '*' interface names to any. Remove '*' interface names.
2. manpage patch removes old version from man page
3. is a patch from Jeroen van Wolffelaar to make arptables --proto-type also accept hexadecimal inputs (ethernet protocol numbers are often specfied in hex, not decimal), using standard strtol() behaviour (hex iff starts with 0x).

Please, apply.

Signature · 2 lines
Bart De Schuymer
www.artinalgorithms.be
#3 lore raw

Re: [patch] arptables: some patches from debian

Hi Bart. Thank you for review/applying patches. Could you also apply attached patch to fix not respecting LDFLAGS issue (very similar to one I've sent you long time ago for ebtables :) )

--
Peter.

В Сбт, 09/10/2010 в 21:17 +0200, Bart De Schuymer пишет:

Quoted 8 lines

Hello Peter,

Patch 2 and 3 are committed.
For the '*' part of patch 1 I'd rather remove the -v usage in arptables-restore. This will require fixing the reason why -v is used in the first place. I wasn't aware this is due to a bug: the -i and -o interfaces aren't printed unless -v is specified. I'll look into this.

Quoted 15 lines

cheers,
Bart

Quoted 11 lines · Peter Volkov

Hi again. What is the best way to contact arptables developers? My previous patch was left without attention, should I resend it? In attachment there are three fixes from debian:

1. arptables_save patch makes arp_tables don't resolve host names and don't convert '*' interface names to any. Remove '*' interface names.
2. manpage patch removes old version from man page
3. is a patch from Jeroen van Wolffelaar to make arptables --proto-type also accept hexadecimal inputs (ethernet protocol numbers are often specfied in hex, not decimal), using standard strtol() behaviour (hex iff starts with 0x).

=== modified file 'Makefile'

Makefile +1 -1
@@ -31,7 +31,7 @@
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
-	$(CC) $(CFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 $(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8
 	mkdir -p $(@D)
#4 lore raw

Re: [patch] arptables: some patches from debian

Applied.

Thanks,

Bart

Quoted 31 lines · Peter Volkov

Hi Bart. Thank you for review/applying patches. Could you also apply attached patch to fix not respecting LDFLAGS issue (very similar to one I've sent you long time ago for ebtables :) )

--
Peter.

В Сбт, 09/10/2010 в 21:17 +0200, Bart De Schuymer пишет:

Quoted 23 lines

Hello Peter,

Patch 2 and 3 are committed.
For the '*' part of patch 1 I'd rather remove the -v usage in arptables-restore. This will require fixing the reason why -v is used in the first place. I wasn't aware this is due to a bug: the -i and -o interfaces aren't printed unless -v is specified. I'll look into this.

cheers,
Bart

Quoted 11 lines · Peter Volkov

Hi again. What is the best way to contact arptables developers? My previous patch was left without attention, should I resend it? In attachment there are three fixes from debian:

1. arptables_save patch makes arp_tables don't resolve host names and don't convert '*' interface names to any. Remove '*' interface names.
2. manpage patch removes old version from man page
3. is a patch from Jeroen van Wolffelaar to make arptables --proto-type also accept hexadecimal inputs (ethernet protocol numbers are often specfied in hex, not decimal), using standard strtol() behaviour (hex iff starts with 0x).

Signature · 7 lines
Bart De Schuymer
www.artinalgorithms.be

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html