source: clfs-embedded/patches/iptables-1.3.7-do_multi-1.patch @ 0e9e889

Last change on this file since 0e9e889 was 751a25a, checked in by Jim Gifford <clfs@…>, 17 years ago

Fixed IPTables DO_MULTI Patch

  • Property mode set to 100644
File size: 2.5 KB
  • iptables-1.3.7

    Submitted By: Jim Gifford <jciccone@linuxfromscratch.org>
    Date: 2007-02-05
    Initial Package Version: 1.3.7
    Origin: http://lists.netfilter.org/pipermail/netfilter-devel/2006-December/026344.html
    Upstream Status: Already Applied
    Description: Fixes Build Issues with DO_MULTI=1
    
    diff -Naur iptables-1.3.7.orig/Makefile iptables-1.3.7/Makefile
    old new  
    170170        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
    171171
    172172ifeq ($(DO_MULTI), 1)
    173 $(DESTDIR)$(BINDIR)/iptables-xml: iptables-xml
     173$(DESTDIR)$(BINDIR)/iptables-xml: iptables
    174174        @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
    175175        ln -sf $< $@
    176176else
  • iptables-multi.c

    diff -Naur iptables-1.3.7.orig/iptables-multi.c iptables-1.3.7/iptables-multi.c
    old new  
    66int iptables_main(int argc, char **argv);
    77int iptables_save_main(int argc, char **argv);
    88int iptables_restore_main(int argc, char **argv);
     9int iptables_xml_main(int argc, char **argv);
    910
    1011int main(int argc, char **argv) {
    1112  char *progname;
     
    2425   
    2526    if (!strcmp(progname, "iptables-restore"))
    2627      return iptables_restore_main(argc, argv);
     28    if (!strcmp(progname, "iptables-xml"))
     29      return iptables_restore_main(argc, argv);
    2730   
    2831    fprintf(stderr, "iptables multi-purpose version: unknown applet name %s\n", progname);
    2932    exit(1);
  • iptables-xml.c

    diff -Naur iptables-1.3.7.orig/iptables-xml.c iptables-1.3.7/iptables-xml.c
    old new  
    2626/* no need to link with iptables.o */
    2727const char *program_name;
    2828const char *program_version;
    29 int line = 0;
    3029
     30#ifndef IPTABLES_MULTI
     31int line = 0;
    3132void
    3233exit_error(enum exittype status, char *msg, ...)
    3334{
     
    4142        /* On error paths, make sure that we don't leak memory */
    4243        exit(status);
    4344}
     45#endif
    4446
    4547static void print_usage(const char *name, const char *version)
    4648            __attribute__ ((noreturn));
     
    6668        exit(1);
    6769}
    6870
    69 int
     71static int
    7072parse_counters(char *string, struct ipt_counters *ctr)
    7173{
    7274        if (string != NULL)
     
    605607
    606608#ifdef IPTABLES_MULTI
    607609int
    608 iptables_restore_main(int argc, char *argv[])
     610iptables_xml_main(int argc, char *argv[])
    609611#else
    610612int
    611613main(int argc, char *argv[])
Note: See TracBrowser for help on using the repository browser.