Age | Commit message (Collapse) | Author |
|
|
|
aware of them.
Original commit message was:
Reserve the highest route priority for kernel-managed routes and prevent
userland from playing with the local and broadcast flags.
ok claudio@
|
|
Even if in the end we would like to be more strict about what userland
can do with kernel-managed route entries, most of the tools out there
are not yet ready for this. Since RTF_LOCAL routes are for the moment
just like RTF_LLINFO routes without expire timer, allow userland tools
to remove/modify them. In case they are missing, the good old cloning
mechanism will recreate what you need.
bluhm@ and deraadt@ agree.
|
|
after discussions with beck deraadt kettenis.
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
new gateway for RTM_CHANGE if the route is not a multipath route.
Fixes issues found by benno@, OK benno@
|
|
of rn_delete was changed). The mpath code gets a much better
rn_mpath_next() function that allows looping through the dupedkey list
based on prio, any or only active routes. This solves the issues seen
with failed deletes of down routes.
Commit this now so that it gets tested. Both sthen@ and blambert@ agree.
|
|
userland from playing with the local and broadcast flags.
ok claudio@
|
|
Tree.
Since interfaces only support one link-layer address accessible via the
if_sadl member, there's no need to have it elsewhere. This improves
various address lookups because the first element of the list, the link-
layer address, won't necessarily be discarded.
Finally remove the empty netmask associated to every link-layer address.
This hack was needed to (ab)use the address & netmask comparison code to
do a strcmp() on the interface name embedded in the sdl_data field.
ok henning@, claudio@
|
|
This pointer was only needed by rt_getifa() to find an address, so
turn it into a local variable.
ok henning@, bluhm@
|
|
coherent with the existing rtable_* functions and document it.
While here fix some other manpage glitches pointed out by jmc@.
|
|
to a route entry, no need to do the work twice.
This chunk should have been deleted when post-4.4BSD changes from BSD/OS
4.2 were merged more than 10 years ago.
While here properly indent the following block.
tested by chris@, ok krw@
|
|
link-layer address of an interface. This ugly structure is used
to export the interface's name and index, not only the link-layer
address as its name might suggest.
So instead reaching this descriptor by forcing and abusing the
position of the link-layer "struct ifaddr" in the per-interface
list, use the if_sadl pointer directly.
ok mikeb@, henning@
|
|
function call. Name sockaddr_rtlabel variable sa_rl everywhere.
OK mpi@ claudio@
|
|
ok bluhm claudio
|
|
now cause a EINVAL. The RTA_GENMASK and RTAX_GENMASK defines are kept for
compatibility reasons.
OK benno@ and agreed by dlg@
|
|
ok claudio@, henning@
|
|
5.5 release.
OK claudio@
|
|
to set multipath routes. So since more then 2 month multipath was broken.
|
|
sprinkle 0 -> NULL where obvious
ok millert mpi
|
|
|
|
alignment architectures. Use m_copydata() instead of mtod().
OK deraadt@
|
|
to 64 bit. Increase the routing message version from 4 to 5. Add
a small compatibility layer that allows to set routes with old user
land and new kernel. Old kernel with new user land does not work.
The compatibility layer ist not perfect, but it allows to configure
addresses with old ifconfig and new kernel. Route get also works
in this setup. dhclient hangs as messages for interface address
changes with old version are not generated.
OK claudio@
|
|
OK henning@
|
|
rtm_flags and rtm_fmask do not change flags that are kernel specific (e.g.
RTF_CLONED). OK henning@
|
|
ok krw@, mikeb@
|
|
Discovered & fix tested by Peter J Philip.
ok claudio@ blambert@
|
|
ok claudio mpi
|
|
check for the reference counter.
ok mikeb@, miod@, pelikan@, kettenis@, krw@
|
|
ok claudio@
|
|
to a radix_node struct.
The radix tree pushdown continues.
ok claudio@
|
|
returns radix_node pointers, inside a new rt_mpath_next, which accepts
and returns rtentry pointers, and start using that instead.
ok claudio@
|
|
ok claudio@
|
|
userland a chance to compare the value against getpid().
This unbreaks transmission for me. OK deraadt@, guenther@
|
|
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
|
instead of coming at it sideways to detect failure.
ok claudio@
|
|
a desync to be appended when the socket buffer becomes full, rather than
continuall retrying until space becomes available (which may be never).
ok claudio@
|
|
ok claudio@
|
|
|
|
rtfree(rt). Without this the sp_protocol on RTM_DELETE is garbage
and rtsocket user that restrict the AF of the socket (like ospfd)
will not see a single one of the RTM_DELETE.
OK henning@, dlg@
|
|
|
|
rejects because of bad encoding. Userland processes trust that the
messages on the rtsock are correctly encoded. Moved some checks up
to do the suser() check as soon as possible.
After discussion with deraadt@, OK deraadt@ and sthen@ (earlier version)
|
|
only get messages that are for the rtable the process is bound to.
Depending on the rtm_type the rdomain or rtable id are used for
comparison. It is possible to change the filter with a setsockopt(s,
AF_ROUTE, ROUTE_TABLEFILTER,...) and if set to RTABLE_ANY the filter
is deactivated. Additionally set the tableid in struct if_msghdr
to the rdomain id and use the process rtableid in the sysctl if no
table was specified.
OK henning@
|
|
information if the gateway changes, since real MPLS routes need to
change gateway and outgoing label on topology changes. So if there is
MPLS information and an outgoing label do a proper change but if the
gateway of a non-MPLS route is changed remove the MPLS path since it is
no longer valid.
OK michele@
|
|
ok claudio@
|
|
rtsock code can return a more reasonable error to the user.
OK henning
|
|
up to the declaration.
|
|
Learned the hard way. dlg@ confirmed that it is save to just remove them,
the desync will still work but the reader needs to dequeue all packets first.
|
|
condition that prevents us from queuing it, which in turn means that
processes listening on the routing socket for changes to the kernel state
will get out of sync. currently this is handled by the following comment:
/* should notify about lost packet */
this change introduces a new rtsock message called RTM_DESYNC that
notifies about lost packets and uses it instead of this comment.
when we detect loss we flush all the message in the routing socket and
attempt to queue an RTM_DESYNC message instead. to guarantee that we will
enqueue DESYNC we keep trying it when an attempt to enqueue or dequeue
any messages is made, and in the worst case a timeout tries to guarantee
that desync is added to the socket.
ive been running this in production for 2 or 3 weeks.
tested by sthen@
ok sthen@ claudio@ deraadt@
code written by andrew sallaway at the univeristy of queensland.
|
|
actually have a protocol/address family set. Messages like RTM_IFINFO or
RTM_IFANNOUNCE are family independent and should not be filtered but
it is possible to use a ROUTE_MSGFILTER to filter these messages.
This allows to reduce the messages sent to AF_INET or AF_INET6 only daemons.
OK henning@, deraadt@
|