Age | Commit message (Collapse) | Author |
|
family and length field. This fixes route(8) to handle "::/0"
properly. Also fix "route add -inet 0.0.0.0 -prefixlen 0 (gateway)"
to work properly.
ok kn
|
|
getaddrinfo(3) may fail for multiple reasons, but error message should be
unique in general.
OK bluhm
|
|
the size constraint to allow this to pass through the kernel.
Looks good to deraadt@
|
|
|
|
no objection krw@ who has further suggestions for improvement
|
|
ok bluhm@
|
|
interface name if known. As all the other message types do.
ok bluhm@
|
|
messages, not "ifidx".
ok bluhm@
|
|
|
|
ok bluhm@
|
|
are u_char or u_short. So use %u instead of %d in printf().
ok bluhm@
|
|
had them.
ok bluhm@
|
|
from slaacd and dhclient when it starts.
Discussed with deraadt who notes that it's a bit odd to have this as a
route priority. One idea is to have this as a dedicated route message
and not a priority.
But we want to move this forward and learn how it can be used so we
are going with this for now.
OK deraadt
|
|
RTM_CHGADDRATTR messages. Be consistant and eliminate ':' after all
'name's.
ok bluhm@
|
|
route will now show "AUTOCONF4" in flags.
|
|
were still not correct. While the values written to the kernel are
fine, the bytes for padding were taken from memory after the sockaddr
structs.
In route(8) the union of sockaddrs can be made larger, so that the
padding is taken from there.
In arp(8) the size of the struct is known. Copy only the struct
and advance over the padding. The memory has been zeroed before.
Merge all address size fixes from arp(8) into ndp(8).
OK claudio@
|
|
included in the routing message. The significance of the bits has
to be consistent with the order of the addresss. In route(8) store
addresses in ascending order of RTA values. This allows to use
MPLS routes together with route labels.
OK mpi@ claudio@
|
|
type. Provide the address family AF_LINK and storage size of struct
sockaddr_dl to the kernel when creating an IFP routing address.
OK mpi@
|
|
revision 1.178 from 23.10.2015 accidentially removed the tflag bits,
turning `-t' into a NOOP.
Found out the hard way during debug.
OK deraadt
|
|
ifconfig(8) shows in its display of interface information.
ok bluhm@
|
|
where the "wrong" #define was used.
ok dlg@
|
|
Original diff from phessler@. Many suggestions and tweaks from
claudio@, stsp@, anton@.
ok claudio@ stsp@ anton@ phessler@
|
|
if we ask for AF_INET6.
OK kn, deraadt
|
|
beyonds the integer width results undefined behavior in C spec.
Actually the count is masked by 0x1f on amd64. Found by asou at
soum.co.jp
ok claudio kn schwarze
|
|
a bare dot-notation IP address by counting trailing zero octets.
Instead, assume -host when neither -net nor -netmask nor -prefixlen is
given. Error out when -net is requested but no netmask is specified.
This removes the last use of the IN_CLASS* macros from this program.
OK claudio@ kn@, and many agreed with the general direction during g2k18.
|
|
This removes any logic that implies IPv6 destination host addresses to be
/64 subnets so they are taken as is.
RFC 3587 deprecated this in 2003 and our manual page actually states:
The route is assumed to be to a network if any of the following apply to
destination:
* [...]
* it is an IPv6 address with a â/XXâ suffix (where XX is the number of
bits in the network portion of the address and is less than 128)
* [...]
If destination is a valid IP address or host name, it is presumed to be a
route to a host.
Stripping relevant code from `inet6_makenetandmask()' left the function as
dummy wrapper around `prefixlen()', so zap it completely.
Discussed with and positive feedback from many, OK benno henning
|
|
the route filter to set RTABLE_ANY. Previously only the routing
table/rdomain of the route process was displayed (that being the
kernel default).
ok kn@ claudio@ and henning@
|
|
OK phessler@ claudio@ benno@ kn@
"steh' nicht rum, committe das" henning@
|
|
Make rtable(4) usage documentation consistent with other programs.
This is to have `man -k ar~rtable' show the full list without having to
look for other variations of the same argument type.
OK bluhm
|
|
OK phessler, benno, claudio
|
|
|
|
Since the address string comes last, `-prefixlen 56 2001:db8::' silently
installs a route for /64 since that's the currently implied prefix length.
The manual page already states that these options must follow the
destination parameter in order to have any effect.
Discussed at length with many
OK benno sthen bluhm jca
|
|
ok tb@, sthen@
|
|
OK mpi henning blum
|
|
the routing table.
However, if -d is provided route monitor lists all interfaces and
their associated addresses and exits. This is confusing, unexpected
and no longer needed (if ever).
Make -d a proper no-op for route monitor and get rid of the interfaces
function which didn't use the correct sysctl idiom anyway.
OK benno
|
|
mpi.
Remaining differences are pledge and priority handling which only
route(8) has.
While here switch flushroutes to get_sysctl() function.
OK benno
|
|
* avoid double lookups for unresolvable names without -net
* more fitting error message for unresolvable names after -net
OK florian@
|
|
one specified by the T flag. No need to pass a flag around if the
tableid is valid. It always is.
This code is now in sync between flushroutes() and p_rttables().
OK benno, no objection claudio
|
|
filtering by address family and / or priority; similar to what
p_rttables() is doing.
(At the time of writing we need to copy about 150MB for the whole
table on a router that is in the default free zone).
OK benno
|
|
While here make and to see that this is correct and not touching any
global state make af a local variable and pass it around.
Input & OK benno
|
|
1) after schwarze@'s rampage (thanks!) we can drop rpath since asr is no
longer opening /etc/networks behind our back
2) we have the "route" pledge for the NET_RT_DUMP sysctl so we can
pledge earlier in main; flushroutes() and p_rttables() now tighten the
pledge instead of being the first pledge
3) the pledge in monitor() was just a repeat of the main() pledge, it
can go.
OK schwarze, deraadt
|
|
of IFF* flags.
inputs from jmc@, ok bluhm@, visa@
|
|
|
|
Fix a regression introduced in previous.
|
|
matches the corresponding RTM_GET request.
Based on a submission from Julien Dhaille, ok bluhm@
|
|
autodetect AF when setting inet6 default route
From Denis Fondras, thanks!
ok phessler@ bluhm@
it breaks with ipv6 link-local routes, e.g.
/sbin/route -inet6 default -ifp pppoe0 fe80::%pppoe0
found by jmc@
ok florian
|
|
From Denis Fondras, thanks!
ok phessler@ bluhm@
|
|
from Denis Fondras, positive feedback from sthen@ and deraadt@
ok jca@
|
|
Pointed out by florian@.
ok bluhm@
|
|
Pointed out by & ok bluhm
While here print prefixlen with %u, pointed out by bluhm, too.
|