Skip to content
Snippets Groups Projects
  1. Feb 28, 2021
    • Tony Ambardar's avatar
      iproute2: update to 5.11.0 · b048a305
      Tony Ambardar authored
      The latest iproute2 version brings various improvements and fixes:
      https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/?qt=range&q=v5.10.0..v5.11.0
      
      
      
      In particular, ip and tc now use libbpf as the standard way to load BPF
      programs, rather than the old, limited custom loader. This allows more
      consistent and featureful BPF program handling e.g. support for global
      initialized variables.
      
      Also fix a longstanding problem with iproute2 builds where unneeded DSO
      dependencies are added to most utilities, bloating their installation
      footprint. From research and testing, explicitly using a "--as-needed"
      linker flag avoids the issue. Update accordingly and drop extra package
      dependencies from Makefile.
      
      Additional build and packaging updates include:
      
        - install missing development header to iproute2/bpf_elf.h
        - propagate OpenWrt verbose flag during build
        - update and refresh patches
      
      Compile and run tested: QEMU/malta-mips32be on kernels 5.4 & 5.10.
      
      All iproute2 packages were built and installed to the test image. Some
      regression testing using ip-full and tc was successfully performed to
      exercise several kmods, tc modules, and simple BPF programs.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      b048a305
  2. Nov 14, 2020
  3. Aug 30, 2020
    • Hauke Mehrtens's avatar
      iproute2: Update to version 5.8 · 0b2f97be
      Hauke Mehrtens authored
      
      The ipk sizes for mips_24Kc change like this:
      old:
      ip-full_5.7.0-2_mips_24kc.ipk	165.786
      ip-tiny_5.7.0-2_mips_24kc.ipk	117.730
      tc_5.7.0-2_mips_24kc.ipk	144.405
      
      new:
      ip-full_5.8.0-1_mips_24kc.ipk	169.775
      ip-tiny_5.8.0-1_mips_24kc.ipk	119.808
      tc_5.8.0-1_mips_24kc.ipk	149.053
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      0b2f97be
  4. Aug 13, 2020
  5. Jul 14, 2020
  6. Jun 13, 2020
  7. Apr 11, 2020
  8. Feb 13, 2020
  9. Dec 06, 2019
  10. Sep 28, 2019
  11. Aug 24, 2019
  12. Aug 18, 2019
  13. Jul 04, 2019
  14. Jun 20, 2019
  15. Jun 07, 2019
    • Kevin Darbyshire-Bryant's avatar
      iproute2: add tc action ctinfo support · 021a9b4c
      Kevin Darbyshire-Bryant authored
      
      Add the userspace control portion of the backported kernelspace
      act_ctinfo.
      
      ctinfo is a tc action restoring data stored in conntrack marks to
      various fields.  At present it has two independent modes of operation,
      restoration of DSCP into IPv4/v6 diffserv and restoration of conntrack
      marks into packet skb marks.
      
      It understands a number of parameters specific to this action in
      additional to the usual action syntax.  Each operating mode is
      independent of the other so all options are optional, however not
      specifying at least one mode is a bit pointless.
      
      Usage: ... ctinfo [dscp mask [statemask]] [cpmark [mask]] [zone ZONE]
      		  [CONTROL] [index <INDEX>]
      
      DSCP mode
      
      dscp enables copying of a DSCP stored in the conntrack mark into the
      ipv4/v6 diffserv field.  The mask is a 32bit field and specifies where
      in the conntrack mark the DSCP value is located.  It must be 6
      contiguous bits long. eg. 0xfc000000 would restore the DSCP from the
      upper 6 bits of the conntrack mark.
      
      The DSCP copying may be optionally controlled by a statemask.  The
      statemask is a 32bit field, usually with a single bit set and must not
      overlap the dscp mask.  The DSCP restore operation will only take place
      if the corresponding bit/s in conntrack mark ANDed with the statemask
      yield a non zero result.
      
      eg. dscp 0xfc000000 0x01000000 would retrieve the DSCP from the top 6
      bits, whilst using bit 25 as a flag to do so.  Bit 26 is unused in this
      example.
      
      CPMARK mode
      
      cpmark enables copying of the conntrack mark to the packet skb mark.  In
      this mode it is completely equivalent to the existing act_connmark
      action.  Additional functionality is provided by the optional mask
      parameter, whereby the stored conntrack mark is logically ANDed with the
      cpmark mask before being stored into skb mark.  This allows shared usage
      of the conntrack mark between applications.
      
      eg. cpmark 0x00ffffff would restore only the lower 24 bits of the
      conntrack mark, thus may be useful in the event that the upper 8 bits
      are used by the DSCP function.
      
      Usage: ... ctinfo [dscp mask [statemask]] [cpmark [mask]] [zone ZONE]
      		  [CONTROL] [index <INDEX>]
      where :
      	dscp MASK is the bitmask to restore DSCP
      	     STATEMASK is the bitmask to determine conditional restoring
      	cpmark MASK mask applied to restored packet mark
      	ZONE is the conntrack zone
      	CONTROL := reclassify | pipe | drop | continue | ok |
      		   goto chain <CHAIN_INDEX>
      
      Signed-off-by: default avatarKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
      021a9b4c
  16. Mar 20, 2019
  17. Mar 19, 2019
  18. Mar 14, 2019
    • Tony Ambardar's avatar
      iproute2: tc: reduce size of dynamic symbol table · b6149540
      Tony Ambardar authored
      
      In the case of SHARED_LIBS=y, don't use -export-dynamic to place *all*
      symbols into the dynamic symbol table. Instead, use --dynamic-list to
      export a smaller set of symbols similar to that defined in static-syms.h
      in the case of SHARED_LIBS=n, avoiding an 11 KB tc package size increase.
      The symbol set is based on that required by the only plugin, m_xt.so.
      
      Also increment PKG_RELEASE.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE fixup]
      b6149540
    • Tony Ambardar's avatar
      iproute2: tc: enable and fix support for using .so plugins · 0b57a216
      Tony Ambardar authored
      This enables using the tc module m_xt.so, which uses the act_ipt kernel
      module to allow tc actions based on iptables targets. e.g.
      
         tc filter add dev eth0 parent 1: prio 10 protocol ip \
         u32 match u32 0 0 action xt -j DSCP --set-dscp-class BE
      
      Make the SHARED_LIBS parameter configurable and based on tc package
      selection.
      
      Fix a problem using the tc m_xt.so plugin as also described in
      https://bugs.debian.org/868059
      
      :
      
        Sync include/xtables.h from iptables to make sure the right offset is
        used when accessing structure members defined in libxtables. One could
        get “Extension does not know id …” otherwise. (See also: #868059)
      
      Patch to sync the included xtables.h with system iptables 1.6.x. This
      continues to work with iptables 1.8.2.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      0b57a216
    • Tony Ambardar's avatar
      iproute2: support eBFP/XDP object file loading, simplify linking libelf · f61359e1
      Tony Ambardar authored
      
      Add build and runtime dependencies on libelf, allowing tc and ip-full
      to load BPF and XDP object files respectively.
      
      Define package 'tc' as a singleton package variant, which can be used to
      enable additional functionality limited only to tc. Also set ip-tiny
      as the default 'ip' variant.
      
      Preserve optionality of libelf by having configuration script follow the
      HAVE_ELF environment variable, used similarly to the HAVE_MNL variable.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      f61359e1
  19. Feb 19, 2019
  20. Feb 11, 2019
    • Tony Ambardar's avatar
      iproute2: tc: reduce size of dynamic symbol table · 24879783
      Tony Ambardar authored
      
      In the case of SHARED_LIBS=y, don't use -export-dynamic to place *all*
      symbols into the dynamic symbol table. Instead, use --dynamic-list to
      export a smaller set of symbols similar to that defined in static-syms.h
      in the case of SHARED_LIBS=n, avoiding an 11 KB tc package size increase.
      
      Also increment PKG_RELEASE.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      24879783
    • Tony Ambardar's avatar
      iproute2: tc: enable and fix support for using .so plugins · fc80ef36
      Tony Ambardar authored
      This enables using the tc module m_xt.so, which uses the act_ipt kernel
      module to allow tc actions based on iptables targets. e.g.
      
         tc filter add dev eth0 parent 1: prio 10 protocol ip \
         u32 match u32 0 0 action xt -j DSCP --set-dscp-class BE
      
      Make the SHARED_LIBS parameter configurable and based on tc package
      selection.
      
      Fix a problem using the tc m_xt.so plugin as also described in
      https://bugs.debian.org/868059
      
      :
      
        Sync include/xtables.h from iptables to make sure the right offset is
        used when accessing structure members defined in libxtables. One could
        get “Extension does not know id …” otherwise. (See also: #868059)
      
      Patch to sync the included xtables.h with system iptables 1.6.x. This
      continues to work with iptables 1.8.2.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      fc80ef36
    • Tony Ambardar's avatar
      iproute2: simplify linking libelf for eBFP/XDP object file support · 26681fa6
      Tony Ambardar authored
      
      Simplify build and runtime dependencies on libelf, which allows tc and ip
      to load BPF and XDP object files respectively.
      
      Preserve optionality of libelf by having configuration script follow the
      HAVE_ELF environment variable, used similarly to the HAVE_MNL variable.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      26681fa6
    • Tony Ambardar's avatar
      iproute2: simplify Makefile, patches and fix feature detection · bc86da37
      Tony Ambardar authored
      
      Compile-based feature detection (e.g. xtables, ipset support) was broken
      due to silent compilation errors in the configure script, caused by a
      Makefile variable KERNEL_INCLUDE referring to kernel build headers. Use
      userspace headers by setting the same "user_headers" kernel include path
      as used for the iptables build.
      
      Remove redundant or unused Build/Configure definitions from package
      Makefile, including KERNEL_INCLUDE, LIBC_INCLUDE and DBM includes.
      
      Don't pass LDFLAGS within MAKE_FLAGS as this interferes with LDFLAGS in
      tc/Makefile and masks a link parameter ("-Wl,-export-dynamic"). Instead,
      use standard TARGET_LDFLAGS.
      
      Replace EXTRA_CCOPTS in MAKE_FLAGS with cleaner TARGET_CPPFLAGS, and also
      drop now unneeded patch 150-extra-ccopts.patch.
      
      Enable defining XT_LIB_DIR from Makefile, needed to set the iptables
      modules directory to something other than /lib/xtables, and also add
      libxtables dependency. Both are needed with working xtables detection.
      Note that libxtables is also pulled in by iptables, firewall or luci, so
      this change has no size impact in most cases.
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      bc86da37
    • Tony Ambardar's avatar
      iproute2: fix broken configuration patch · 43e14a2f
      Tony Ambardar authored
      
      Since v4.13, iproute2 switched to a config.mk file with greater use of
      pkg-config for library/feature detection. Replace the old Config patch
      with one modifying the configure script but enabling the same changes:
       - explicitly disable TC_CONFIG_ATM
       - rely on feature detection for IP_CONFIG_SETNS and TC_CONFIG_XT
      
      Signed-off-by: default avatarTony Ambardar <itugrok@yahoo.com>
      43e14a2f
  21. Jan 29, 2019
  22. Jan 23, 2019
  23. Dec 19, 2018
    • Jo-Philipp Wich's avatar
      iproute2: only link libelf where needed · 386803a0
      Jo-Philipp Wich authored
      The iproute2 build system links libelf support to every utility while only
      the tc program actually requires libelf specific functionality.
      
      Unfortunately the BPF ELF functionality is not confined into an own
      compilation unit but added to the existing bpf.c sources of the shared
      static libutil.a, causing every iproute2 applet to pick up an implicit
      libelf.so dependency.
      
      In order to avoid this requirement, patch the iproute2 build system to
      create both a libutil.a and a libutil-elf.a, with the former being built
      without libelf functionality and to only link the tc applet with the libelf
      enabled libutil.
      
      Finally, make the tc package depend on libelf to solve compilation errors.
      
      Ref: https://github.com/openwrt/packages/issues/7728
      
      
      Fixes: FS#2011
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      386803a0
  24. Dec 14, 2018
  25. Dec 12, 2018
  26. Nov 08, 2018
  27. Sep 15, 2018
  28. Sep 12, 2018
  29. Aug 31, 2018
  30. Aug 25, 2018
  31. Aug 02, 2018
Loading