Go to file
Stefano Brivio b5cf263670 iproute: Set flags and attributes on dump to get IPv6 cached routes to be flushed
With a current (5.1) kernel version, IPv6 exception routes can't be listed
(ip -6 route list cache) or flushed (ip -6 route flush cache). Kernel
support for this is being added back. Relevant net-next commits:

  564c91f7e563 fib_frontend, ip6_fib: Select routes or exceptions dump from RTM_F_CLONED
  ef11209d4219 Revert "net/ipv6: Bail early if user only wants cloned entries"
  3401bfb1638e ipv6/route: Don't match on fc_nh_id if not set in ip6_route_del()
  bf9a8a061ddc ipv6/route: Change return code of rt6_dump_route() for partial node dumps
  1e47b4837f3b ipv6: Dump route exceptions if requested
  40cb35d5dc04 ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1()

However, to allow the kernel to filter routes based on the RTM_F_CLONED
flag, we need to make sure this flag is always passed when we want cached
routes to be dumped, and we can also pass table and output interface
attributes to have the kernel filtering on them, if requested by the user.

Use the existing iproute_dump_filter() as a filter for the dump request in
iproute_flush(). This way, 'ip -6 route flush cache' works again.

v2: Instead of creating a separate 'filter' function dealing with
    RTM_F_CACHED only, use the existing iproute_dump_filter() and get
    table and oif kernel filtering for free. Suggested by David Ahern.

Fixes: aba5acdfdb ("(Logical change 1.3)")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-06-26 14:27:00 -07:00
bash-completion tc: gred: support controlling RED flags 2018-11-24 07:11:36 -08:00
bridge bridge: mdb: restore text output format 2019-05-30 11:01:53 -07:00
devlink devlink: replace print macros with functions 2019-06-26 09:18:18 -07:00
doc/actions doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
etc/iproute2 iproute2: Add support for a few routing protocols 2018-06-11 11:18:30 -07:00
examples examples: Remove cbq.init-v0.7.3 2018-12-18 10:52:35 -08:00
genl genl: remove dead code 2018-11-19 11:42:44 -08:00
include tc: adjust xtables_match and xtables_target to changes in recent iptables 2019-06-24 16:12:17 -07:00
ip iproute: Set flags and attributes on dump to get IPv6 cached routes to be flushed 2019-06-26 14:27:00 -07:00
lib netns: make netns_{save,restore} static 2019-06-20 14:30:41 -07:00
man Add support for configuring MACsec gcm-aes-256 cipher type. 2019-06-18 09:55:51 -07:00
misc ss: add option to print socket information on one line 2019-05-02 16:06:06 -07:00
netem doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
rdma rdma: update uapi headers 2019-05-18 06:38:39 -07:00
schema bridge: add json schema for bridge fdb show 2016-07-20 12:02:02 -07:00
tc tc: simple: don't hardcode the control action 2019-06-06 14:43:08 -07:00
testsuite Makefile: use make -C 2019-06-18 09:52:58 -07:00
tipc tipc: add link broadcast get 2019-03-26 16:09:16 -07:00
.clang-format clang-format: add configuration file 2019-01-17 13:38:23 -08:00
.gitignore Remove leftovers from removed Latex documentation 2018-02-13 16:43:19 -08:00
.mailmap mailmap: map David's mail address 2019-05-15 09:50:42 -07:00
configure configure: fix typo in check_xt_old_internal_h 2019-01-07 14:42:01 -08:00
COPYING Update address of FSF in license 2008-03-08 13:31:03 -08:00
Makefile Makefile: use make -C 2019-06-18 09:52:58 -07:00
README README: update libdb build dependency information 2018-05-01 19:29:03 -07:00
README.devel README: update location of git repositories, remove broken info link 2018-02-13 16:42:51 -08:00
README.distribution README cleanup's 2012-01-03 15:04:55 -08:00
README.iproute2+tc doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
README.lnstat doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00

This is a set of utilities for Linux networking.

Information:
    https://wiki.linuxfoundation.org/networking/iproute2

Download:
    http://www.kernel.org/pub/linux/utils/net/iproute2/

Stable version repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Development repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

How to compile this.
--------------------
1. libdbm

arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines.  Often this is in the db-devel package.

2. make

The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.

3. To make documentation, cd to doc/ directory , then
   look at start of Makefile and set correct values for
   PAGESIZE=a4		, ie: a4 , letter ...	(string)
   PAGESPERPAGE=2	, ie: 1 , 2 ...		(numeric)
   and make there. It assumes, that latex, dvips and psnup
   are in your path.

4. This package includes matching sanitized kernel headers because
   the build environment may not have up to date versions. See Makefile
   if you have special requirements and need to point at different
   kernel include files.

Stephen Hemminger
stephen@networkplumber.org

Alexey Kuznetsov
kuznet@ms2.inr.ac.ru