Commit Graph

28 Commits

Author SHA1 Message Date
mrg 1b8d2f5ad2 update for GCC 6:
- read_rt() has a missing {} issue.
2018-02-06 09:33:07 +00:00
ozaki-r e3db1a05a1 Fix that routed deletes local routes
routed previousely ignored local routes, which have RTF_LOCAL flag, because
such routes have RTF_LLINFO and routed ignored routes having the flag. When
we obsoleted RTF_LLINFO, we removed the ignoring logic from routed, then
routed started removing local routes unexpectedly.

Fix this behavior by teaching local routes to routed to ignore them.

kardel@ reported the issue and helped testing, thanks!
2016-12-20 03:35:12 +00:00
joerg 14c0cd3532 Shuffle pointer magic to not depend on temporary overaligned pointers
into a packed structure.
2016-10-07 22:32:50 +00:00
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
christos cad376bd0d merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
2009-10-26 02:53:15 +00:00
christos b935e079cd fix printf formats. 2008-12-28 20:15:21 +00:00
mycroft fc82ea195f PR 9431: if rnh_addradd() fails, total_routes will be wrong. 2004-07-06 23:36:24 +00:00
christos f29f4783da constification lossage (hi gimpy) 2004-04-21 19:01:17 +00:00
itojun 16435cdb98 strcpy/sprintf cleanup. from openbsd 2003-04-21 08:54:42 +00:00
itojun 3fbac68bea use snprintf. there are more... 2003-04-15 08:20:17 +00:00
itojun 64e132e781 array seems too small 2003-04-15 07:37:34 +00:00
thorpej cd81fc31ea Avoid strict alias warnings. 2002-12-06 02:18:37 +00:00
christos f93fe60ac0 sync with routed 2.27 2002-11-30 04:04:23 +00:00
lukem cbbd79f700 fix -Wshadow warnings 2001-11-02 05:30:56 +00:00
christos 4fea751ddc sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks.  Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
2001-03-10 23:52:45 +00:00
christos 93daf39438 make local functions static and portability casts. 2000-03-02 21:01:34 +00:00
christos 3e1606a4b5 PR/9390: Jarkko Torppa: Routed leaks memory when route addition fails. 2000-02-11 18:39:02 +00:00
bouyer a1d8cb9593 Ignore RTM_OIFINFO messages (send by a COMPAT_14 kernel). 1999-11-19 10:46:35 +00:00
ross c650920100 LP64 tweaks. 1999-02-25 11:03:22 +00:00
christos 756b1291db Resolve conflicts. 1999-02-23 10:47:39 +00:00
christos 94b2d42842 Update to 980910 from ftp.rhyolite.com 1998-10-25 14:56:06 +00:00
thorpej 6d8ef4df7c Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
1998-06-02 18:02:55 +00:00
mrg 52ff5d8fee make these compile on the alpha after WARNS=1. 1997-09-16 08:37:01 +00:00
lukem 3f50343aa8 * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
1997-09-15 10:38:11 +00:00
christos e7512e5a5e - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
1997-02-03 22:02:51 +00:00
christos 4d3fba5988 - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
1996-09-24 16:24:12 +00:00
thorpej fc1a524603 - Finished up merge.
- Add some prototypes and definitions for types as necessary,
  wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
1996-08-10 01:28:58 +00:00
thorpej b1e0bd39e1 A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>.  Thanks!
1996-08-10 01:08:06 +00:00