summaryrefslogtreecommitdiff
path: root/sbin/route
AgeCommit message (Collapse)Author
2015-10-25route flush cannot pledge before sysctl for NET_RT_DUMP; defer the act.Theo de Raadt
issue spotted by matthieu
2015-10-24Removing xresolve from generating script has been forgotten.Alexander Bluhm
OK mpi@
2015-10-23route has 3 code paths: monitor (listening on route socket); showTheo de Raadt
(sysctl and then print), change (getsocket, then read/write on that). Refactor lightly and insert pledge "stdio rpath dns" in each case. ok claudio benno phessler
2015-09-11Remove RTF_XRESOLVE support.Martin Pieuchot
2015-07-18Make all commands accepting the "-priority" switch recognize aliasesMartin Pieuchot
for common priorities. ok deraadt@, claudio@
2015-07-18On systems with a full routing table (550k+), we often want to be able toPeter Hessler
look at the routes with a priority, or to display all routes that do not have a specific priority (normally, don't show bgp). We are intentionally not updating netstat -r yet, as we do not have a good flag to use. first version from, and OK benno@
2015-05-17nope, ioctl has not been used for a whileTheo de Raadt
2015-05-06Document that priority 1 is reserved for kernel use.Martin Pieuchot
2015-04-27route show does not need to filter unwanted af itself, the sysctl doesSebastian Benoit
that for us. approach seems sound deraadt@ ok claudio@ mpi@ henning@ phessler@
2015-03-18Instead of embedding interface names in a sockaddr use their indexesMartin Pieuchot
when adding route entries with the -link option. This prevent the ARP layer to take the name of your interface for an Ethernet address. If you still want to add stupid content to your routing table, please write your own tool. Thanks to Henk Jan Agteresch for reporting the original issue and testing this diff. ok mikeb@, deraadt@, benno@, claudio@
2015-02-06Remove route/netstat -f encap in favor of ipsecctl -s flow.Reyk Floeter
OK deraadt@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-08-19Entries for broadcast addresses should also be ignored, just like localMartin Pieuchot
entries. ok florian@, mikeb@, henning@
2014-07-24Unbreak ''route flush'': the kernel now adds local (RTF_LOCAL) routesJeremie Courreges-Anglas
for addresses configured on the system, and prevents userland from deleting them. Just skip those routes when flushing. Problem noticed by mlarkin@, ok henning@ mpi@ claudio@ sthen@ deraadt@
2014-06-23The second level of the CTL_NET sysctl is a PF_*, not an AF_*Philip Guenther
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
2014-05-08Introduce two new route flags: RTF_LOCAL and RTF_BROADCAST.Martin Pieuchot
Nothing use them for the moment, but here is the plan: Since a route lookup is always necessary to output a packet it makes sense to store all the information regarding how the packet should be sent in the routing entry. This will save us some expensive lookups on address lists. But once we have all the information about our addresses in the routing table, we can even use it in the input path with the hope that the number of lookups in the forwarding case can be reduce to one. ok henning@, chris@
2014-04-17Sync show.c to what we have in netstat.c (at least steal some good idiomsClaudio Jeker
from there). OK sthen@ mpi@ jca@
2014-02-26Try to be more precise about rtable and rdomains.Claudio Jeker
2014-01-22Remove genmask support from route(8). It still will show them in monitorClaudio Jeker
or get but you can no longer set it. genmask will die soon since nobody needs it. OK benno@ and agreed by dlg@
2013-10-28use %d instead of %i in a few fprintf for clarityTheo de Raadt
2013-10-18Prepare the route(8) command for printing 64 bit route expire time.Alexander Bluhm
Also fix the conversion between relative and absolute expire time. OK claudio@
2013-07-19Prep for WARNINGS=yes: add the prototypes that were missing, silencePhilip Guenther
a "signed vs unsigned in conditional" warning, and eliminate what looks like an unintentional variable shadowing. ok bluhm@
2013-07-19Compile /sbin/route with -Wall enabled.Alexander Bluhm
OK deraadt@
2013-05-27autodetect ipv6 addresses for route(8). ok benno@ bluhm@, manpage help jmc@Stuart Henderson
2013-03-21create realloc() loops around sysctl for array-based mibs, in programsTheo de Raadt
which want a "full" dump ok dlg
2012-12-04remove some unnecessary sys/mbuf.h inclusionsTheo de Raadt
2012-09-23Allow route -T 3 add to create a table even if the table does not existClaudio Jeker
yet. This is the only way to create alternate routing tables. Reminded by and OK jsg@
2012-08-14fix bad argument passed to errx()Charles Longeau
ok sthen@ benno@ claudio@
2012-07-13allow destination/prefixlen syntax for ipv6 routes.Sebastian Benoit
from Florian Obser, florian -AT- narrans -DOT- de ok sthen@
2012-03-17remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.David Gwynne
no objection from mcbride@ krw@ markus@ deraadt@
2011-09-03make -column lists pretty again;Jason McIntyre
specifically, rewrite them to permit some markup in the column headers, and use "Ta" instead of literal tabs; mandoc does not currently match groff 100%, but a mandoc fix may be some time off, and we've gone enough releases with poorly formatting column lists. in some cases i have rewritten the lists as -tag, where -column made little sense.
2011-07-09rmove rotten netatalk bitsHenning Brauer
2011-07-05kill a useless Pp;Jason McIntyre
2011-07-05Flip one .Fl interface to .Fl iface since iface is used everywhere elseClaudio Jeker
even though -interface is the same as -iface. OK jmc@
2011-07-04Force the sa_len to sizeof(struct sockaddr_dl) before callingClaudio Jeker
link_addr() since the function looks at sa_len internally. This should solve issues with using -ifp modifier because the aflen was often to small.
2011-07-02-interface is an alias of -iface so make sure route(8) accepts bothClaudio Jeker
flags in the monitor case. Brought up on the mailing list some long time ago.
2011-04-25allow commands like "route add 0.0.0.0/1 $SOMEHOST" to work correctly,Stuart Henderson
previously they operated on the default route. reported by weerd@, ok claudio@
2010-10-25range check rtm_type more carefully against the known RTM_ values.Theo de Raadt
this is not the real solution to PR 6500; claudio is going to fix that properly in the kernel ok claudio
2010-10-11Make route(8) use the ROUTE_TABLEFILTER and change the code so thatClaudio Jeker
route(8) will default to the process rtableid. route -T 1 exec route add default 192.168.1.1 route -T 1 exec route -n show These commands will now operate outmatically on rtable 1 and not on rtable 0 as it was done before. OK henning@
2010-09-2115 months later, there is still no mpls(4) man page: .Xr mpls 4 -> MPLSJason McIntyre
2010-09-21Add '-label' to specify that you only want to see routes having theKenneth R Westerback
given label. No change to existing functionality. ok henning@ claudio@
2010-09-04Tried to get too fancy with the Makefile in a way that doesn't buildBret Lambert
correctly; changing keywords.sh still requires manual intervention. pointed out by sthen@
2010-09-04sort generated keywords in order to replace linear probe with bsearch(3)Bret Lambert
(more people should know about how to properly use libc-provided tools) make keywords.h depend upon keywords.sh, so that it gets automatically rebuilt when keywords.sh is edited ok claudio@
2010-09-02remove trailing spaces and tabs from source code; no binary changesIgor Sobrado
(verified by both sthen@ and me). ok sthen@; "just commit it" claudio@
2010-07-29Print a column with the routing label if "netstat -vr" or "routeAlexander Bluhm
-v show" are called with the -v switch. ok markus@
2010-07-14handle printing of RTM_DESYNC in route monitor.David Gwynne
reviewed by deraadt@ written by sthen@ who said i should commit it cos he was going to sleep.
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-06-27Make 'route exec' emit error messages like xargs when execve() fails does.Philip Guenthe
ok claudio@
2010-05-19Set RTF_MPLS when playing with MPLS routes since this is now required.Claudio Jeker
OK michele@
2010-05-19remove unused variablesCharles Longeau
ok claudio@ michele@