The NetBSD Project

CVS log for src/sbin/route/rtutil.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / route

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Aug 29 19:27:40 2020 UTC (4 years, 7 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -9 lines
Instead of defining RTF_LLINFO, use RTF_LLDATA

Revision 1.4.2.4: download - view: text, markup, annotated - select for diffs
Wed Jul 26 15:52:57 2017 UTC (7 years, 8 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.4.2.3: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.3: +3 -1 lines
Pull up following revision(s) (requested by manu in ticket #1454):
	sbin/route/rtutil.c: revision 1.10
Fix route and netstat -r output when built with -DSMALL
A missing \n caused the routing table to be printed all in one line
if -DSMALL was used.

Revision 1.8.8.2: download - view: text, markup, annotated - select for diffs
Tue Jul 25 01:34:23 2017 UTC (7 years, 9 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.8.8.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.8.1: +3 -1 lines
Pull up following revision(s) (requested by manu in ticket #131):
	sbin/route/rtutil.c: revision 1.10
Fix route and netstat -r output when built with -DSMALL
A missing \n caused the routing table to be printed all in one line
if -DSMALL was used.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:26:29 2017 UTC (7 years, 9 months ago) by manu
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -1 lines
Fix route and netstat -r output when built with -DSMALL

A missing \n caused the routing table to be printed all in one line
if -DSMALL was used.

Revision 1.8.8.1: download - view: text, markup, annotated - select for diffs
Fri Jul 7 13:57:26 2017 UTC (7 years, 9 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +10 -2 lines
Pull up following revision(s) (requested by ozaki-r in ticket #107):
	usr.sbin/arp/arp.c: revision 1.56
	sys/net/rtsock.c: revision 1.218
	sys/net/if_llatbl.c: revision 1.20
	usr.sbin/arp/arp.c: revision 1.57
	sys/net/rtsock.c: revision 1.219
	sys/net/if_llatbl.c: revision 1.21
	usr.sbin/arp/arp.c: revision 1.58
	tests/net/net_common.sh: revision 1.19
	sys/netinet6/nd6.h: revision 1.84
	sys/netinet6/nd6.h: revision 1.85
	tests/net/arp/t_arp.sh: revision 1.23
	sys/netinet6/in6.c: revision 1.246
	tests/net/arp/t_arp.sh: revision 1.24
	sys/netinet6/in6.c: revision 1.247
	tests/net/arp/t_arp.sh: revision 1.25
	sys/netinet6/in6.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.26
	usr.sbin/ndp/ndp.c: revision 1.49
	tests/net/arp/t_arp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.20
	tests/net/arp/t_arp.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.21
	tests/net/arp/t_arp.sh: revision 1.29
	tests/net/ndp/t_ndp.sh: revision 1.22
	tests/net/ndp/t_ndp.sh: revision 1.23
	tests/net/route/t_flags6.sh: revision 1.13
	tests/net/ndp/t_ndp.sh: revision 1.24
	tests/net/route/t_flags6.sh: revision 1.14
	tests/net/ndp/t_ndp.sh: revision 1.25
	tests/net/route/t_flags6.sh: revision 1.15
	tests/net/ndp/t_ndp.sh: revision 1.26
	sbin/route/rtutil.c: revision 1.9
	tests/net/ndp/t_ndp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.28
	tests/net/net/t_ipv6address.sh: revision 1.14
	tests/net/ndp/t_ra.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.29
	sys/net/route.h: revision 1.113
	tests/net/ndp/t_ra.sh: revision 1.29
	sys/net/rtsock.c: revision 1.220
	sys/net/rtsock.c: revision 1.221
	sys/net/rtsock.c: revision 1.222
	sys/net/rtsock.c: revision 1.223
	tests/net/route/t_route.sh: revision 1.13
	sys/net/rtsock.c: revision 1.224
	sys/net/route.c: revision 1.196
	sys/net/if_llatbl.c: revision 1.19
	sys/net/route.c: revision 1.197
	sbin/route/route.c: revision 1.156
	tests/net/route/t_flags.sh: revision 1.16
	tests/net/route/t_flags.sh: revision 1.17
	usr.sbin/ndp/ndp.c: revision 1.50
	tests/net/route/t_flags.sh: revision 1.18
	sys/netinet/in.c: revision 1.204
	tests/net/route/t_flags.sh: revision 1.19
	sys/netinet/in.c: revision 1.205
	tests/net/arp/t_arp.sh: revision 1.30
	tests/net/arp/t_arp.sh: revision 1.31
	sys/net/if_llatbl.h: revision 1.11
	tests/net/arp/t_arp.sh: revision 1.32
	sys/net/if_llatbl.h: revision 1.12
	tests/net/arp/t_arp.sh: revision 1.33
	sys/netinet6/nd6.c: revision 1.233
	sys/netinet6/nd6.c: revision 1.234
	sys/netinet/if_arp.c: revision 1.251
	sys/netinet6/nd6.c: revision 1.235
	sys/netinet/if_arp.c: revision 1.252
	sbin/route/route.8: revision 1.57
	sys/net/rtsock.c: revision 1.214
	sys/net/rtsock.c: revision 1.215
	sys/net/rtsock.c: revision 1.216
	sys/net/rtsock.c: revision 1.217
whitespace police
Simplify
We can assume that rt_ifp is always non-NULL.
Sending a routing message (RTM_ADD) on adding an llentry
A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.
Requested by ryo@
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries
ARP/NDP entries aren't connected routes.
Reported by ryo@
Support -c <count> option for route monitor
route command exits if it receives <count> routing messages where
<count> is a value specified by -c.
The option is useful to get only particular message(s) in a test script.
Test routing messages emitted on operations of ARP/NDP entries
Do netstat -a for an appropriate protocol
Add missing declarations for cleanup
Set net.inet.arp.keep only if it's required
Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
Fix typo
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
Remove unused function (nd6_rem_ifa_lle)
Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry
This behavior is a bit odd and should be fixed in the future...
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
Fix build of kernels without both INET and INET6
Tweak lltable_sysctl_dumparp
- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6
Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
Fix ifdef; care about a case w/ INET6 and w/o INET
Drop RTF_UP from a routing message of a deleted ARP/NDP entry
Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
Fix wrong comment
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
Check if ARP/NDP entries are purged when a related route is deleted

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jun 28 04:14:53 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +10 -2 lines
Restore ARP/NDP entries to route show and netstat -r

Requested by dyoung@ some time ago

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Apr 4 07:37:07 2016 UTC (9 years ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, netbsd-8-base, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +6 -8 lines
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

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Jan 23 21:05:51 2016 UTC (9 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -2 lines
no need for <sys/mbuf.h>

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Mar 23 18:33:17 2015 UTC (10 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
Add RTF_BROADCAST to mark routes used for the broadcast address when
they are created on the fly. This makes it clear what the route is for
and allows an optimisation in ip_output() by avoiding a call to
in_broadcast() because most of the time we do talk to a host.
It also avoids a needless allocation for the storage of llinfo_arp and
thus vanishes from arp(8) - it showed as incomplete anyway so this
is a nice side effect.

Guard against this and routes marked with RTF_BLACKHOLE in
ip_fastforward().
While here, guard against routes marked with RTF_BLACKHOLE in
ip6_fastforward().
RTF_BROADCAST is IPv4 only, so don't bother checking that here.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Feb 26 09:56:11 2015 UTC (10 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
Teach route(8) about RTF_LOCAL.

Revision 1.4.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 8 11:47:11 2015 UTC (10 years, 3 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.4.2.2: preferred, colored
Changes since revision 1.4.2.2: +16 -10 lines
Pull up following revision(s) (requested by prlw1 in ticket #395):
	sbin/route/rtutil.c: revision 1.4
	sbin/route/rtutil.h: revision 1.3
	usr.bin/netstat/if.c: revision 1.81
make netname4 match the netname6 signature avoiding a NULL pointer.
adjust to the netname4 prototype.

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 8 11:01:01 2015 UTC (10 years, 3 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.4.2.1: preferred, colored
Changes since revision 1.4.2.1: +786 -0 lines
Pull up following revision(s) (requested by prlw1 in ticket #390):
	usr.bin/netstat/mroute.c: revision 1.25
	usr.bin/netstat/Makefile: revision 1.40
	sbin/route/prog_ops.h: revision 1.3
	sbin/route/rtutil.c: revision 1.1
	sbin/route/rtutil.h: revision 1.1
	usr.bin/netstat/mroute6.c: revision 1.15
	sbin/route/extern.h: revision 1.15
	usr.bin/netstat/show.c: file removal
	usr.bin/netstat/main.c: revision 1.93
	usr.bin/netstat/route.c: revision 1.83
	usr.bin/netstat/netstat.h: revision 1.51
	distrib/utils/x_route/Makefile: revision 1.18
	sbin/route/show.c: revision 1.46
	usr.bin/netstat/if.c: revision 1.80
	sbin/route/route.c: revision 1.145
	sbin/route/Makefile: revision 1.26
Factor out the netstat route printing code and use it here. There is no
point in having 2 different copies; fixes PR/49371

Revision 1.4.2.1
Wed Jan 7 22:38:32 2015 UTC (10 years, 3 months ago) by martin
Branches: netbsd-7
FILE REMOVED
Changes since revision 1.4: +0 -796 lines
file rtutil.c was added on branch netbsd-7 on 2015-01-08 11:01:01 +0000

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jan 7 22:38:32 2015 UTC (10 years, 3 months ago) by christos
Branches: MAIN
Branch point for: netbsd-7
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +16 -10 lines
make netname4 match the netname6 signature avoiding a NULL pointer.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Nov 12 03:34:08 2014 UTC (10 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -1 lines
PR/47704: Takahiro HAYASHI: Add -L flag

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Nov 8 00:47:32 2014 UTC (10 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -3 lines
give a little more space

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Nov 6 21:29:32 2014 UTC (10 years, 5 months ago) by christos
Branches: MAIN
Factor out the netstat route printing code and use it here. There is no
point in having 2 different copies; fixes PR/49371

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>