| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
These are the last ones in if_pppoe.c and if_spppsubr.c.
OK beck
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simply reuse struct size or buffer length variables for free() the very
same way they are used with malloc(), often within the same scope and/or
only a few lines above.
This leaves only a few selected free() calls with size zero in due to the
fact that there is currently no variable to keep track of name and secret
string lengths.
OK mvs
|
|
|
|
|
|
| |
Unused since r1.138 from 2015: "remove cisco hdlc code from sppp(4)".
OK mpi
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
|
|
| |
"new" API.
ok dlg@ tobhe@
|
|
|
|
| |
found by Ilja Van Sprundel; OK deraadt@ dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this follows what's been done for detach and link state hooks, and
makes handling of hooks generally more robust.
address hooks are a bit different to detach/link state hooks in
that there's only a few things that register hooks (carp, pf, vxlan),
but a lot of places to run the hooks (lots of ipv4 and ipv6 address
configuration).
an address hook cookie was in struct pfi_kif, which is part of the
pf abi. rather than break pfctl -sI, this maintains the void * used
for the cookie and uses it to store a task, which is then used as
intended with the new api.
|
|
|
|
|
|
|
|
|
|
| |
Re-challenge timeouts are made up of single scalar factors which are
multiplied with the time unit lcp.timeout to compute the timeout period.
Simply reduce that unit of 1 * hz [ticks] to 1 [s] and use the appropiate
API.
OK mpi
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of masking the difference between lower and upper bound to yield
a random summand that fits, instruct the API to limit their result
accordingly. 0x01fe = 510 = 810 - 300.
arc4random_uniform(upper_bound) returns `upper_bound - 1' as maximum, so
add one to make 810 a possible value for `i'.
OK deraadt
|
| |
|
|
|
|
| |
OK claudio semarie
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rtable_walk(9) now passes a routing entry back to the caller when
a non zero value is returned and if it asked for it.
This allows us to call rtdeletemsg()/rtrequest_delete() from the
caller without creating a recursion because of rtflushclone().
Multicast code hasn't been adapted and is still possibly creating
recursions. However multicast route entries aren't cloned so if
a recursion exists it isn't because of rtflushclone().
Fix stack exhaustion triggered by the use of "-msave-args".
Issue reported by Dániel Lévai on bugs@ confirmed by and ok bluhm@.
|
|
|
|
|
|
|
| |
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
|
|
|
|
|
| |
SIOCGIF{HARD,}MTU are handled by ifioctl() and not passed down to
drivers.
ok visa@
|
|
|
|
|
|
|
|
| |
sppp_update_ip6_addr() became the last user of n6_are_prefix_equal().
Since it compares /128 prefixes it doesn't need all the bells and
whistles and can be converted to a memcmp. Remove the now unused
n6_are_prefix_equal().
OK bluhm, mpi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sppp_output has the following comment:
"Don't choke with an ENETDOWN early. It's possible that we just
started dialing out, so don't drop the packet immediately. If we
notice that we run out of buffer space below, we will however remember
that we are not ready to carry IPv6 packets, and return ENETDOWN, as
opposed to ENOBUFS."
A later revision of the code just returned ENOBUFS anyway, ignoring
the rv variable that might have ENETDOWN instead, turning rv into an
unused variable.
Coverity CID 1299246; Severity: Minor
OK sthen@
|
|
|
|
| |
Tested by Hrvoje Popovski, ok bluhm@
|
|
|
|
| |
Pointed out by tom@
|
|
|
|
|
|
|
|
| |
pointless "ip = NULL; if (ip) ..." sequence.
Coverity CID 1453286; Severity: Minor
OK sthen@ tom@
|
|
|
|
|
|
|
|
| |
Always call getmicrouptime(&tv) to avoid an "Uninitialized scalar variable".
Coverity CID 1453266; Severity: Insignificant
OK deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I introduced this bug in 2015 but the splsoftnet()/splx() dance in the
upper layer masked it. Pseudo drivers generally don't need any splnet()
protection.
Found by Mark Patruck and Andrei-Marius Radu since the NET_LOCK() no longer
raise any IPL.
Strangely jsg@ confirmed that cppcheck nor coccinelle found the missing splx().
ok kettenis@, sthen@, deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Any address within the range 0.0.0.1 - 0.0.0.255 can now be used.
This allows for multiple pppoe(4) interfaces with dynamic addresses within
the same routing table. Which used to work before OpenBSD 5.8, but since 5.8
only one interface in a routing table can use destination address 0.0.0.1.
Problem first reported by Steve (fiverings04 at australian yahoo) on misc@.
I ran into it on an EdgeRouter lite which is supposed to serve two ADSL lines.
ok sthen@ mpi@
man page help from jmc@ for an earlier variant of this change
|
|
|
|
|
|
|
| |
This will help transitionning to an un-KERNEL_LOCK()ed IP
forwarding path.
Disucssed with bluhm@, ok claudio@
|
|
|
|
| |
OK jsg@
|
|
|
|
| |
rectification.
|
|
|
|
| |
no functional change (unfortunately)
|
|
|
|
|
|
| |
them.
ok claudio@
|
|
|
|
| |
OK visa@ mpi@
|
|
|
|
|
|
| |
for IPv4.
Assert reported and diff tested by semarie@
|
|
|
|
|
|
|
|
|
|
|
| |
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.
This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.
Inputs from and ok bluhm@, ok dlg@
|
|
|
|
| |
it just schedule a task.
|
|
|
|
|
|
|
|
|
| |
to create and change the dynamic route. This behavior was introduced
in net/route.c rev 1.269 when the gateway route allocation was moved
from rt_setgateway() to _rtalloc(). So rtrequest(RTM_ADD) could
return a route without a valid gateway route. To fix this, call
rt_setgwroute() from _rtalloc() and rt_setgateway().
OK mpi@
|
|
|
|
|
|
| |
new "llprio" setting on the pppoe(4) interface instead.
Tested by Daniel Gillen and myself, ok mikeb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
priority. This is translated into an 802.1p priority tag when
sent over a vlan interface, reducing the risk of them being
crowded out by data packets on a busy link.
Some users have problems with ISPs that place specific
requirements on vlan priority (typically the packet header
value must be '0', relating to priority 1). This diff
doesn't fix that yet, but gives a single place to patch
to change tags on control packets without affecting
normal vlan priority operation on other interfaces.
ok mikeb.
|
|
|
|
|
|
|
|
|
|
|
| |
callbacks return EAGAIN if they modify the routing table. While we're here,
simplify life for rtable_walk callers by moving the loop that restarts the
walk on EAGAIN into rtable_walk itself.
Flushing cloned routes on interface state changes becomes a bit more
inefficient, but this can be improved later.
ok mpi@ dlg@
|
|
|
|
|
|
|
|
|
| |
bug introduced in r1.138.
Reported at https://twitter.com/DarkSoul4242/status/722365165262405633
(twitter is *NOT* the place to report bugs!) and in
https://marc.info/?l=openbsd-bugs&m=145988918010707&w=2,
pointed out by tb@
|
|
|
|
|
|
|
|
|
|
|
| |
The EBUSY hack imposes an order on the ifconfig commands issued
against the pppoe interface used to configure the sppp layer below.
To counter this we use the ENETRESET trick that other drivers use
to tell the pppoe layer that sppp has requested a stop/init reset
sequence to proceed which we oblige with in case pppoe is UP and
RUNNING.
Tested by semarie@ and Jan Schreiber <jes@posteo.de>, thanks!
|
| |
|
|
|
|
|
|
|
| |
support for sppp with framing, simplifying things. Remove unused ifdefs while
there.
"sppp will go away before it gets used for something else" dlg@
|
|
|
|
|
|
|
|
|
|
|
| |
once you enqueue an mbuf, you no longer own it. therefore you cant
read the length out of it. this reads the length first, then tries
to enq it.
also, call if_start instead of a bare call to the underlying start
routine.
ok mpi@ sthen@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hop route as invalid.
Previously when such entrie was returned by rtalloc(9) a second route
lookup was done in rt_checkgate() very late in the journey of a packet.
In other words a single rtalloc(9) call can now result in multiple
route lookups if a RTF_GATEWAY entry is returned.
This is a step towards always calling L2 output functions with valid
destination information.
Tested by various including jmc@, naddy@, Hrvoje Popovski
|
| |
|
|
|
|
|
|
|
|
|
| |
L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''. Not having to care about an ``ifa'' makes our life easier
in our MP effort. Fewer dependencies between data structures implies
fewer headaches.
Discussed with bluhm@, ok claudio@
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because
IFQ_ENQUEUE() already does it. Oops.)
After this revert, the situation becomes:
- if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but
it is not shown to userland, and
- if_data.ifi_oqdrops is shown to userland, but it is not incremented by
anyone.
|
|
|
|
|
|
| |
mpi@ plans to clean-up IF_DROP()'s, but fix consistent use of it for now.
OK dlg@
|
|
|
|
| |
the rest was done in r1.96. ok mikeb@
|
|
|
|
|
| |
ppp framing, and the drivers for sync serial cards have been removed so the
sppp code is now only used to support pppoe(4). ok mpi@, kill it chris@
|