Commit Graph

11 Commits

Author SHA1 Message Date
ozaki-r 09973b35ac Separate nexthop caches from the routing table
By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html
2016-04-04 07:37:07 +00:00
joerg e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
gdt c9bfbf1142 Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.
RTF_ANNOUNCE was defined as RTF_PROTO2.  The flag is used to indicated
that host should act as a proxy for a link level arp or ndp request.
(If RTF_PROTO2 is used as an experimental flag (as advertised),
various problems can occur.)

This commit provides a first-class definition with its own bit for
RTF_ANNOUNCE, removes the old aliasing definitions, and adds support
for the new RTF_ANNOUNCE flag to netstat(8) and route(8).,

Also, remove unused RTF_ flags that collide with RTF_PROTO1:
  netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1
  netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1
  (Neither of these flags are used anywhere.  Both have been removed
  to reduce chances of collision with RTF_PROTO1.)

Figuring this out and the diff are the work of Beverly Schwartz of
BBN.

(Passed release build, boot in VM, with no apparently related atf
failures.)

Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073.
2011-11-11 15:09:32 +00:00
kefren a7449c28c6 add MPLS clue - mpls and tag keywords 2010-06-26 14:29:36 +00:00
christos c69676936c PR/40455: Mihai Chelaru: Add noreject noblackhole options 2010-05-12 17:56:13 +00:00
dyoung 61dbc26298 Add route keywords -nocloned, -nocloning. 2006-08-06 17:44:56 +00:00
jrf ce22377a7e This is an updated submitted patch originally written by Jim Rees
and sent in by Greg Hudson as seen in PR misc/3227. Basically what it
does is adds a flushall option which deletes all but localhost routes.
This is done by andoring in a flag called doall (1 means do all routes
including gateway, 0 means do a regular flush). I have seen some
platforms that do this. I tested it out on ipv4 only, it works as
advertised. Commit was approved by christos@.
2003-07-19 01:36:47 +00:00
itojun 6a04f28b13 regen 2001-01-27 04:51:25 +00:00
itojun d211125175 IPv6-ready route command (-inet6 and -prefixlen are added) 1999-07-02 15:29:02 +00:00
christos d9349e61e1 - Add netatalk bits
- Add prototypes
- Fix printf formats
1997-04-03 02:35:46 +00:00
gwr a54521537f As discussed some time ago, add a "show" sub-command.
Also allow compilation with -DSMALL to ommit support for
non-essential protocols (i.e. when built into a ramdisk).
Use a less hack-ish way to generate keywords.[ch] and just
check in the result (helps ../../distrib/utils/x_route).
1996-11-15 18:01:36 +00:00