Age | Commit message (Collapse) | Author |
|
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@
|
|
waiting for the flight home from m2k14. ok reyk
|
|
Also making the size 32k + some extra is not very helpful since we don't
do something like zerocopy or sendfile. Just go back to 32768 and we can
bikeshed over the right value later on once we have features that benefit
from it. OK mpi@
|
|
in the case where the rdomain was not switched. Make sure ifa_add() is
only called if ifa_del() was called previously. Hopefully we got all the
corruption fixed.
With and OK mpi@
|
|
Requested by claudio@
|
|
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@
|
|
instead of relying on hacks in nd6_rtrequest() to add a route to
loopback for each address configured on such interfaces.
While here document that abusing lo0 for local traffic is not safe
for interfaces in a non-default rdomain.
Tested by claudio@, jca@ and sthen@, ok sthen@
|
|
just to set it to IFT_L2VLAN right afterwards, just to set if_type
to the parent's if_type which can be anything as long as it is IFT_ETHER
at config time doesn't make any sense and has zero effect. stop fiddling
with if_type alltogether.
also remove a question in a comment that has been answered by the last 14
years.
from Marrakesh airport, ok reyk
|
|
The variable would have no effect unless you use hilit19.el from
emacs21, and even there the specified value has not been kept up to date
with the file growth.
|
|
interface, I suggest you have a look at the link-layer sockaddr
interface:
/*
* A Link-Level Sockaddr may specify the interface in one of two
* ways: either by means of a system-provided index number (computed
* anew and possibly differently on every reboot), or by a human-readable
* string such as "il0" (for managerial convenience).
[...]
*/
ifa_ifwithnet() was not only checking for the sdl_index in order
to get the corresponding ifp for AF_LINK sockaddr, it was also
iterating over all the addresses on your system! But in this
case, the `address' field of "struct sockaddr_dl" is an interface
name set by link_addr(3).
How can this work? Well because the kernel allocates an empty
`netmask' field for each interface's lladdr, so that you can
abuse a network comparison function to reimplement strcmp(3)...
So when the userland does not specify an interface index, try
harder to see if it passed an ifp name, but at least be explicit
and use ifunit().
Found the hard way by/ok sthen@
|
|
This pointer was only needed by rt_getifa() to find an address, so
turn it into a local variable.
ok henning@, bluhm@
|
|
|
|
tree. ok henning@
|
|
crazyness only.
|
|
ok pelikan@, henning@
|
|
can be given to ifa_ifwithnet().
Handle this specific case directly and let ifa_ifwithnet() do only
one thing: iterate on all the addresses of all the interfaces in a
given routing domain to return the most specific matching address.
ok mikeb@
|
|
ok gcc & md5 (aka no binary change)
|
|
on al already ass embed ethernet frame, which meant:
-copy (most of) the existing ethernet header into a ether_vlan_header
on the stack
-fill the extra fields in ether_vlan_header
-set the ether type
-m_adj() to make room for the extra space ether_vlan_header needs
-m_copyback the ether_vlan_header into the mbuf
that involves moving data around, which isn't all that cheap.
cleaner & easier to have ether_output prepend the ether_vlan_header instead
of the regular ethernet header, which makes the vlan tagging essentially
free in most cases.
help & ok reyk, naddy; waste of time bikeshedding tech@
|
|
the pseudo_AF_HDRCMPLT case, ok claudio reyk
|
|
|
|
ever used to pass on uint32 (for ipsec). stop that madness and just pass
the uint32, 0 in all cases but the two that pass the ipsec flowinfo.
ok deraadt reyk guenther
|
|
ok gcc & md5 (alas, no binary change)
|
|
ok claudio reyk
|
|
carp_rewrite_lladdr to overwrite the src lladdr, get the intended src
lladdr before assembling the ethernet header.
carp_rewrite_lladdr -> carp_get_srclladdr
ok reyk claudio
|
|
src lladdr just to copy it from the esrc buffer into the ethernet header
a few lines later, use an esrc pointer to figure out where to copy the
src lladdr from. ok claudio reyk
|
|
RB lookup tree because the rdomain id is part of the lookup key.
Without this the RB tree gets corrupted and in the worst case a use after
free can happen when the interface is destroyed.
Why the sadl addresses are added to the tree in the first place is something
to reconsider.
OK henning@, mpi@, sthen@
|
|
|
|
|
|
keep ifqueue and ifaltq in sync is gone and thus the comment obsolete,
and finally there is no more need to include if_altq.h either
|
|
|
|
|
|
while there, get rid of the altq ioctls and assciated now obsolete code
|
|
|
|
convince ourselves that that was right to begin with. anyway, begone.
|
|
out the entire codepath is unreachable. glad I'm not our ppp maintainer, he
has work to do.
kill that unreachable code, with & ok claudio
|
|
big WTF regarding the fastq use there while verifying w/ claudio, but
that's for the ppp maintainer and unrelated
|
|
file becoming readable increase.
|
|
* altq for loop is just for debugging.
* only used when called for loop interface (not for
* a simplex interface).
*/
bye bye!
|
|
|
|
|
|
ok benno lteo naddy (back in january)
|
|
Avoid the confusion by using an appropriate name for the variable.
Note that since routing domain IDs are a subset of the set of routing
table IDs, the following idiom is correct:
rtableid = rdomain
But to get the routing domain ID corresponding to a given routing table
ID, you must call rtable_l2(9).
claudio@ likes it, ok mikeb@
|
|
`sc_rtableid' into `sc_rdomain'. No functional change.
ok reyk@
|
|
With r1.160 route.c needs #include <net/if_dl.h> because bsd.rd and
friends don't pull in netmpls/mpls.h which is how bsd[.mp] get it.
ok deraadt@ guenther@
|
|
function should not deal with link-layer addresses and here there's
no reason to do it.
ok mikeb@
|
|
connected routes to prefixes/hosts.
Since the introduction of rt_ifa_addloop(9) and rt_ifa_delloop(9),
rtinit() was just a wrapper, so use the underlying functions
directly and document them.
Inputs from and ok mikeb@, manpage tweaks from jmc@
|
|
in pppxopen(). ok dlg@ yasuoka@
|
|
|
|
panic with pppx when using npppd with multiple pppx devices.
This is triggered when pppxclose() is called on device that hasn't
been opened causing a NULL dereference and panic. Avoid
this by returning ENXIO if the device has not been opened.
ok yasuoka@
|
|
Move these functions to a more generic place and make them reuse
existing code, they'll be soon used in IPv4 too.
Tested by André Lucas, Vigdis and sthen@, thanks!
ok sthen@
|