Age | Commit message (Collapse) | Author |
|
|
|
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@
|
|
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
|
|
rt_if_remove_rtdelete() need to know the table id to be able to correctly
remove nodes.
Problem found by Andrea Parazzini and analyzed by Martin Pelikán.
OK henning@
|
|
only the MPLS bits from a route set rtm_fmask to RTF_MPLS. Additionally check
if the nexthop is modified and in that case always remove the MPLS info since
the path changed. This change makes life in userland a lot easier since the
routing daemons normaly don't know about MPLS and until now they destroyed
MPLS information when issuing RTM_CHANGEs.
OK michele@
|
|
and rdomainid are returned. This is necessary to know where L2 information
of a table is stored (which will be needed soon by bgpd).
Also while there change the errno for non-existing routing tables to ENOENT.
'Fine' deraadt@
|
|
OK michele@
|
|
rt_newaddrmsg(). Makes the routing daemons a bit less confused when
interfaces are reconfigured.
|
|
rt_if_linkstate_change() needs to be rerun for this route and the
resulting rt_flags need to copied to the rtm_flags for userland.
Problem found and diagnosed by Doran Mori. OK henning@, jsing@
|
|
tables on top of a rdomain) but until now our code was a crazy mix so that
it was impossible to correctly use rtables in that case. Additionally pf(4)
only knows about rtables and not about rdomains. This is especially bad when
tracking (possibly conflicting) states in various domains.
This diff fixes all or most of these issues. It adds a lookup function to
get the rdomain id based on a rtable id. Makes pf understand rdomains and
allows pf to move packets between rdomains (it is similar to NAT).
Because pf states now track the rdomain id as well it is necessary to modify
the pfsync wire format. So old and new systems will not sync up.
A lot of help by dlg@, tested by sthen@, jsg@ and probably more
OK dlg@, mpf@, deraadt@
|
|
The RTM_VERSION bump is 2 years ago and so there is no need for this.
Diff made by tedu@ some time ago but got never commited so I do it now.
|
|
routing message. We can then rely on that flag to spot out
MPLS routes coming from routing socket.
ok claudio@
|
|
of code between cases, so stop pretending otherwise, and move the
if() dance to a switch, as is done in every other pr_usrreq I'm aware of.
ok claudio@ michele@
|
|
malloc()ing it and calling that macro.
No functional change, just tightening things up a bit.
ok claudio@ michele@
|
|
While here, fix whitespace (spaces -> tabs) issue spotted by michele@
ok michele@, claudio@
|
|
ok henning@
|
|
alternate routing table and separate them from other interfaces in distinct
routing tables. The same network can now be used in any doamin at the same
time without causing conflicts.
This diff is mostly mechanical and adds the necessary rdomain checks accross
net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6.
input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
|
|
not smart enough to handle it in a sensible way. Make sure the kernel
selected routing priority is actually exported to userland or to help
daemons like bgpd to keep correctly track of the routes. This should fix
some of the rather strange errors seen by people having multipath routes
on their bgpd boxes. While there make the interface priority inheritance
on static routes work again.
OK henning@
|
|
refcnt bump caused the panic to be triggered. While there also make the
priority so that the compare is working a bit better.
henning@ cries in agony (I already gave up)
|
|
It is now possible to change routes' MPLS parameters via route change.
ok laurent@, ok and input claudio@
|
|
Switch the padding field into a MPLS one in rt_msghdr to store
relevant informations.
OK claudio@ laurent@
|
|
We can now act as edge node and allow ipv4 packets to
enter a Label Switched Path and not just forwarding
MPLS packets.
OK claudio@
|
|
actually a bitfield -- of routing messages a listener is interested in.
This list can be changed with a setsockopt(s, AF_ROUTE, ROUTE_MSGFILTER, ...)
call. OK henning@, dlg@
|
|
Now it contains just the label as it must be.
This introduces a ugly hack in rtentry that will be removed
as soon as possible.
OK claudio@
|
|
routes are added via route(8) -- those where added with the wrong priority
and so where not correctly tracked later on.
Found and tested by gollo@
|
|
the rtm_priority with RTP_MASK so that userland (e.g. arp) can issue a RTM_GET
and reissue the message as RTM_DELETE.
|
|
callers (plus an upcomming one). OK henning@, dlg@
|
|
not only over routes of the same prio. This makes it possible to modify
rt_mpath_matchgate() so that if only gateway is specified without a specific
priority it will scan the full list and not only the first routes.
This is also needed for upcoming link state tracking.
|
|
soon.
|
|
route prios. playing safe for 4.4-release, as not all parts of the system
deal correctly with route prios yet. ok claudio
|
|
ensure that the next message is nicely aligned as well. Some archs (sparc, m88k)have strict alignement issues since the inclusion of 64bit counters in the
messages because those values could end up on non aligned addresses.
Found and fix tested by miod@, OK deraadt@
|
|
can not supply the correct nexthop if the nexthop is changed. So if the
route we want to change is a non-multipath one allow the change to succeed.
This unbreaks RTM_CHANGE in most situations. Found by jsing@ Ok henning@
|
|
it once at start instead.
|
|
get hung in nfs_reconnect() because they do not have the proper
privilages to bind to a socket, by adding a struct proc * argument
to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind)
and do the sobind() with proc0 in nfs_connect.
OK markus@, blambert@.
"go ahead" deraadt@.
Fixes an issue reported by bernd@ (Tested by bernd@).
Fixes PR5135 too.
|
|
and the one route with the lowest number wins. This will be used by the
routing daemons to resolve the synchronisations issue in case of conflicts.
The nasty bits of this are in the multipath code. If no priority is specified
the kernel will choose an appropriate priority.
Looked at by a few people at n2k8 code is much older
|
|
MPLS support partly based on the (abandoned?) AYAME project.
Basic LSR (Label Switch Router) functionality is present, but not fully
functional yet.
It is currently possible to insert entries in the LIB (Label Information Base)
with route(8), but setting the operation type is not supported yet.
Imported to allow more people to work on this in the coming weeks.
ok claudio@ laurent@ dlg@
|
|
-remove useless casts
-MALLOC/FREE -> malloc/free
-use M_ZERO where appropriate instead of seperate bzero
feedback & ok krw, hshoexer
|
|
unbreaks RTM_GET. Problem reported by fkr@
|
|
By doing so we ensure that all the memory is initialised and we no longer
have to ensure that none of the structure elements is forgotten in
sysctl_iflist() and sysctl_dumpentry().
This solves the route flush issues seen by aanriot@
OK henning@
|
|
to access uninitialised memory.
Set dst to 0 on error, the error path tries to access dst but dst is inited
later down the code. This fixes a kernel panic seen by aanriot@
OK henning@
|