Pull openwrt packages tcpdump and libpcap to the latest upstream versions.
Especially MCS rate information printed by tcpdump is fixed by this.

Signed-off-by: Thomas Huehn <tho...@net.t-labs.tu-berlin.de>
---
 package/libs/libpcap/Makefile                      |    4 +-
 .../libpcap/patches/100-debian_shared_lib.patch    |   44 +--
 .../patches/102-makefile_disable_manpages.patch    |   77 +++--
 .../patches/103-makefile_flex_workaround.patch     |   10 +-
 .../libpcap/patches/201-space_optimization.patch   |   26 +-
 .../libs/libpcap/patches/202-protocol_api.patch    |   80 ++---
 .../patches/203-undef_iw_mode_monitor.patch        |    8 +-
 package/network/utils/tcpdump/Makefile             |    6 +-
 .../tcpdump/patches/001-remove_pcap_debug.patch    |    8 +-
 .../patches/002-remove_static_libpcap_check.patch  |   44 ++-
 .../utils/tcpdump/patches/004-fix_3g_iface.patch   |   22 +-
 .../utils/tcpdump/patches/100-tcpdump_mini.patch   |  325 +++++++++++++-------
 12 files changed, 389 insertions(+), 265 deletions(-)

diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile
index 24b07c9..347b180 100644
--- a/package/libs/libpcap/Makefile
+++ b/package/libs/libpcap/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpcap
-PKG_VERSION:=1.3.0
+PKG_VERSION:=1.5.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.tcpdump.org/release/
-PKG_MD5SUM:=f78455a92622b7a3c05c58b6ad1cec7e
+PKG_MD5SUM:=7e7321fb3aff2f2bb05c8229f3795d4a
 
 PKG_MAINTAINER:=Felix Fietkau <n...@openwrt.org>
 
diff --git a/package/libs/libpcap/patches/100-debian_shared_lib.patch 
b/package/libs/libpcap/patches/100-debian_shared_lib.patch
index 30cb10a..3785180 100644
--- a/package/libs/libpcap/patches/100-debian_shared_lib.patch
+++ b/package/libs/libpcap/patches/100-debian_shared_lib.patch
@@ -1,8 +1,10 @@
 Debian-specific modifications to the upstream Makefile.in to
 build a shared library.
 
---- a/Makefile.in
-+++ b/Makefile.in
+Index: libpcap-1.5.3/Makefile.in
+===================================================================
+--- libpcap-1.5.3.orig/Makefile.in     2013-12-03 16:11:53.000000000 +0100
++++ libpcap-1.5.3/Makefile.in  2014-02-04 13:03:56.880939714 +0100
 @@ -40,6 +40,14 @@
  srcdir = @srcdir@
  VPATH = @srcdir@
@@ -18,7 +20,7 @@ build a shared library.
  #
  # You shouldn't need to edit anything below.
  #
-@@ -60,7 +68,8 @@
+@@ -63,7 +71,8 @@
  PROG=libpcap
  
  # Standard CFLAGS
@@ -28,7 +30,7 @@ build a shared library.
  
  INSTALL = @INSTALL@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -80,7 +89,11 @@
+@@ -83,7 +92,11 @@
  # problem if you don't own the file but can write to the directory.
  .c.o:
        @rm -f $@
@@ -39,9 +41,9 @@ build a shared library.
 +      @rm -f $@
 +      $(CC) -fPIC $(FULL_CFLAGS) -c -o $@ $(srcdir)/$*.c
  
- PSRC =        pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ 
@CANUSB_SRC@
+ PSRC =        pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ 
@CANUSB_SRC@ @DBUS_SRC@
  FSRC =  fad-@V_FINDALLDEVS@.c
-@@ -96,6 +109,7 @@
+@@ -99,6 +112,7 @@
  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
  # hack the extra indirection
  OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) 
$(LIBOBJS)
@@ -49,7 +51,7 @@ build a shared library.
  PUBHDR = \
        pcap.h \
        pcap-bpf.h \
-@@ -148,7 +162,7 @@
+@@ -153,7 +167,7 @@
  
  CLEANFILES = $(OBJ) libpcap.* $(TESTS) \
        $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
@@ -58,7 +60,7 @@ build a shared library.
  
  MAN1 = pcap-config.1
  
-@@ -352,7 +366,7 @@
+@@ -363,7 +377,7 @@
        $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
        $(RANLIB) $@
  
@@ -67,7 +69,7 @@ build a shared library.
  
  libpcap.so: $(OBJ)
        @rm -f $@
-@@ -430,6 +444,13 @@
+@@ -441,6 +455,13 @@
  #
  libpcap.none:
  
@@ -81,7 +83,7 @@ build a shared library.
  scanner.c: $(srcdir)/scanner.l
        @rm -f $@
        $(srcdir)/runlex.sh $(LEX) -o$@ $<
-@@ -437,6 +458,9 @@
+@@ -448,6 +469,9 @@
  scanner.o: scanner.c tokdefs.h
        $(CC) $(FULL_CFLAGS) -c scanner.c
  
@@ -91,7 +93,7 @@ build a shared library.
  pcap.o: version.h
  
  tokdefs.h: grammar.c
-@@ -450,9 +474,16 @@
+@@ -461,9 +485,16 @@
        @rm -f $@
        $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
  
@@ -108,7 +110,7 @@ build a shared library.
  snprintf.o: $(srcdir)/missing/snprintf.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
  
-@@ -490,6 +521,9 @@
+@@ -501,6 +532,9 @@
  bpf_filter.o: bpf_filter.c
        $(CC) $(FULL_CFLAGS) -c bpf_filter.c
  
@@ -118,7 +120,7 @@ build a shared library.
  #
  # Generate the pcap-config script.
  #
-@@ -607,11 +641,9 @@
+@@ -618,11 +652,9 @@
  install-shared-so: libpcap.so
        [ -d $(DESTDIR)$(libdir) ] || \
            (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
@@ -133,9 +135,11 @@ build a shared library.
  install-shared-dylib: libpcap.dylib
        [ -d $(DESTDIR)$(libdir) ] || \
            (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -262,7 +262,7 @@
+Index: libpcap-1.5.3/aclocal.m4
+===================================================================
+--- libpcap-1.5.3.orig/aclocal.m4      2013-11-08 00:23:22.000000000 +0100
++++ libpcap-1.5.3/aclocal.m4   2014-02-04 13:03:56.880939714 +0100
+@@ -440,7 +440,7 @@
                        esac
                        ;;
                    esac
@@ -144,7 +148,7 @@ build a shared library.
                    V_SONAME_OPT="-Wl,-soname,"
                    V_RPATH_OPT="-Wl,-rpath,"
                    ;;
-@@ -325,7 +325,7 @@
+@@ -503,7 +503,7 @@
                    #
                    # "cc" is GCC.
                    #
@@ -153,8 +157,10 @@ build a shared library.
                    V_SHLIB_CMD="\$(CC)"
                    V_SHLIB_OPT="-shared"
                    V_SONAME_OPT="-Wl,-soname,"
---- a/pcap-config.in
-+++ b/pcap-config.in
+Index: libpcap-1.5.3/pcap-config.in
+===================================================================
+--- libpcap-1.5.3.orig/pcap-config.in  2013-11-08 00:23:22.000000000 +0100
++++ libpcap-1.5.3/pcap-config.in       2014-02-04 13:03:56.880939714 +0100
 @@ -36,16 +36,6 @@
        esac
        shift
diff --git a/package/libs/libpcap/patches/102-makefile_disable_manpages.patch 
b/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
index 50ea221..94e9937 100644
--- a/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
+++ b/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
@@ -1,6 +1,8 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -571,71 +571,12 @@ install: install-shared install-archive
+Index: libpcap-1.5.3/Makefile.in
+===================================================================
+--- libpcap-1.5.3.orig/Makefile.in     2014-02-04 13:03:56.000000000 +0100
++++ libpcap-1.5.3/Makefile.in  2014-02-04 13:08:19.753985094 +0100
+@@ -585,68 +585,12 @@
            (mkdir -p $(DESTDIR)$(includedir); chmod 755 
$(DESTDIR)$(includedir))
        [ -d $(DESTDIR)$(includedir)/pcap ] || \
            (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 
$(DESTDIR)$(includedir)/pcap)
@@ -27,42 +29,39 @@
 -      for i in $(MAN3PCAP_EXPAND:.in=); do \
 -              $(INSTALL_DATA) $$i \
 -                  $(DESTDIR)$(mandir)/man3/$$i; done
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
--      rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
--      ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
--               $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
+-      (cd $(DESTDIR)$(mandir)/man3 && \
+-      rm -f pcap_datalink_val_to_description.3pcap && \
+-      $(LN_S) pcap_datalink_val_to_name.3pcap \
+-               pcap_datalink_val_to_description.3pcap && \
+-      rm -f pcap_dump_fopen.3pcap && \
+-      $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
+-      rm -f pcap_freealldevs.3pcap && \
+-      $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
+-      rm -f pcap_perror.3pcap && \
+-      $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \
+-      rm -f pcap_sendpacket.3pcap && \
+-      $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \
+-      rm -f pcap_free_datalinks.3pcap && \
+-      $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
+-      rm -f pcap_free_tstamp_types.3pcap && \
+-      $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
+-      rm -f pcap_dispatch.3pcap && \
+-      $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \
+-      rm -f pcap_minor_version.3pcap && \
+-      $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \
+-      rm -f pcap_next.3pcap && \
+-      $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \
+-      rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
+-      $(LN_S) pcap_open_dead.3pcap \
+-               pcap_open_dead_with_tstamp_precision.3pcap && \
+-      rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
+-      $(LN_S) pcap_open_offline.3pcap 
pcap_open_offline_with_tstamp_precision.3pcap && \
+-      rm -f pcap_fopen_offline.3pcap && \
+-      $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
+-      rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
+-      $(LN_S) pcap_open_offline.3pcap 
pcap_fopen_offline_with_tstamp_precision.3pcap && \
+-      rm -f pcap_getnonblock.3pcap && \
+-      $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
 -      for i in $(MANFILE); do \
 -              $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
 -                  $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 
's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
diff --git a/package/libs/libpcap/patches/103-makefile_flex_workaround.patch 
b/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
index a90e0ce..7de3ae6 100644
--- a/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
+++ b/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
@@ -1,10 +1,12 @@
 
        Copyright (C) 2006 Markus Wigge
 
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -56,7 +56,7 @@ LD = /usr/bin/ld
- CC = @CC@
+Index: libpcap-1.5.3/Makefile.in
+===================================================================
+--- libpcap-1.5.3.orig/Makefile.in     2014-02-04 13:08:19.753985094 +0100
++++ libpcap-1.5.3/Makefile.in  2014-02-04 13:08:24.710076962 +0100
+@@ -59,7 +59,7 @@
+ MKDEP = @MKDEP@
  CCOPT = @V_CCOPT@
  INCLS = -I. @V_INCLS@
 -DEFS = @DEFS@ @V_DEFS@
diff --git a/package/libs/libpcap/patches/201-space_optimization.patch 
b/package/libs/libpcap/patches/201-space_optimization.patch
index f3eec4c..21334e3 100644
--- a/package/libs/libpcap/patches/201-space_optimization.patch
+++ b/package/libs/libpcap/patches/201-space_optimization.patch
@@ -1,6 +1,8 @@
---- a/gencode.c
-+++ b/gencode.c
-@@ -491,20 +491,6 @@ pcap_compile_nopcap(int snaplen_arg, int
+Index: libpcap-1.5.3/gencode.c
+===================================================================
+--- libpcap-1.5.3.orig/gencode.c       2013-11-20 15:52:26.000000000 +0100
++++ libpcap-1.5.3/gencode.c    2014-02-04 13:08:30.550189435 +0100
+@@ -511,20 +511,6 @@
  }
  
  /*
@@ -21,9 +23,11 @@
   * Backpatch the blocks in 'list' to 'target'.  The 'sense' field indicates
   * which of the jt and jf fields has been resolved and which is a pointer
   * back to another unresolved block (or nil).  At least one of the fields
---- a/pcap.c
-+++ b/pcap.c
-@@ -748,6 +748,59 @@ static const u_char charmap[] = {
+Index: libpcap-1.5.3/pcap.c
+===================================================================
+--- libpcap-1.5.3.orig/pcap.c  2014-01-14 21:40:35.000000000 +0100
++++ libpcap-1.5.3/pcap.c       2014-02-04 13:08:30.550189435 +0100
+@@ -1075,6 +1075,59 @@
        (u_char)'\374', (u_char)'\375', (u_char)'\376', (u_char)'\377',
  };
  
@@ -83,9 +87,11 @@
  int
  pcap_strcasecmp(const char *s1, const char *s2)
  {
---- a/optimize.c
-+++ b/optimize.c
-@@ -2292,45 +2292,6 @@ icode_to_fcode(root, lenp)
+Index: libpcap-1.5.3/optimize.c
+===================================================================
+--- libpcap-1.5.3.orig/optimize.c      2013-11-08 00:23:22.000000000 +0100
++++ libpcap-1.5.3/optimize.c   2014-02-04 13:08:30.550189435 +0100
+@@ -2193,45 +2193,6 @@
        return fp;
  }
  
@@ -130,4 +136,4 @@
 -
  #ifdef BDEBUG
  static void
- opt_dump(root)
+ opt_dump(struct block *root)
diff --git a/package/libs/libpcap/patches/202-protocol_api.patch 
b/package/libs/libpcap/patches/202-protocol_api.patch
index fabbac7..e58b0c0 100644
--- a/package/libs/libpcap/patches/202-protocol_api.patch
+++ b/package/libs/libpcap/patches/202-protocol_api.patch
@@ -1,16 +1,8 @@
---- a/pcap-int.h
-+++ b/pcap-int.h
-@@ -209,6 +209,7 @@ struct pcap_opt {
-       char    *source;
-       int     promisc;
-       int     rfmon;
-+      int     proto;      /* protocol for packet socket (linux) */
-       int     tstamp_type;
- };
- 
---- a/pcap-linux.c
-+++ b/pcap-linux.c
-@@ -363,7 +363,7 @@ static int iface_get_id(int fd, const ch
+Index: libpcap-1.5.3/pcap-linux.c
+===================================================================
+--- libpcap-1.5.3.orig/pcap-linux.c    2014-01-14 21:40:35.000000000 +0100
++++ libpcap-1.5.3/pcap-linux.c 2014-02-04 13:52:06.135953435 +0100
+@@ -380,7 +380,7 @@
  static int    iface_get_mtu(int fd, const char *device, char *ebuf);
  static int    iface_get_arptype(int fd, const char *device, char *ebuf);
  #ifdef HAVE_PF_PACKET_SOCKETS
@@ -19,7 +11,7 @@
  #ifdef IW_MODE_MONITOR
  static int    has_wext(int sock_fd, const char *device, char *ebuf);
  #endif /* IW_MODE_MONITOR */
-@@ -980,7 +980,7 @@ pcap_can_set_rfmon_linux(pcap_t *handle)
+@@ -963,7 +963,7 @@
         * (We assume that if we have Wireless Extensions support
         * we also have PF_PACKET support.)
         */
@@ -28,7 +20,7 @@
        if (sock_fd == -1) {
                (void)snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
                    "socket: %s", pcap_strerror(errno));
-@@ -1266,6 +1266,9 @@ pcap_activate_linux(pcap_t *handle)
+@@ -1251,6 +1251,9 @@
        handle->read_op = pcap_read_linux;
        handle->stats_op = pcap_stats_linux;
  
@@ -38,7 +30,7 @@
        /*
         * The "any" device is a special device which causes us not
         * to bind to a particular device and thus to look at all
-@@ -2897,8 +2900,8 @@ activate_new(pcap_t *handle)
+@@ -3012,8 +3015,8 @@
         * try a SOCK_RAW socket for the raw interface.
         */
        sock_fd = is_any_device ?
@@ -49,7 +41,7 @@
  
        if (sock_fd == -1) {
                if (errno == EINVAL || errno == EAFNOSUPPORT) {
-@@ -3015,7 +3018,7 @@ activate_new(pcap_t *handle)
+@@ -3130,7 +3133,7 @@
                                return PCAP_ERROR;
                        }
                        sock_fd = socket(PF_PACKET, SOCK_DGRAM,
@@ -58,16 +50,16 @@
                        if (sock_fd == -1) {
                                snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
                                    "socket: %s", pcap_strerror(errno));
-@@ -3078,7 +3081,7 @@ activate_new(pcap_t *handle)
+@@ -3193,7 +3196,7 @@
                }
  
-               if ((err = iface_bind(sock_fd, handle->md.ifindex,
+               if ((err = iface_bind(sock_fd, handlep->ifindex,
 -                  handle->errbuf)) != 1) {
 +                  handle->errbuf, handle->opt.proto)) != 1) {
                        close(sock_fd);
                        if (err < 0)
                                return err;
-@@ -4149,7 +4152,7 @@ iface_get_id(int fd, const char *device,
+@@ -4667,7 +4670,7 @@
   *  or a PCAP_ERROR_ value on a hard error.
   */
  static int
@@ -76,7 +68,7 @@
  {
        struct sockaddr_ll      sll;
        int                     err;
-@@ -4158,7 +4161,7 @@ iface_bind(int fd, int ifindex, char *eb
+@@ -4676,7 +4679,7 @@
        memset(&sll, 0, sizeof(sll));
        sll.sll_family          = AF_PACKET;
        sll.sll_ifindex         = ifindex;
@@ -85,7 +77,7 @@
  
        if (bind(fd, (struct sockaddr *) &sll, sizeof(sll)) == -1) {
                if (errno == ENETDOWN) {
-@@ -5040,7 +5043,7 @@ activate_old(pcap_t *handle)
+@@ -5561,7 +5564,7 @@
  
        /* Open the socket */
  
@@ -94,17 +86,19 @@
        if (handle->fd == -1) {
                snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
                         "socket: %s", pcap_strerror(errno));
---- a/pcap.c
-+++ b/pcap.c
-@@ -309,6 +309,7 @@ pcap_create_common(const char *source, c
-       pcap_set_snaplen(p, 65535);     /* max packet size */
+Index: libpcap-1.5.3/pcap.c
+===================================================================
+--- libpcap-1.5.3.orig/pcap.c  2014-02-04 13:08:30.000000000 +0100
++++ libpcap-1.5.3/pcap.c       2014-02-04 13:13:56.268423892 +0100
+@@ -556,6 +556,7 @@
        p->opt.promisc = 0;
-       p->opt.buffer_size = 0;
+       p->opt.rfmon = 0;
+       p->opt.immediate = 0;
 +      p->opt.proto = -1;
        p->opt.tstamp_type = -1;        /* default to not setting time stamp 
type */
+       p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
        return (p);
- }
-@@ -405,6 +406,15 @@ pcap_set_buffer_size(pcap_t *p, int buff
+@@ -713,6 +714,15 @@
  }
  
  int
@@ -120,9 +114,11 @@
  pcap_activate(pcap_t *p)
  {
        int status;
---- a/pcap/pcap.h
-+++ b/pcap/pcap.h
-@@ -68,6 +68,7 @@ extern "C" {
+Index: libpcap-1.5.3/pcap/pcap.h
+===================================================================
+--- libpcap-1.5.3.orig/pcap/pcap.h     2013-11-08 00:23:22.000000000 +0100
++++ libpcap-1.5.3/pcap/pcap.h  2014-02-04 13:15:11.173846460 +0100
+@@ -68,6 +68,7 @@
  #define PCAP_VERSION_MINOR 4
  
  #define PCAP_ERRBUF_SIZE 256
@@ -130,11 +126,23 @@
  
  /*
   * Compatibility for systems that have a bpf.h that
-@@ -280,6 +281,7 @@ int        pcap_set_rfmon(pcap_t *, int);
- int   pcap_set_timeout(pcap_t *, int);
+@@ -283,6 +284,7 @@
  int   pcap_set_tstamp_type(pcap_t *, int);
+ int   pcap_set_immediate_mode(pcap_t *, int);
  int   pcap_set_buffer_size(pcap_t *, int);
 +int   pcap_set_protocol(pcap_t *, unsigned short);
+ int   pcap_set_tstamp_precision(pcap_t *, int);
+ int   pcap_get_tstamp_precision(pcap_t *);
  int   pcap_activate(pcap_t *);
- 
- int   pcap_list_tstamp_types(pcap_t *, int **);
+Index: libpcap-1.5.3/pcap-int.h
+===================================================================
+--- libpcap-1.5.3.orig/pcap-int.h      2014-01-14 21:40:35.000000000 +0100
++++ libpcap-1.5.3/pcap-int.h   2014-02-04 14:48:45.292642825 +0100
+@@ -88,6 +88,7 @@
+       char    *source;
+       int     timeout;        /* timeout for buffering */
+       int     buffer_size;
++      int     proto;      /* protocol for packet socket (linux) */
+       int     promisc;
+       int     rfmon;          /* monitor mode */
+       int     immediate;      /* immediate mode - deliver packets as soon as 
they arrive */
diff --git a/package/libs/libpcap/patches/203-undef_iw_mode_monitor.patch 
b/package/libs/libpcap/patches/203-undef_iw_mode_monitor.patch
index 508c659..7588dc8 100644
--- a/package/libs/libpcap/patches/203-undef_iw_mode_monitor.patch
+++ b/package/libs/libpcap/patches/203-undef_iw_mode_monitor.patch
@@ -1,6 +1,8 @@
---- a/pcap-linux.c
-+++ b/pcap-linux.c
-@@ -254,6 +254,8 @@ static const char rcsid[] _U_ =
+Index: libpcap-1.5.3/pcap-linux.c
+===================================================================
+--- libpcap-1.5.3.orig/pcap-linux.c    2014-02-04 13:12:11.306419963 +0100
++++ libpcap-1.5.3/pcap-linux.c 2014-02-04 13:15:22.962068890 +0100
+@@ -249,6 +249,8 @@
  typedef int           socklen_t;
  #endif
  
diff --git a/package/network/utils/tcpdump/Makefile 
b/package/network/utils/tcpdump/Makefile
index b32d25f..b221e2d 100644
--- a/package/network/utils/tcpdump/Makefile
+++ b/package/network/utils/tcpdump/Makefile
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tcpdump
-PKG_VERSION:=4.2.1
-PKG_RELEASE:=3
+PKG_VERSION:=4.5.1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \
        http://ftp.gwdg.de/pub/misc/tcpdump/ \
        http://www.at.tcpdump.org/ \
        http://www.br.tcpdump.org/
-PKG_MD5SUM:=c202878c6db054767b52651041b9e60e
+PKG_MD5SUM:=973a2513d0076e34aa9da7e15ed98e1b
 
 
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_PARALLEL:=1
diff --git a/package/network/utils/tcpdump/patches/001-remove_pcap_debug.patch 
b/package/network/utils/tcpdump/patches/001-remove_pcap_debug.patch
index 14d1b84..37bdcdd 100644
--- a/package/network/utils/tcpdump/patches/001-remove_pcap_debug.patch
+++ b/package/network/utils/tcpdump/patches/001-remove_pcap_debug.patch
@@ -1,6 +1,8 @@
---- a/tcpdump.c
-+++ b/tcpdump.c
-@@ -982,20 +982,6 @@ main(int argc, char **argv)
+Index: tcpdump-4.5.1/tcpdump.c
+===================================================================
+--- tcpdump-4.5.1.orig/tcpdump.c       2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/tcpdump.c    2014-02-04 13:16:08.118925959 +0100
+@@ -1095,20 +1095,6 @@
                                error("invalid data link type %s", 
gndo->ndo_dltname);
                        break;
  
diff --git 
a/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch 
b/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch
index 8ab54aa..5fbff5a 100644
--- 
a/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch
+++ 
b/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch
@@ -1,11 +1,13 @@
---- a/configure
-+++ b/configure
-@@ -7130,28 +7130,6 @@ echo "${ECHO_T}Using $pfopen" >&6; }
+Index: tcpdump-4.5.1/configure
+===================================================================
+--- tcpdump-4.5.1.orig/configure       2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/configure    2014-02-04 13:23:39.247494600 +0100
+@@ -5813,28 +5813,6 @@
                    LIBS="$LIBS $pfopen"
            fi
      fi
--    { echo "$as_me:$LINENO: checking for local pcap library" >&5
--echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; }
+-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" 
>&5
+-$as_echo_n "checking for local pcap library... " >&6; }
 -    libpcap=FAIL
 -    lastdir=FAIL
 -    places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
@@ -23,23 +25,21 @@
 -                          fi
 -    done
 -    if test $libpcap = FAIL ; then
--          { echo "$as_me:$LINENO: result: not found" >&5
--echo "${ECHO_T}not found" >&6; }
+-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+-$as_echo "not found" >&6; }
 -
            #
            # Look for pcap-config.
            #
-@@ -7335,45 +7313,6 @@ if test $ac_cv_lib_pcap_main = yes; then
+@@ -5989,41 +5967,6 @@
    libpcap="-lpcap"
  fi
  
 -              if test $libpcap = FAIL ; then
--                  { { echo "$as_me:$LINENO: error: see the INSTALL doc for 
more info" >&5
--echo "$as_me: error: see the INSTALL doc for more info" >&2;}
--   { (exit 1); exit 1; }; }
+-                  as_fn_error $? "see the INSTALL doc for more info" 
"$LINENO" 5
 -              fi
--                                                                              
                                                                                
                                                                                
                                                                                
{ echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5
--echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" 
>&6; }
+-                                                                              
                                                                                
                                                                                
                                                                                
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header 
directories" >&5
+-$as_echo_n "checking for extraneous pcap header directories... " >&6; }
 -              if test \( ! -r /usr/local/include/pcap.h \) -a \
 -                      \( ! -r /usr/include/pcap.h \); then
 -                  if test -r /usr/local/include/pcap/pcap.h; then
@@ -49,12 +49,12 @@
 -                  fi
 -              fi
 -              if test -z "$d" ; then
--                  { echo "$as_me:$LINENO: result: not found" >&5
--echo "${ECHO_T}not found" >&6; }
+-                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" 
>&5
+-$as_echo "not found" >&6; }
 -              else
 -                  V_INCLS="-I$d $V_INCLS"
--                  { echo "$as_me:$LINENO: result: found -- -I$d added" >&5
--echo "${ECHO_T}found -- -I$d added" >&6; }
+-                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- 
-I$d added" >&5
+-$as_echo "found -- -I$d added" >&6; }
 -              fi
 -          fi
 -    else
@@ -66,12 +66,10 @@
 -          elif test -r $places/pcap.h; then
 -                  V_INCLS="-I$places $V_INCLS"
 -          else
--                    { { echo "$as_me:$LINENO: error: cannot find pcap.h" >&5
--echo "$as_me: error: cannot find pcap.h" >&2;}
--   { (exit see INSTALL); exit see INSTALL; }; }
+-                    as_fn_error see INSTALL "cannot find pcap.h" "$LINENO" 5
 -          fi
--          { echo "$as_me:$LINENO: result: $libpcap" >&5
--echo "${ECHO_T}$libpcap" >&6; }
+-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
+-$as_echo "$libpcap" >&6; }
            # Extract the first word of "pcap-config", so it can be a program 
name with args.
  set dummy pcap-config; ac_word=$2
- { echo "$as_me:$LINENO: checking for $ac_word" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
diff --git a/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch 
b/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch
index 35d105f..e451e28 100644
--- a/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch
+++ b/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch
@@ -1,6 +1,8 @@
---- a/tcpdump.c
-+++ b/tcpdump.c
-@@ -66,6 +66,7 @@ extern int SIZE_BUF;
+Index: tcpdump-4.5.1/tcpdump.c
+===================================================================
+--- tcpdump-4.5.1.orig/tcpdump.c       2014-02-04 13:16:08.000000000 +0100
++++ tcpdump-4.5.1/tcpdump.c    2014-02-04 13:35:57.721530227 +0100
+@@ -66,6 +66,7 @@
  #include <stdlib.h>
  #include <string.h>
  #include <limits.h>
@@ -8,21 +10,11 @@
  #ifndef WIN32
  #include <sys/wait.h>
  #include <sys/resource.h>
-@@ -625,6 +626,7 @@ main(int argc, char **argv)
+@@ -709,6 +710,7 @@
  #ifdef HAVE_PCAP_FINDALLDEVS
        pcap_if_t *devpointer;
        int devnum;
 +      char *devp;
  #endif
        int status;
- #ifdef WIN32
-@@ -775,7 +777,8 @@ main(int argc, char **argv)
-                        * It can be useful on Windows, where more than
-                        * one interface can have the same name.
-                        */
--                      if ((devnum = atoi(optarg)) != 0) {
-+                      for (devp = optarg; *devp && isdigit(*devp); devp++);
-+                      if ((!*devp || isspace(*devp)) && (devnum = 
atoi(optarg)) != 0) {
-                               if (devnum < 0)
-                                       error("Invalid adapter index");
- 
+       FILE *VFile;
diff --git a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch 
b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch
index 1d114b6..52d4809 100644
--- a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch
+++ b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch
@@ -1,6 +1,8 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -68,6 +68,22 @@ RANLIB = @RANLIB@
+Index: tcpdump-4.5.1/Makefile.in
+===================================================================
+--- tcpdump-4.5.1.orig/Makefile.in     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/Makefile.in  2014-02-04 13:36:13.653834590 +0100
+@@ -71,6 +71,22 @@
        @rm -f $@
        $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
  
@@ -23,7 +25,7 @@
  CSRC =        addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c 
ipproto.c \
          nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \
        print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \
-@@ -99,6 +115,8 @@ LIBNETDISSECT_SRC=print-isakmp.c
+@@ -103,6 +119,8 @@
  LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
  LIBNETDISSECT=libnetdissect.a
  
@@ -32,7 +34,7 @@
  LOCALSRC = @LOCALSRC@
  GENSRC = version.c
  LIBOBJS = @LIBOBJS@
-@@ -361,10 +379,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@
+@@ -286,10 +304,12 @@
        @rm -f $@
        $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  
@@ -45,9 +47,11 @@
  
  datalinks.o: $(srcdir)/missing/datalinks.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
---- a/addrtoname.c
-+++ b/addrtoname.c
-@@ -547,10 +547,10 @@ linkaddr_string(const u_char *ep, const 
+Index: tcpdump-4.5.1/addrtoname.c
+===================================================================
+--- tcpdump-4.5.1.orig/addrtoname.c    2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/addrtoname.c 2014-02-04 13:36:13.653834590 +0100
+@@ -556,10 +556,10 @@
  
        if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN)
                return (etheraddr_string(ep));
@@ -60,7 +64,7 @@
        tp = lookup_bytestring(ep, len);
        if (tp->e_name)
                return (tp->e_name);
-@@ -1150,6 +1150,7 @@ init_addrtoname(u_int32_t localnet, u_in
+@@ -1159,6 +1159,7 @@
        init_ipxsaparray();
  }
  
@@ -68,7 +72,7 @@
  const char *
  dnaddr_string(u_short dnaddr)
  {
-@@ -1169,6 +1170,7 @@ dnaddr_string(u_short dnaddr)
+@@ -1178,6 +1179,7 @@
  
        return(tp->name);
  }
@@ -76,9 +80,11 @@
  
  /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
  struct hnamemem *
---- a/print-ether.c
-+++ b/print-ether.c
-@@ -338,6 +338,7 @@ ethertype_print(netdissect_options *ndo,
+Index: tcpdump-4.5.1/print-ether.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-ether.c   2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-ether.c        2014-02-04 15:14:54.490483194 +0100
+@@ -342,6 +342,7 @@
                arp_print(ndo, p, length, caplen);
                return (1);
  
@@ -86,7 +92,7 @@
        case ETHERTYPE_DN:
                decnet_print(/*ndo,*/p, length, caplen);
                return (1);
-@@ -356,10 +357,13 @@ ethertype_print(netdissect_options *ndo,
+@@ -360,10 +361,13 @@
                ND_PRINT((ndo, "(NOV-ETHII) "));
                ipx_print(/*ndo,*/p, length);
                return (1);
@@ -100,7 +106,7 @@
  
        case ETHERTYPE_PPPOED:
        case ETHERTYPE_PPPOES:
-@@ -372,9 +376,11 @@ ethertype_print(netdissect_options *ndo,
+@@ -376,9 +380,11 @@
                eap_print(ndo, p, length);
                return (1);
  
@@ -112,7 +118,7 @@
  
        case ETHERTYPE_PPP:
                if (length) {
-@@ -383,6 +389,7 @@ ethertype_print(netdissect_options *ndo,
+@@ -387,6 +393,7 @@
                }
                return (1);
  
@@ -120,7 +126,7 @@
        case ETHERTYPE_MPCP:
                mpcp_print(/*ndo,*/p, length);
                return (1);
-@@ -395,7 +402,7 @@ ethertype_print(netdissect_options *ndo,
+@@ -399,7 +406,7 @@
        case ETHERTYPE_CFM_OLD:
                cfm_print(/*ndo,*/p, length);
                return (1);
@@ -129,7 +135,7 @@
        case ETHERTYPE_LLDP:
                lldp_print(/*ndo,*/p, length);
                return (1);
-@@ -403,10 +410,12 @@ ethertype_print(netdissect_options *ndo,
+@@ -407,6 +414,7 @@
          case ETHERTYPE_LOOPBACK:
                  return (1);
  
@@ -137,14 +143,19 @@
        case ETHERTYPE_MPLS:
        case ETHERTYPE_MPLS_MULTI:
                mpls_print(/*ndo,*/p, length);
-               return (1);
+@@ -428,6 +436,7 @@
+         case ETHERTYPE_CALM_FAST:
+                 calm_fast_print(ndo, p-14, p, length);
+                 return (1);
 +#endif
  
        case ETHERTYPE_LAT:
        case ETHERTYPE_SCA:
---- a/print-gre.c
-+++ b/print-gre.c
-@@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int leng
+Index: tcpdump-4.5.1/print-gre.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-gre.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-gre.c  2014-02-04 13:36:13.653834590 +0100
+@@ -213,6 +213,7 @@
                ip6_print(gndo, bp, len);
                break;
  #endif
@@ -152,7 +163,7 @@
        case ETHERTYPE_MPLS:
                mpls_print(bp, len);
                break;
-@@ -228,6 +229,7 @@ gre_print_0(const u_char *bp, u_int leng
+@@ -228,6 +229,7 @@
        case ETHERTYPE_TEB:
                ether_print(gndo, bp, len, len, NULL, NULL);
                break;
@@ -160,9 +171,11 @@
        default:
                printf("gre-proto-0x%x", prot);
        }
---- a/print-igmp.c
-+++ b/print-igmp.c
-@@ -305,6 +305,7 @@ igmp_print(register const u_char *bp, re
+Index: tcpdump-4.5.1/print-igmp.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-igmp.c    2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-igmp.c 2014-02-04 13:36:13.653834590 +0100
+@@ -309,6 +309,7 @@
          TCHECK2(bp[4], 4);
          (void)printf("igmp leave %s", ipaddr_string(&bp[4]));
          break;
@@ -170,7 +183,7 @@
      case 0x13:
          (void)printf("igmp dvmrp");
          if (len < 8)
-@@ -316,6 +317,7 @@ igmp_print(register const u_char *bp, re
+@@ -320,6 +321,7 @@
          (void)printf("igmp pimv1");
          pimv1_print(bp, len);
          break;
@@ -178,9 +191,11 @@
      case 0x1e:
          print_mresp(bp, len);
          break;
---- a/print-ip.c
-+++ b/print-ip.c
-@@ -328,6 +328,7 @@ ip_print_demux(netdissect_options *ndo,
+Index: tcpdump-4.5.1/print-ip.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-ip.c      2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-ip.c   2014-02-04 13:41:15.143571328 +0100
+@@ -328,6 +328,7 @@
  again:
        switch (ipds->nh) {
  
@@ -188,7 +203,7 @@
        case IPPROTO_AH:
                ipds->nh = *ipds->cp;
                ipds->advance = ah_print(ipds->cp);
-@@ -362,14 +363,16 @@ again:
+@@ -362,15 +363,15 @@
                ipds->nh = enh & 0xff;
                goto again;
        }
@@ -197,33 +212,35 @@
        case IPPROTO_SCTP:
                sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
                break;
- 
+-
 +#ifndef TCPDUMP_MINI
        case IPPROTO_DCCP:
                dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
                break;
+-
 +#endif
-               
        case IPPROTO_TCP:
                /* pass on the MF bit plus the offset to detect fragments */
-@@ -389,6 +392,7 @@ again:
+               tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
+@@ -388,7 +389,7 @@
+               icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
                           ipds->off & (IP_MF|IP_OFFMASK));
                break;
-               
+-
 +#ifndef TCPDUMP_MINI
        case IPPROTO_PIGP:
                /*
                 * XXX - the current IANA protocol number assignments
-@@ -409,15 +413,16 @@ again:
+@@ -409,15 +410,15 @@
        case IPPROTO_EIGRP:
                eigrp_print(ipds->cp, ipds->len);
                break;
--              
+-
 +#endif
        case IPPROTO_ND:
                ND_PRINT((ndo, " nd %d", ipds->len));
                break;
- 
+-
 +#ifndef TCPDUMP_MINI
        case IPPROTO_EGP:
                egp_print(ipds->cp, ipds->len);
@@ -233,7 +250,7 @@
        case IPPROTO_OSPF:
                ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
                break;
-@@ -451,10 +456,10 @@ again:
+@@ -451,10 +452,10 @@
                gre_print(ipds->cp, ipds->len);
                break;
  
@@ -245,18 +262,20 @@
        case IPPROTO_PIM:
                vec[0].ptr = ipds->cp;
                vec[0].len = ipds->len;
-@@ -480,7 +485,7 @@ again:
+@@ -480,7 +481,7 @@
        case IPPROTO_PGM:
                pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
                break;
 -
 +#endif
        default:
-               if ((proto = getprotobynumber(ipds->nh)) != NULL)
+               if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) 
!= NULL)
                        ND_PRINT((ndo, " %s", proto->p_name));
---- a/print-ip6.c
-+++ b/print-ip6.c
-@@ -192,9 +192,11 @@ ip6_print(netdissect_options *ndo, const
+Index: tcpdump-4.5.1/print-ip6.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-ip6.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-ip6.c  2014-02-04 13:36:13.653834590 +0100
+@@ -192,9 +192,11 @@
                case IPPROTO_SCTP:
                        sctp_print(cp, (const u_char *)ip6, len);
                        return;
@@ -268,7 +287,7 @@
                case IPPROTO_TCP:
                        tcp_print(cp, len, (const u_char *)ip6, fragmented);
                        return;
-@@ -204,6 +206,7 @@ ip6_print(netdissect_options *ndo, const
+@@ -204,6 +206,7 @@
                case IPPROTO_ICMPV6:
                        icmp6_print(ndo, cp, len, (const u_char *)ip6, 
fragmented);
                        return;
@@ -276,7 +295,7 @@
                case IPPROTO_AH:
                        advance = ah_print(cp);
                        nh = *cp;
-@@ -228,7 +231,7 @@ ip6_print(netdissect_options *ndo, const
+@@ -228,7 +231,7 @@
                        pim_print(cp, len, nextproto6_cksum(ip6, cp, len,
                                                            IPPROTO_PIM));
                        return;
@@ -285,7 +304,7 @@
                case IPPROTO_OSPF:
                        ospf6_print(cp, len);
                        return;
-@@ -240,11 +243,11 @@ ip6_print(netdissect_options *ndo, const
+@@ -240,11 +243,11 @@
                case IPPROTO_IPV4:
                        ip_print(ndo, cp, len);
                        return;
@@ -299,9 +318,11 @@
                case IPPROTO_GRE:
                        gre_print(cp, len);
                        return;
---- a/print-llc.c
-+++ b/print-llc.c
-@@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length,
+Index: tcpdump-4.5.1/print-llc.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-llc.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-llc.c  2014-02-04 13:36:13.653834590 +0100
+@@ -196,7 +196,7 @@
                control = EXTRACT_LE_16BITS(p + 2);
                is_u = 0;
        }
@@ -310,7 +331,7 @@
        if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) {
                /*
                 * This is an Ethernet_802.3 IPX frame; it has an
-@@ -218,6 +218,7 @@ llc_print(const u_char *p, u_int length,
+@@ -219,6 +219,7 @@
              ipx_print(p, length);
              return (1);
        }
@@ -318,7 +339,7 @@
  
        dsap = dsap_field & ~LLC_IG;
        ssap = ssap_field & ~LLC_GSAP;
-@@ -250,6 +251,7 @@ llc_print(const u_char *p, u_int length,
+@@ -251,6 +252,7 @@
                return (1);
        }
  
@@ -326,7 +347,7 @@
        if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX &&
            control == LLC_UI) {
                /*
-@@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length,
+@@ -266,6 +268,7 @@
                ipx_print(p+3, length-3);
                return (1);
        }
@@ -334,7 +355,7 @@
  
  #ifdef TCPDUMP_DO_SMB
        if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI
-@@ -296,11 +299,13 @@ llc_print(const u_char *p, u_int length,
+@@ -297,11 +300,13 @@
                return (1);
        }
  #endif
@@ -348,7 +369,7 @@
  
        if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP
            && control == LLC_UI) {
-@@ -443,6 +448,7 @@ snap_print(const u_char *p, u_int length
+@@ -444,6 +449,7 @@
                  case PID_CISCO_CDP:
                          cdp_print(p, length, caplen);
                          return (1);
@@ -356,15 +377,15 @@
                  case PID_CISCO_DTP:
                          dtp_print(p, length); 
                          return (1);
-@@ -452,6 +458,7 @@ snap_print(const u_char *p, u_int length
+@@ -453,6 +459,7 @@
                  case PID_CISCO_VTP:
                          vtp_print(p, length);
                          return (1);
 +#endif
                  case PID_CISCO_PVST:
+                 case PID_CISCO_VLANBRIDGE:
                          stp_print(p, length);
-                         return (1);
-@@ -482,6 +489,7 @@ snap_print(const u_char *p, u_int length
+@@ -484,6 +491,7 @@
                        ether_print(gndo, p, length, caplen, NULL, NULL);
                        return (1);
  
@@ -372,7 +393,7 @@
                case PID_RFC2684_802_5_FCS:
                case PID_RFC2684_802_5_NOFCS:
                        /*
-@@ -523,6 +531,7 @@ snap_print(const u_char *p, u_int length
+@@ -525,6 +533,7 @@
                         */
                        fddi_print(p, length, caplen);
                        return (1);
@@ -380,9 +401,11 @@
  
                case PID_RFC2684_BPDU:
                        stp_print(p, length);
---- a/print-null.c
-+++ b/print-null.c
-@@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr *
+Index: tcpdump-4.5.1/print-null.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-null.c    2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-null.c 2014-02-04 13:36:13.653834590 +0100
+@@ -128,7 +128,7 @@
                ip6_print(gndo, p, length);
                break;
  #endif
@@ -391,7 +414,7 @@
        case BSD_AFNUM_ISO:
                isoclns_print(p, length, caplen);
                break;
-@@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr *
+@@ -140,7 +140,7 @@
        case BSD_AFNUM_IPX:
                ipx_print(p, length);
                break;
@@ -400,9 +423,11 @@
        default:
                /* unknown AF_ value */
                if (!eflag)
---- a/print-ppp.c
-+++ b/print-ppp.c
-@@ -1262,7 +1262,7 @@ trunc:
+Index: tcpdump-4.5.1/print-ppp.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-ppp.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-ppp.c  2014-02-04 13:36:13.653834590 +0100
+@@ -1262,7 +1262,7 @@
        return 0;
  }
  
@@ -411,7 +436,7 @@
  static void
  ppp_hdlc(const u_char *p, int length)
  {
-@@ -1327,17 +1327,19 @@ cleanup:
+@@ -1327,17 +1327,19 @@
        free(b);
          return;
  }
@@ -432,7 +457,7 @@
        switch (proto) {
        case PPP_LCP: /* fall through */
        case PPP_IPCP:
-@@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p,
+@@ -1371,6 +1373,7 @@
                ip6_print(gndo, p, length);
                break;
  #endif
@@ -440,7 +465,7 @@
        case ETHERTYPE_IPX:     /*XXX*/
        case PPP_IPX:
                ipx_print(p, length);
-@@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p,
+@@ -1382,6 +1385,7 @@
        case PPP_MPLS_MCAST:
                mpls_print(p, length);
                break;
@@ -448,7 +473,7 @@
        case PPP_COMP:
                printf("compressed PPP data");
                break;
-@@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h
+@@ -1520,6 +1524,7 @@
        return (0);
  }
  
@@ -456,7 +481,7 @@
  /*
   * PPP I/F printer to use if we know that RFC 1662-style PPP in HDLC-like
   * framing, or Cisco PPP with HDLC framing as per section 4.3.1 of RFC 1547,
-@@ -1747,7 +1752,7 @@ printx:
+@@ -1747,7 +1752,7 @@
  #endif /* __bsdi__ */
        return (hdrlength);
  }
@@ -465,20 +490,61 @@
  
  /*
   * Local Variables:
---- a/print-tcp.c
-+++ b/print-tcp.c
-@@ -652,8 +652,10 @@ tcp_print(register const u_char *bp, reg
+Index: tcpdump-4.5.1/print-tcp.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-tcp.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-tcp.c  2014-02-04 15:28:58.718568470 +0100
+@@ -573,14 +573,14 @@
+                                         utoval >>= 1;
+                                 (void)printf(" %u", utoval);
+                                 break;
+-
++#ifndef TCPDUMP_MINI
+                         case TCPOPT_MPTCP:
+                                 datalen = len - 2;
+                                 LENCHECK(datalen);
+                                 if (!mptcp_print(cp-2, len, flags))
+                                         goto bad;
+                                 break;
+-
++#endif
+                         case TCPOPT_EXPERIMENT2:
+                                 datalen = len - 2;
+                                 LENCHECK(datalen);
+@@ -659,8 +659,8 @@
+         if ((flags & TH_RST) && vflag) {
+                 print_tcp_rst_data(bp, length);
+                 return;
+-        } 
+-
++        }
++#ifndef TCPDUMP_MINI
+         if (packettype) {
+                 switch (packettype) {
+                 case PT_ZMTP1:
+@@ -669,7 +669,7 @@
+                 }
+                 return;
+         }
+-
++#endif
+         if (sport == TELNET_PORT || dport == TELNET_PORT) {
+                 if (!qflag && vflag)
+                         telnet_print(bp, length);
+@@ -683,10 +683,12 @@
        else if (sport == SMB_PORT || dport == SMB_PORT)
                smb_tcp_print(bp, length);
  #endif
 +#ifndef TCPDUMP_MINI
          else if (sport == BEEP_PORT || dport == BEEP_PORT)
                  beep_print(bp, length);
+         else if (sport == OPENFLOW_PORT || dport == OPENFLOW_PORT)
+                 openflow_print(bp, length);
 +#endif
          else if (length > 2 &&
                   (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
                    sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) {
-@@ -662,6 +664,7 @@ tcp_print(register const u_char *bp, reg
+@@ -695,6 +697,7 @@
                   * XXX packet could be unaligned, it can go strange
                   */
                  ns_print(bp + 2, length - 2, 0);
@@ -486,17 +552,19 @@
          } else if (sport == MSDP_PORT || dport == MSDP_PORT) {
                  msdp_print(bp, length);
          } else if (sport == RPKI_RTR_PORT || dport == RPKI_RTR_PORT) {
-@@ -669,6 +672,7 @@ tcp_print(register const u_char *bp, reg
+@@ -702,6 +705,7 @@
          }
          else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
                  ldp_print(bp, length);
 +#endif
          }
- 
-         return;
---- a/print-udp.c
-+++ b/print-udp.c
-@@ -418,11 +418,12 @@ udp_print(register const u_char *bp, u_i
+         else if ((sport == NFS_PORT || dport == NFS_PORT) &&
+                  length >= 4 && TTEST2(*bp, 4)) {
+Index: tcpdump-4.5.1/print-udp.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-udp.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-udp.c  2014-02-04 15:34:52.137309292 +0100
+@@ -418,11 +418,12 @@
                        vat_print((void *)(up + 1), up);
                        break;
  
@@ -510,7 +578,7 @@
                case PT_RPC:
                        rp = (struct sunrpc_msg *)(up + 1);
                        direction = (enum 
sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
-@@ -450,11 +451,12 @@ udp_print(register const u_char *bp, u_i
+@@ -450,11 +451,12 @@
                        snmp_print((const u_char *)(up + 1), length);
                        break;
  
@@ -524,7 +592,23 @@
                case PT_TFTP:
                        udpipaddr_print(ip, sport, dport);
                        tftp_print(cp, length);
-@@ -497,6 +499,7 @@ udp_print(register const u_char *bp, u_i
+@@ -475,6 +477,7 @@
+                       radius_print(cp, length);
+                       break;
+ 
++#ifndef TCPDUMP_MINI
+               case PT_VXLAN:
+                       udpipaddr_print(ip, sport, dport);
+                       vxlan_print((const u_char *)(up + 1), length);
+@@ -489,6 +492,7 @@
+                       udpipaddr_print(ip, sport, dport);
+                       lmp_print(cp, length);
+                       break;
++#endif
+               }
+               return;
+       }
+@@ -517,6 +521,7 @@
                        }
  #endif
                }
@@ -532,7 +616,7 @@
                if (TTEST(((struct LAP *)cp)->type) &&
                    ((struct LAP *)cp)->type == lapDDP &&
                    (atalk_port(sport) || atalk_port(dport))) {
-@@ -505,6 +508,7 @@ udp_print(register const u_char *bp, u_i
+@@ -525,6 +530,7 @@
                        llap_print(cp, length);
                        return;
                }
@@ -540,7 +624,7 @@
        }
        udpipaddr_print(ip, sport, dport);
  
-@@ -555,14 +559,18 @@ udp_print(register const u_char *bp, u_i
+@@ -575,14 +581,18 @@
                        ns_print((const u_char *)(up + 1), length, 0);
                else if (ISPORT(MULTICASTDNS_PORT))
                        ns_print((const u_char *)(up + 1), length, 1);
@@ -559,7 +643,7 @@
                else if (ISPORT(AODV_PORT))
                        aodv_print((const u_char *)(up + 1), length,
  #ifdef INET6
-@@ -570,6 +578,7 @@ udp_print(register const u_char *bp, u_i
+@@ -590,6 +600,7 @@
  #else
                            0);
  #endif
@@ -567,7 +651,7 @@
                else if (ISPORT(ISAKMP_PORT))
                         isakmp_print(gndo, (const u_char *)(up + 1), length, 
bp2);
                else if (ISPORT(ISAKMP_PORT_NATT))
-@@ -578,12 +587,15 @@ udp_print(register const u_char *bp, u_i
+@@ -598,12 +609,15 @@
                else if (ISPORT(ISAKMP_PORT_USER1) || ISPORT(ISAKMP_PORT_USER2))
                        isakmp_print(gndo, (const u_char *)(up + 1), length, 
bp2);
  #endif
@@ -583,15 +667,15 @@
                else if (ISPORT(L2TP_PORT))
                        l2tp_print((const u_char *)(up + 1), length);
  #ifdef TCPDUMP_DO_SMB
-@@ -594,6 +606,7 @@ udp_print(register const u_char *bp, u_i
+@@ -614,6 +628,7 @@
  #endif
-               else if (dport == 3456)
+               else if (dport == VAT_PORT)
                        vat_print((const void *)(up + 1), up);
 +#ifndef TCPDUMP_MINI
                else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
                        zephyr_print((const void *)(up + 1), length);
                /*
-@@ -604,6 +617,7 @@ udp_print(register const u_char *bp, u_i
+@@ -624,6 +639,7 @@
                         (dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH))
                        rx_print((const void *)(up + 1), length, sport, dport,
                                 (u_char *) ip);
@@ -599,12 +683,12 @@
  #ifdef INET6
                else if (ISPORT(RIPNG_PORT))
                        ripng_print((const u_char *)(up + 1), length);
-@@ -615,21 +629,25 @@ udp_print(register const u_char *bp, u_i
+@@ -635,21 +651,25 @@
                /*
                 * Kludge in test for whiteboard packets.
                 */
 +#ifndef TCPDUMP_MINI
-               else if (dport == 4567)
+               else if (dport == WB_PORT)
                        wb_print((const void *)(up + 1), length);
                else if (ISPORT(CISCO_AUTORP_PORT))
                        cisco_autorp_print((const void *)(up + 1), length);
@@ -625,7 +709,7 @@
                else if (ISPORT(OLSR_PORT))
                        olsr_print((const u_char *)(up + 1), length,
  #if INET6
-@@ -637,6 +655,7 @@ udp_print(register const u_char *bp, u_i
+@@ -657,6 +677,7 @@
  #else
                                        0);
  #endif
@@ -633,7 +717,7 @@
                else if (ISPORT(MPLS_LSP_PING_PORT))
                        lspping_print((const u_char *)(up + 1), length);
                else if (dport == BFD_CONTROL_PORT ||
-@@ -654,6 +673,7 @@ udp_print(register const u_char *bp, u_i
+@@ -674,14 +695,17 @@
                          lwapp_control_print((const u_char *)(up + 1), length, 
0);
                  else if (ISPORT(LWAPP_DATA_PORT))
                          lwapp_data_print((const u_char *)(up + 1), length);
@@ -641,9 +725,21 @@
                  else if (ISPORT(SIP_PORT))
                        sip_print((const u_char *)(up + 1), length);
                  else if (ISPORT(SYSLOG_PORT))
---- a/tcpdump.c
-+++ b/tcpdump.c
-@@ -148,6 +148,7 @@ struct ndo_printer {
+                       syslog_print((const u_char *)(up + 1), length);
++#ifndef TCPDUMP_MINI
+                 else if (ISPORT(OTV_PORT))
+                       otv_print((const u_char *)(up + 1), length);
+                 else if (ISPORT(VXLAN_PORT))
+                       vxlan_print((const u_char *)(up + 1), length);
++#endif
+               else
+                       (void)printf("UDP, length %u",
+                           (u_int32_t)(ulen - sizeof(*up)));
+Index: tcpdump-4.5.1/tcpdump.c
+===================================================================
+--- tcpdump-4.5.1.orig/tcpdump.c       2014-02-04 13:35:57.000000000 +0100
++++ tcpdump-4.5.1/tcpdump.c    2014-02-04 15:09:51.160712800 +0100
+@@ -161,6 +161,7 @@
  
  
  static struct printer printers[] = {
@@ -651,7 +747,7 @@
        { arcnet_if_print,      DLT_ARCNET },
  #ifdef DLT_ARCNET_LINUX
        { arcnet_linux_if_print, DLT_ARCNET_LINUX },
-@@ -166,19 +167,23 @@ static struct printer printers[] = {
+@@ -179,19 +180,23 @@
  #ifdef DLT_SLIP_BSDOS
        { sl_bsdos_if_print,    DLT_SLIP_BSDOS },
  #endif
@@ -675,7 +771,7 @@
        { atm_if_print,         DLT_ATM_RFC1483 },
  #ifdef DLT_C_HDLC
        { chdlc_if_print,       DLT_C_HDLC },
-@@ -189,6 +194,7 @@ static struct printer printers[] = {
+@@ -202,6 +207,7 @@
  #ifdef DLT_PPP_SERIAL
        { ppp_hdlc_if_print,    DLT_PPP_SERIAL },
  #endif
@@ -683,7 +779,7 @@
  #ifdef DLT_PPP_ETHER
        { pppoe_if_print,       DLT_PPP_ETHER },
  #endif
-@@ -198,6 +204,7 @@ static struct printer printers[] = {
+@@ -211,6 +217,7 @@
  #ifdef DLT_IEEE802_11
        { ieee802_11_if_print,  DLT_IEEE802_11},
  #endif
@@ -691,7 +787,7 @@
  #ifdef DLT_LTALK
        { ltalk_if_print,       DLT_LTALK },
  #endif
-@@ -216,12 +223,14 @@ static struct printer printers[] = {
+@@ -229,12 +236,14 @@
  #ifdef DLT_IP_OVER_FC
        { ipfc_if_print,        DLT_IP_OVER_FC },
  #endif
@@ -706,7 +802,7 @@
  #ifdef DLT_ENC
        { enc_if_print,         DLT_ENC },
  #endif
-@@ -231,9 +240,11 @@ static struct printer printers[] = {
+@@ -244,9 +253,11 @@
  #ifdef DLT_APPLE_IP_OVER_IEEE1394
        { ap1394_if_print,      DLT_APPLE_IP_OVER_IEEE1394 },
  #endif
@@ -718,7 +814,7 @@
  #ifdef DLT_JUNIPER_ATM1
        { juniper_atm1_print,   DLT_JUNIPER_ATM1 },
  #endif
-@@ -299,6 +310,7 @@ static struct printer printers[] = {
+@@ -312,6 +323,7 @@
  #ifdef DLT_IPV6
        { raw_if_print,         DLT_IPV6 },
  #endif
@@ -726,7 +822,7 @@
        { NULL,                 0 },
  };
  
-@@ -307,6 +319,7 @@ static struct ndo_printer ndo_printers[]
+@@ -320,6 +332,7 @@
  #ifdef DLT_IPNET
        { ipnet_if_print,       DLT_IPNET },
  #endif
@@ -734,7 +830,7 @@
  #ifdef DLT_IEEE802_15_4
        { ieee802_15_4_if_print, DLT_IEEE802_15_4 },
  #endif
-@@ -316,6 +329,7 @@ static struct ndo_printer ndo_printers[]
+@@ -329,15 +342,18 @@
  #ifdef DLT_PPI
        { ppi_if_print,         DLT_PPI },
  #endif
@@ -742,9 +838,22 @@
  #ifdef DLT_NETANALYZER
        { netanalyzer_if_print, DLT_NETANALYZER },
  #endif
---- a/print-sll.c
-+++ b/print-sll.c
-@@ -154,14 +154,14 @@ recurse:
+ #ifdef DLT_NETANALYZER_TRANSPARENT
+       { netanalyzer_transparent_if_print, DLT_NETANALYZER_TRANSPARENT },
+ #endif
++#ifndef TCPDUMP_MINI
+ #ifdef DLT_NFLOG
+       { nflog_if_print,       DLT_NFLOG},
+ #endif
++#endif
+       { NULL,                 0 },
+ };
+ 
+Index: tcpdump-4.5.1/print-sll.c
+===================================================================
+--- tcpdump-4.5.1.orig/print-sll.c     2013-11-08 00:22:54.000000000 +0100
++++ tcpdump-4.5.1/print-sll.c  2014-02-04 13:36:13.653834590 +0100
+@@ -154,14 +154,14 @@
                 * Yes - what type is it?
                 */
                switch (ether_type) {
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to