summaryrefslogtreecommitdiff
path: root/sbin/route
AgeCommit message (Collapse)Author
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@
2010-05-19Do not default to rdomain 1 for route exec use 0 as default like every otherClaudio Jeker
route command. Found by Christophe Fillo (cf (at) utc fr). While there cleanup the code a bit there is no need for special rtableid handling for route exec. OK reyk@
2010-03-23Add missing break, found while syncing with netstat/show.cClaudio Jeker
2010-03-23Print MPLS information in route -n get and do some cleanup in the show code.Claudio Jeker
OK michele@
2010-01-13netmask sockaddrs for the default route may set sa_len to 0 to indicateClaudio Jeker
a all zero mask. So check for this condition as well since else we read garbage that comes after the netmask sockaddr (which is the IFP normaly). Found by todd@, OK dlg@
2010-01-11"default" routes need a mask of 0 too.David Gwynne
from and ok claudio@
2009-12-20First shot at making this manual page not look like a black sheep. BeenTheo de Raadt
looking at it with claudio since I started doing more routing stuff.
2009-12-11be a little more specific about -ifp; from Doran MoriJason McIntyre
2009-12-01Add the new exec command to run a process and its children in aReyk Floeter
non-default rdomain/rtable. route will change the default rdomain using the new setrdomain() syscall and execute the supplied command, eg. "route -T1 exec /usr/sbin/named". Tested by many including michele@, phessler@ ok claudio@, deraadt@
2009-12-01add "exec" keywordReyk Floeter
ok jsg@
2009-11-04tweak previous;Jason McIntyre
2009-11-03Lies. We no longer support this magic netmask at the end of the lineClaudio Jeker
compatibility.
2009-11-02Print the route metrics in monitor mode if -v is used. This info can beClaudio Jeker
useful from time to time and it is easer then deciphering ktrace output. While there kill the no longer needed msec macro. OK henning
2009-11-02Use strtonum instead of atoi, this allows to do basic range checking.Claudio Jeker
While there remove some very old compat code supporting a syntax that no one still knows or uses. OK henning@, deraadt@
2009-10-30The script that generates keywords.h wasn't updated whenJonathan Gray
mplslabel label was added, fix.
2009-09-14Switch get_linkstate() to use the new LINK_STATE_DESCRIPTIONS insteadClaudio Jeker
of the if_media dance. Simplifies the code nicely. OK henning, sthen, michele, deraadt
2009-08-07if buffers overlap; result will be undefined. ok claudio@, michele@Martynas Venckus
2009-07-23Always print interface names, not just ifindex, even when -n isStuart Henderson
specified. Most people want -n to avoid reverse DNS lookups, and it's stupid not to print a useful interface name just for that. YES PLEASE! Ok claudio@
2009-07-23Only print unknown in RTM_IFINFO messages when the link is inClaudio Jeker
LINK_STATE_UNKOWN. In the other case use LINK_STATE_IS_UP() to print either "up" or "down". OK henning@, sthen@
2009-06-27Mark MPLS routes with T (tagged) in route output.Michele Marchetto
suggested by dlg@, ok claudio@, laurent@, blambert@
2009-06-25Add a missing RTM_VERSION check.Claudio Jeker
Tested and OK sthen@, OK henning@
2009-06-25Document how to add static MPLS labels.Michele Marchetto
input jmc@, ok claudio@
2009-06-06Uninitialized variable causing havoc on flush. Found by rivo nurgesClaudio Jeker
2009-05-31Masking the priority with RTP_MASK is no longer needed in userland.Claudio Jeker
Kernel will do this now.
2009-05-30Make it possible to filter monitor output on AF or show only interfaceClaudio Jeker
specific changes. OK henning@
2009-05-30priority is a u_char not a u_short.Claudio Jeker
2009-05-30Make route flush more powerful by allowing -iface/-interface or -priorityClaudio Jeker
to be specified. So only routes matching these conditions will be flushed. This will help making dhclient less dumb when fiddeling with routes. OK henning@
2009-05-23missed rtm_hdrlen conversion in one placeChris Cappuccio
ok claudio@
2009-04-28Sync with kernel changes.Michele Marchetto
Add support to route(8) for a new dummy operation to allow packets coming in with a particular label to leave the MPLS cloud and join ipv4/ipv6 stack. ok claudio@ laurent@
2009-02-03Reflect MPLS kernel changes. Operations are stored now in rt_mpls field.Michele Marchetto
ok claudio@ laurent@
2009-01-29Introduce -mplslabel to allow ipv4/ipv6 packets enter MPLS clouds.Michele Marchetto
This is also consistent with mplslabel in ifconfig(8). OK claudio@ laurent@
2009-01-28Reflect MPLS kernel changes.Michele Marchetto
2009-01-26Mark multipath routes with P in the show command flags. Bummer that bothClaudio Jeker
M and m were already taken. OK henning@
2009-01-08Reflect MPLS kernel changes.Michele Marchetto
ok claudio@
2008-12-16Use macros from route.h when mapping route priorities to names; theStuart Henderson
hardcoded values used here before were incorrect. ok claudio@
2008-12-15Reflect kernel changes. Labels are no more per link uniqueMichele Marchetto
and operations are now stored in rt_flags. This also simplify a lot the syntax. ok claudio@ laurent@
2008-12-12Use the hdrlen to skip over the header and to the sockaddrs instead of theClaudio Jeker
implied sizeof(struct rt_msghdr). Makes code more robust when userland and kernel are out of sync.