OpenBSD CVS

CVS log for src/sys/net/if_spppsubr.c


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.193 / (download) - annotate - [select for diffs], Mon May 13 01:15:53 2024 UTC (4 weeks, 1 day ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.192: +1 -4 lines
Diff to previous 1.192 (colored)

remove prototypes with no matching function
ok mpi@

Revision 1.192 / (download) - annotate - [select for diffs], Fri Nov 10 15:51:24 2023 UTC (7 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.191: +2 -2 lines
Diff to previous 1.191 (colored)

Make ifq and ifiq interface MP safe.

Rename ifq_set_maxlen() to ifq_init_maxlen().  This function neither
uses WRITE_ONCE() nor a mutex and is called before the ifq mutex
is initialized.  The new name expresses that it should be used only
during interface attach when there is no concurrency.

Protect ifq_len(), ifq_empty(), ifiq_len(), and ifiq_empty() with
READ_ONCE().  They can be used without lock as they only read a
single integer.

OK dlg@

Revision 1.191 / (download) - annotate - [select for diffs], Sun Jan 2 22:36:03 2022 UTC (2 years, 5 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.190: +2 -2 lines
Diff to previous 1.190 (colored)

spelling
ok jmc@ reads ok tb@

Revision 1.190 / (download) - annotate - [select for diffs], Wed Nov 17 18:00:24 2021 UTC (2 years, 6 months ago) by bket
Branch: MAIN
Changes since 1.189: +18 -1 lines
Diff to previous 1.189 (colored)

Display DNS information from sppp(4) in ifconfig(8)

Behaviour is similar to that of umb(4).

OK kn@

Revision 1.189 / (download) - annotate - [select for diffs], Wed Nov 10 20:24:22 2021 UTC (2 years, 7 months ago) by bket
Branch: MAIN
Changes since 1.188: +2 -2 lines
Diff to previous 1.188 (colored)

Give sppp(4) its own RTP_PROPOSAL priority

OK semarie@

Revision 1.188 / (download) - annotate - [select for diffs], Wed Nov 10 15:04:26 2021 UTC (2 years, 7 months ago) by bket
Branch: MAIN
Changes since 1.187: +103 -8 lines
Diff to previous 1.187 (colored)

sppp(4) - support PPP IPCP extensions for DNS

RFC 1877 extends the family of network control protocols for
establishing and configuring the IPCP over PPP, defining the negotiation
of primary and secondary DNS addresses. After negotiation,
rtm_proposal() is used to send out DNS updates.

Feedback from claudio@ and kn@.

OK claudio@, kn@

Revision 1.187 / (download) - annotate - [select for diffs], Sat Sep 12 13:44:38 2020 UTC (3 years, 8 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.186: +15 -9 lines
Diff to previous 1.186 (colored)

Add sizes to free() calls

These are the last ones in if_pppoe.c and if_spppsubr.c.

OK beck

Revision 1.186 / (download) - annotate - [select for diffs], Sat Aug 22 16:12:12 2020 UTC (3 years, 9 months ago) by kn
Branch: MAIN
Changes since 1.185: +23 -21 lines
Diff to previous 1.185 (colored)

Add sizes to free() calls

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

Revision 1.185 / (download) - annotate - [select for diffs], Fri Aug 14 12:17:34 2020 UTC (3 years, 9 months ago) by kn
Branch: MAIN
Changes since 1.184: +1 -2 lines
Diff to previous 1.184 (colored)

Zap LOOPALIVECNT

Unused since r1.138 from 2015: "remove cisco hdlc code from sppp(4)".

OK mpi

Revision 1.184 / (download) - annotate - [select for diffs], Fri Jul 10 13:26:42 2020 UTC (3 years, 11 months ago) by patrick
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@

Revision 1.183 / (download) - annotate - [select for diffs], Fri Jul 10 13:23:34 2020 UTC (3 years, 11 months ago) by patrick
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

Change users of IFQ_PURGE() to use the "new" API.

ok dlg@ tobhe@

Revision 1.182 / (download) - annotate - [select for diffs], Fri Jul 10 13:22:22 2020 UTC (3 years, 11 months ago) by patrick
Branch: MAIN
Changes since 1.181: +2 -2 lines
Diff to previous 1.181 (colored)

Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use the
"new" API.

ok dlg@ tobhe@

Revision 1.174.6.1 / (download) - annotate - [select for diffs], Thu Nov 14 18:07:27 2019 UTC (4 years, 6 months ago) by bluhm
Branch: OPENBSD_6_5
Changes since 1.174: +3 -1 lines
Diff to previous 1.174 (colored) next main 1.175 (colored)

Only root is allowed to set the WEP key.  Add an suser() check to
enforce this for the an(4) wireless network device.
found by Ilja Van Sprundel; from bluhm@; OK dlg@ deraadt@ mpi@

SIOCDVNETID mutates state, so should only be run by root.
found by Ilja Van Sprundel; from dlg@; OK deraadt@ mpi@ bluhm@

check for privileged bridges ioctls next to the other privileged ioctls.
there's now a bunch of drivers that implement the bridge ioctls,
but they're inconsistent at checking privilege. doing it up front
once means less code duplication, and more consistent application
of the checks.
found by Ilja Van Sprundel; from dlg@; OK bluhm@ deraadt@

unbreak ramdisks
from deraadt@

Non root user must not use ioctl(2) to mess around with the address
of a network interface.
from bluhm@; OK deraadt@ claudio@

Non root users must not set the parameters of pppoe(4) interfaces.
found by Ilja Van Sprundel; from bluhm@; OK deraadt@ dlg@

OpenBSD 6.5 errata 017

Revision 1.179.2.1 / (download) - annotate - [select for diffs], Thu Nov 14 18:06:29 2019 UTC (4 years, 6 months ago) by bluhm
Branch: OPENBSD_6_6
Changes since 1.179: +3 -1 lines
Diff to previous 1.179 (colored) next main 1.180 (colored)

Only root is allowed to set the WEP key.  Add an suser() check to
enforce this for the an(4) wireless network device.
found by Ilja Van Sprundel; from bluhm@; OK dlg@ deraadt@ mpi@

SIOCDVNETID mutates state, so should only be run by root.
found by Ilja Van Sprundel; from dlg@; OK deraadt@ mpi@ bluhm@

check for privileged bridges ioctls next to the other privileged ioctls.
there's now a bunch of drivers that implement the bridge ioctls,
but they're inconsistent at checking privilege. doing it up front
once means less code duplication, and more consistent application
of the checks.
found by Ilja Van Sprundel; from dlg@; OK bluhm@ deraadt@

unbreak ramdisks
from deraadt@

Non root user must not use ioctl(2) to mess around with the address
of a network interface.
from bluhm@; OK deraadt@ claudio@

Non root users must not set the parameters of pppoe(4) interfaces.
found by Ilja Van Sprundel; from bluhm@; OK deraadt@ dlg@

OpenBSD 6.6 errata 006

Revision 1.181 / (download) - annotate - [select for diffs], Wed Nov 13 10:15:10 2019 UTC (4 years, 6 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.180: +3 -1 lines
Diff to previous 1.180 (colored)

Non root users must not set the parameters of pppoe(4) interfaces.
found by Ilja Van Sprundel; OK deraadt@ dlg@

Revision 1.180 / (download) - annotate - [select for diffs], Fri Nov 8 07:16:29 2019 UTC (4 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

convert interface address change hooks to tasks and a task_list.

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.

Revision 1.179 / (download) - annotate - [select for diffs], Mon Jun 24 21:36:53 2019 UTC (4 years, 11 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE
Branch point for: OPENBSD_6_6
Changes since 1.178: +4 -4 lines
Diff to previous 1.178 (colored)

Use timeout_add_sec(9)

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

Revision 1.178 / (download) - annotate - [select for diffs], Sat Jun 22 20:15:09 2019 UTC (4 years, 11 months ago) by kn
Branch: MAIN
Changes since 1.177: +2 -2 lines
Diff to previous 1.177 (colored)

Make computation of re-challenge timeout more obvious

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

Revision 1.177 / (download) - annotate - [select for diffs], Sat Jun 22 10:16:14 2019 UTC (4 years, 11 months ago) by kn
Branch: MAIN
Changes since 1.176: +2 -2 lines
Diff to previous 1.176 (colored)

Revert accidentially committed hunk from previous

Revision 1.176 / (download) - annotate - [select for diffs], Sat Jun 22 10:14:30 2019 UTC (4 years, 11 months ago) by kn
Branch: MAIN
Changes since 1.175: +2 -3 lines
Diff to previous 1.175 (colored)

Remove duplicate initialisation

OK claudio semarie

Revision 1.175 / (download) - annotate - [select for diffs], Fri Jun 21 17:11:42 2019 UTC (4 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.174: +2 -2 lines
Diff to previous 1.174 (colored)

Prevent recursions by not deleting entries inside rtable_walk(9).

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@.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Branch point for: OPENBSD_6_5
Changes since 1.173: +2 -2 lines
Diff to previous 1.173 (colored)

Remove almost unused `flags' argument of suser().

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@

Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 20 09:35:09 2017 UTC (6 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.172: +1 -7 lines
Diff to previous 1.172 (colored)

Kill dead ioctl handlers.

SIOCGIF{HARD,}MTU are handled by ifioctl() and not passed down to
drivers.

ok visa@

Revision 1.172 / (download) - annotate - [select for diffs], Tue Aug 15 06:08:52 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored)

After we stopped processing router advertisements in the kernel
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

Revision 1.171 / (download) - annotate - [select for diffs], Mon Aug 14 08:33:55 2017 UTC (6 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.170: +2 -2 lines
Diff to previous 1.170 (colored)

Use the rv variable in sppp_output() as it was intended.

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@

Revision 1.170 / (download) - annotate - [select for diffs], Fri Aug 11 21:24:19 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.169: +11 -13 lines
Diff to previous 1.169 (colored)

Remove NET_LOCK()'s argument.

Tested by Hrvoje Popovski, ok bluhm@

Revision 1.169 / (download) - annotate - [select for diffs], Fri Aug 11 15:13:25 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

space after if.

Pointed out by tom@

Revision 1.168 / (download) - annotate - [select for diffs], Fri Aug 11 15:12:32 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.167: +4 -1 lines
Diff to previous 1.167 (colored)

Revision 1.139 accidentally removed an ip = mtod(), resulting in a
pointless "ip = NULL; if (ip) ..." sequence.

Coverity CID 1453286; Severity: Minor

OK sthen@ tom@

Revision 1.167 / (download) - annotate - [select for diffs], Fri Aug 11 13:23:27 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.166: +3 -2 lines
Diff to previous 1.166 (colored)

The timeval in sppp_input() is also used when the interface is not IFF_UP.

Always call getmicrouptime(&tv) to avoid an "Uninitialized scalar variable".

Coverity CID 1453266; Severity: Insignificant

OK deraadt@

Revision 1.166 / (download) - annotate - [select for diffs], Tue Aug 1 20:52:32 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.165: +3 -1 lines
Diff to previous 1.165 (colored)

Add missing splx().

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@

Revision 1.165 / (download) - annotate - [select for diffs], Fri Jun 16 10:58:43 2017 UTC (6 years, 11 months ago) by stsp
Branch: MAIN
Changes since 1.164: +2 -2 lines
Diff to previous 1.164 (colored)

In sppp(4), allow additional 'wildcard' addresses for the destination.
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

Revision 1.164 / (download) - annotate - [select for diffs], Tue May 30 07:50:37 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.163: +10 -17 lines
Diff to previous 1.163 (colored)

Introduce ipv{4,6}_input(), two wrappers around IP queues.

This will help transitionning to an un-KERNEL_LOCK()ed IP
forwarding path.

Disucssed with bluhm@, ok claudio@

Revision 1.163 / (download) - annotate - [select for diffs], Fri Apr 14 15:11:31 2017 UTC (7 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

Avoid some false positives with cppcheck.  No binary change.
OK jsg@

Revision 1.162 / (download) - annotate - [select for diffs], Tue Jan 24 10:08:30 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.161: +5 -5 lines
Diff to previous 1.161 (colored)

A space here, a space there. Soon we're talking real whitespace
rectification.

Revision 1.161 / (download) - annotate - [select for diffs], Sat Jan 21 05:36:33 2017 UTC (7 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.160: +15 -15 lines
Diff to previous 1.160 (colored)

remove some extra whitespace.

no functional change (unfortunately)

Revision 1.160 / (download) - annotate - [select for diffs], Fri Jan 20 00:51:56 2017 UTC (7 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.159: +1 -2 lines
Diff to previous 1.159 (colored)

No need to handle SIOCAIFADDR in drivers, it's never passed down to
them.

ok claudio@

Revision 1.159 / (download) - annotate - [select for diffs], Sun Jan 8 02:16:08 2017 UTC (7 years, 5 months ago) by bluhm
Branch: MAIN
Changes since 1.158: +5 -3 lines
Diff to previous 1.158 (colored)

When if_down() is called, sppp_keepalive() needs a NET_LOCK().
OK visa@ mpi@

Revision 1.158 / (download) - annotate - [select for diffs], Mon Jan 2 08:41:21 2017 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.157: +10 -11 lines
Diff to previous 1.157 (colored)

Grab the NET_LOCK() when setting an IPv6 address, just like it is done
for IPv4.

Assert reported and diff tested by semarie@

Revision 1.157 / (download) - annotate - [select for diffs], Mon Dec 19 08:36:49 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.156: +8 -8 lines
Diff to previous 1.156 (colored)

Introduce the NET_LOCK() a rwlock used to serialize accesses to the parts
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@

Revision 1.156 / (download) - annotate - [select for diffs], Wed Nov 16 14:25:19 2016 UTC (7 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.155: +2 -4 lines
Diff to previous 1.155 (colored)

if_link_state_change() doesn't need to be called under splsoftnet(),
it just schedule a task.

Revision 1.155 / (download) - annotate - [select for diffs], Mon Jul 11 13:06:31 2016 UTC (7 years, 11 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

Path MTU discovery was slightly broken.  I took two ICMP packets
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@

Revision 1.154 / (download) - annotate - [select for diffs], Tue Jun 14 20:44:43 2016 UTC (7 years, 11 months ago) by sthen
Branch: MAIN
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored)

Don't hardcode vlan/queue priority for pppoe packets; inherit it from the
new "llprio" setting on the pppoe(4) interface instead.

Tested by Daniel Gillen and myself, ok mikeb

Revision 1.153 / (download) - annotate - [select for diffs], Mon May 30 23:30:10 2016 UTC (8 years ago) by sthen
Branch: MAIN
Changes since 1.152: +3 -1 lines
Diff to previous 1.152 (colored)

Set pppoe(4) control frames to high (NC, "network control")
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.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Fri May 6 20:03:25 2016 UTC (8 years, 1 month ago) by sthen
Branch: OPENBSD_5_9
Changes since 1.149: +2 -2 lines
Diff to previous 1.149 (colored) next main 1.150 (colored)

MFC if_spppsubr.c r1.151

Remove a bogus "else" that was causing breakage with LCP echoes,
bug introduced in r1.138.

(specifically, when the line was quiescent we should have been sending
echoes, the bug caused this not to occur resulting in some unwanted
termination req's).

Revision 1.152 / (download) - annotate - [select for diffs], Mon May 2 22:15:49 2016 UTC (8 years, 1 month ago) by jmatthew
Branch: MAIN
Changes since 1.151: +2 -4 lines
Diff to previous 1.151 (colored)

Simplify life for routing table implementations by requiring that rtable_walk
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@

Revision 1.151 / (download) - annotate - [select for diffs], Sun May 1 14:08:39 2016 UTC (8 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.150: +2 -2 lines
Diff to previous 1.150 (colored)

Remove a bogus "else" that was causing breakage with LCP echoes,
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@

Revision 1.150 / (download) - annotate - [select for diffs], Mon Apr 18 14:38:09 2016 UTC (8 years, 1 month ago) by mikeb
Branch: MAIN
Changes since 1.149: +2 -15 lines
Diff to previous 1.149 (colored)

Remove the hack that prevents changing pppoe params at runtime.

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!

Revision 1.149 / (download) - annotate - [select for diffs], Mon Nov 23 14:41:05 2015 UTC (8 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE
Branch point for: OPENBSD_5_9
Changes since 1.148: +7 -2 lines
Diff to previous 1.148 (colored)

if_start needs splnet. help/ok dlg@

Revision 1.148 / (download) - annotate - [select for diffs], Fri Nov 20 12:05:34 2015 UTC (8 years, 6 months ago) by sthen
Branch: MAIN
Changes since 1.147: +27 -104 lines
Diff to previous 1.147 (colored)

sppp(4) is now only used for pppoe(4) which doesn't use framing, so remove
support for sppp with framing, simplifying things. Remove unused ifdefs while
there.

"sppp will go away before it gets used for something else" dlg@

Revision 1.147 / (download) - annotate - [select for diffs], Fri Nov 20 11:53:36 2015 UTC (8 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.146: +15 -13 lines
Diff to previous 1.146 (colored)

avoid a use after enqueue, which is like a use after free.

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@

Revision 1.146 / (download) - annotate - [select for diffs], Wed Nov 11 01:49:17 2015 UTC (8 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.145: +10 -27 lines
Diff to previous 1.145 (colored)

replace the ifqueue used for the pp_cpq with an mbuf_queue.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Nov 9 10:26:26 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.144: +3 -4 lines
Diff to previous 1.144 (colored)

Rewrite rtalloc(9) to consider RTF_GATEWAY entries without valid next-
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

Revision 1.144 / (download) - annotate - [select for diffs], Mon Nov 2 11:19:30 2015 UTC (8 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.143: +1 -21 lines
Diff to previous 1.143 (colored)

sppp_pick is unused, it can go away.

Revision 1.143 / (download) - annotate - [select for diffs], Sun Oct 25 11:58:11 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.142: +1 -3 lines
Diff to previous 1.142 (colored)

Introduce if_rtrequest() the successor of ifa_rtrequest().

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@

Revision 1.142 / (download) - annotate - [select for diffs], Sat Oct 24 11:58:46 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

Some rt_ifp to rt_ifidx conversions.

ok bluhm@

Revision 1.141 / (download) - annotate - [select for diffs], Mon Oct 5 19:05:09 2015 UTC (8 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.140: +2 -0 lines
Diff to previous 1.140 (colored)

Revert if_oqdrops accounting changes done in kernel, per request from mpi@.

(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.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Oct 5 15:52:46 2015 UTC (8 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.139: +1 -3 lines
Diff to previous 1.139 (colored)

Don't count IF_DROP()'ed packets as if_oerrors too.

mpi@ plans to clean-up IF_DROP()'s, but fix consistent use of it for now.

OK dlg@

Revision 1.139 / (download) - annotate - [select for diffs], Wed Sep 30 12:19:34 2015 UTC (8 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.138: +1 -15 lines
Diff to previous 1.138 (colored)

Remove remnants of sppp's special queue handling for telnet/rlogin/ftp,
the rest was done in r1.96.  ok mikeb@

Revision 1.138 / (download) - annotate - [select for diffs], Wed Sep 30 09:45:20 2015 UTC (8 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.137: +50 -279 lines
Diff to previous 1.137 (colored)

remove cisco hdlc code from sppp(4), it's no longer used - pppoe(4) only uses
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@

Revision 1.137 / (download) - annotate - [select for diffs], Mon Aug 24 15:58:35 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.136: +1 -4 lines
Diff to previous 1.136 (colored)

Rework the code to decide when to perform DAD to no longer rely on the
IN6_IFF_NODAD pseudo-flag not being set.

This was just a flag for spaghetti code that should not exist in the
first place.

Tested by sebastia@, ok sthen@

Revision 1.136 / (download) - annotate - [select for diffs], Sat Jul 18 15:51:16 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.135: +6 -10 lines
Diff to previous 1.135 (colored)

Abstract the routing table internals behind an rtable_* API.

Code abusing the radix internals for the routing table should now
includes <net/rtable.h> and only deal with "struct rtentry".

Code using a radix tree for another purpose can still include
<net/radix.h>.

Inputs from and ok claudio@, mikeb@

Revision 1.135 / (download) - annotate - [select for diffs], Tue Jun 30 13:54:42 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

Rename if_output() into if_enqueue() to avoid confusion with comments
talking about (*ifp->if_output)().

ok claudio@, dlg@

Revision 1.134 / (download) - annotate - [select for diffs], Tue Jun 16 11:09:39 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.133: +4 -4 lines
Diff to previous 1.133 (colored)

Store a unique ID, an interface index, rather than a pointer to the
receiving interface in the packet header of every mbuf.

The interface pointer should now be retrieved when necessary with
if_get().  If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.

Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.

Tested by jmatthew@ and krw@, discussed with many.

ok mikeb@, bluhm@, dlg@

Revision 1.133 / (download) - annotate - [select for diffs], Fri May 15 10:15:13 2015 UTC (9 years ago) by mpi
Branch: MAIN
Changes since 1.132: +6 -12 lines
Diff to previous 1.132 (colored)

Introduce if_output(), a function do to the last steps before enqueuing
a packet on the sending queue of an interface.

Tested by many, thanks a lot!

ok dlg@, claudio@

Revision 1.132 / (download) - annotate - [select for diffs], Fri Apr 10 13:58:20 2015 UTC (9 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.131: +6 -17 lines
Diff to previous 1.131 (colored)

replace the use of ifqueues for most input queues serviced by netisr
with niqueues.

this change is so big because there's a lot of code that takes
pointers to different input queues (eg, ether_input picks between
ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through
to code to enqueue packets against the pointer. if i changed only
one of the input queues id have to add sepearate code paths, one
for ifqueues and one for niqueues in each of these places

by flipping all these input queues at once i can keep the currently
common code common.

testing by mpi@ sthen@ and rafael zalamena
ok mpi@ sthen@ claudio@ henning@

Revision 1.131 / (download) - annotate - [select for diffs], Wed Mar 18 12:23:15 2015 UTC (9 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.130: +2 -3 lines
Diff to previous 1.130 (colored)

remove the congestion handling from struct ifqueue.

its only used for the ip and ip6 network stack input queues, so it
seems unfair that every instance of ifqueue has to carry a pointer
around for this specific use case.

this moves the congestion marker to a kernel global. if we detect
that we're congested, we assume the whole system is busy and punish
all input queues.

marking a system as congested is done by setting the global to the
current value of ticks. as the system moves away from that value,
it moves away from being congested until the comparison fails.

written at s2k15
ok henning@ beck@ bluhm@ claudio@

Revision 1.130 / (download) - annotate - [select for diffs], Tue Jan 27 03:17:36 2015 UTC (9 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.129: +12 -13 lines
Diff to previous 1.129 (colored)

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@

Revision 1.129 / (download) - annotate - [select for diffs], Fri Dec 19 17:14:39 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.128: +1 -15 lines
Diff to previous 1.128 (colored)

unifdef INET in net code as a precursor to removing the pretend option.
long live the one true internet.
ok henning mikeb

Revision 1.128 / (download) - annotate - [select for diffs], Fri Dec 5 15:50:04 2014 UTC (9 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored)

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@

Revision 1.127 / (download) - annotate - [select for diffs], Tue Nov 18 02:37:31 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.126: +1 -4 lines
Diff to previous 1.126 (colored)

move arc4random prototype to systm.h. more appropriate for most code
to include that than rdnvar.h. ok deraadt dlg

Revision 1.126 / (download) - annotate - [select for diffs], Wed Oct 8 20:28:27 2014 UTC (9 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.125: +2 -1 lines
Diff to previous 1.125 (colored)

print ipv6cp by name rather than number in "0x8057 output <...>" debug lines,
as already done for lcp/ipcp/pap/chap

Revision 1.125 / (download) - annotate - [select for diffs], Tue Jul 22 11:06:09 2014 UTC (9 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.124: +1 -2 lines
Diff to previous 1.124 (colored)

Fewer <netinet/in_systm.h> !

Revision 1.124 / (download) - annotate - [select for diffs], Sat Jul 12 18:44:22 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.123: +24 -24 lines
Diff to previous 1.123 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.123 / (download) - annotate - [select for diffs], Mon May 5 11:44:33 2014 UTC (10 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.122: +4 -2 lines
Diff to previous 1.122 (colored)

Use a custom ifa_rtrequest function for point-to-point interfaces
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@

Revision 1.122 / (download) - annotate - [select for diffs], Fri May 2 10:40:26 2014 UTC (10 years, 1 month ago) by jca
Branch: MAIN
Changes since 1.121: +1 -8 lines
Diff to previous 1.121 (colored)

Kill annoying and useless emacs local variable.  ok mikeb@

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.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Apr 19 12:12:02 2014 UTC (10 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.120: +1 -15 lines
Diff to previous 1.120 (colored)

all I wanted to do is removing the altq special casing, but then it turned
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

Revision 1.120 / (download) - annotate - [select for diffs], Mon Apr 14 09:06:42 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.119: +4 -4 lines
Diff to previous 1.119 (colored)

"struct pkthdr" holds a routing table ID, not a routing domain one.
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@

Revision 1.119 / (download) - annotate - [select for diffs], Thu Apr 3 06:06:56 2014 UTC (10 years, 2 months ago) by yasuoka
Branch: MAIN
Changes since 1.118: +13 -14 lines
Diff to previous 1.118 (colored)

It cannot be assumed the top of the mbuf chain has required length here.
Actually, since packets from Octeon's cnmac(4) don't have enough size,
pppoe(4) is unable to connect.

ok claudio

Revision 1.118 / (download) - annotate - [select for diffs], Tue Mar 18 10:47:34 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

Rename rt_gettable() into rtable_get(), swap its arguments to be
coherent with the existing rtable_* functions and document it.

While here fix some other manpage glitches pointed out by jmc@.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Jan 13 23:03:52 2014 UTC (10 years, 4 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.116: +15 -15 lines
Diff to previous 1.116 (colored)

Call all local valiables of type struct in6_ifaddr "ia6".  This is
consistent with struct ifaddr "ifa" and struct in_ifaddr "ia".
OK mpi@

Revision 1.116 / (download) - annotate - [select for diffs], Sun Jan 12 15:38:06 2014 UTC (10 years, 5 months ago) by stsp
Branch: MAIN
Changes since 1.115: +224 -226 lines
Diff to previous 1.115 (colored)

Remove no-op 'HIDE' macro from sppp code. This probably existed to allow
for easy switching to static functions. But we don't usually have static
functions in the kernel.
ok deraadt mpi mikeb

Revision 1.115 / (download) - annotate - [select for diffs], Tue Jan 7 16:34:05 2014 UTC (10 years, 5 months ago) by stsp
Branch: MAIN
Changes since 1.114: +33 -3 lines
Diff to previous 1.114 (colored)

Some follow-up fixes for IFID collision handling in IPv6CP.

Really change the link-local address in the unlikely event of an IFID
collision, instead of going into an infinite conf-nak loop with the peer.

To make the netinet6 code use the IPv6CP IFID in a new link-local address,
in6_ifattach_linklocal() must accept a provided IFID.  Replace the unused
'altifp' parameter with a new 'ifid' parameter for this purpose.

Always use the latest suggested address in IPv6CP replies, even if
the task to update the interface's address hasn't run yet.
Also, clear the ifindex (KAME hack) in addresses sent during IPv6CP.

ok mpi

Revision 1.114 / (download) - annotate - [select for diffs], Wed Dec 11 18:27:23 2013 UTC (10 years, 6 months ago) by jca
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Use an u_int32_t instead of an unsigned long to store the magic number
we're about to send.  Should a bug on big-endian LP64 archs reported by
James MacMahon (jwm at operand dot ca).  ok millert@

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 20 08:21:33 2013 UTC (10 years, 6 months ago) by stsp
Branch: MAIN
Changes since 1.112: +46 -62 lines
Diff to previous 1.112 (colored)

Convert sppp(4) to taskq; ok mikeb@ mpi@

Revision 1.112 / (download) - annotate - [select for diffs], Thu Nov 14 16:52:33 2013 UTC (10 years, 6 months ago) by stsp
Branch: MAIN
Changes since 1.111: +115 -106 lines
Diff to previous 1.111 (colored)

Improvements for address assignment and related issues in IPv6CP.

Move address assignment to process context. This uses a workq at
present, conversion to taskq is on my todo list (discussed with dlg).
Instead of rummaging around in sockaddr_in6 structs, use the proper
netinet6 APIs to configure addresses.
Deal with IFID collisions instead of ignoring them. The whole point of
IPv6CP is to avoid IFID collisions. Use arc4random() during IFID generation.
Assign destination address to /128 point-to-point links.

tested by me and sthen with pppoe(4)
ok sthen

Revision 1.111 / (download) - annotate - [select for diffs], Mon Nov 11 09:15:34 2013 UTC (10 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.110: +13 -5 lines
Diff to previous 1.110 (colored)

Replace most of our formating functions to convert IPv4/6 addresses from
network to presentation format to inet_ntop().

The few remaining functions will be soon converted.

ok mikeb@, deraadt@ and moral support from henning@

Revision 1.110 / (download) - annotate - [select for diffs], Tue Nov 5 15:32:48 2013 UTC (10 years, 7 months ago) by stsp
Branch: MAIN
Changes since 1.109: +2 -94 lines
Diff to previous 1.109 (colored)

Remove useless #ifdef *BSD cruft from sppp(4). No binary change.
ok sthen

Revision 1.109 / (download) - annotate - [select for diffs], Thu Oct 24 11:31:43 2013 UTC (10 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.108: +1 -5 lines
Diff to previous 1.108 (colored)

Remove the number of in6_var.h inclusions by moving some functions and
global variables to in6.h.

ok deraadt@

Revision 1.108 / (download) - annotate - [select for diffs], Tue Oct 1 20:22:13 2013 UTC (10 years, 8 months ago) by sf
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

Format string fixes: %hu/%hd for uint16_t, %u/%d/%x for uint32_t

- despite the name, ntohl returns uint32_t, not long
- also fix some %d into %u

Revision 1.107 / (download) - annotate - [select for diffs], Fri Aug 16 12:29:18 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

Replace the misleading SIOC{G,S}IFGENERIC ioctls by SIOCG{G,S}PPPPARAMS.

This is another ABI break but no port rely on them as verified by naddy@.

ok claudio@, mikeb@, henning@

Revision 1.106 / (download) - annotate - [select for diffs], Mon Jul 15 13:30:37 2013 UTC (10 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.105: +1 -10 lines
Diff to previous 1.105 (colored)

Remove a comment which is no longer true.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Jul 10 07:46:10 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.104: +2 -7 lines
Diff to previous 1.104 (colored)

Change the structure used in the SPPPIOSDEFS and SPPPIOGDEFS ioctls
to only include what is really needed.  In particular stop including
a "struct ifnet" and move kernel-only definition into the proper #if
dance.

While here remove the unused spppinfo() from ifconfig.

ok guenther@, sthen@, mikeb@

Revision 1.104 / (download) - annotate - [select for diffs], Thu Jun 20 12:03:40 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored)

Revert previous and unbreak asr, the new include should be protected.

Reported by naddy@

Revision 1.103 / (download) - annotate - [select for diffs], Thu Jun 20 09:38:24 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)

Allocate the various hook head descriptors as part of the ifnet
structure rather than doing various M_WAITOK allocations during
the *attach() functions, we always rely on them anyway.

ok mikeb@, uebayasi@

Revision 1.102 / (download) - annotate - [select for diffs], Fri May 31 19:16:52 2013 UTC (11 years ago) by mpi
Branch: MAIN
Changes since 1.101: +3 -8 lines
Diff to previous 1.101 (colored)

Remove the scrub argument from in_ifinit() and simply call in_ifscrub()
unconditionally for SIOCSIFADDR.

ok bluhm@, henning@

Revision 1.101 / (download) - annotate - [select for diffs], Thu Mar 28 16:55:27 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.100: +1 -2 lines
Diff to previous 1.100 (colored)

do not include machine/cpu.h from a .c file; it is the responsibility of
.h files to pull it in, if needed
ok tedu

Revision 1.100 / (download) - annotate - [select for diffs], Thu Mar 28 16:45:16 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.99: +1 -2 lines
Diff to previous 1.99 (colored)

no need for a lot of code to include proc.h

Revision 1.99 / (download) - annotate - [select for diffs], Fri Nov 23 20:12:03 2012 UTC (11 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.98: +6 -1 lines
Diff to previous 1.98 (colored)

Add SIOCGIFHARDMTU to allow retrieving the driver's maximum supported MTU
looks fine reyk@ ok mikeb@

Revision 1.98 / (download) - annotate - [select for diffs], Tue Jul 24 15:16:20 2012 UTC (11 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

decls before code

Revision 1.97 / (download) - annotate - [select for diffs], Mon Jul 23 10:54:54 2012 UTC (11 years, 10 months ago) by sthen
Branch: MAIN
Changes since 1.96: +26 -6 lines
Diff to previous 1.96 (colored)

Call sppp_clear_ip_addrs from a workq. Problem reported by RD Thrush and
LEVAI Daniel, diagnosed by matthew@, original diff from RD Thrush, cleaned
up by me with feedback from mikeb@. OK mikeb dcoppa deraadt

Revision 1.96 / (download) - annotate - [select for diffs], Sat Jan 28 12:14:45 2012 UTC (12 years, 4 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.95: +5 -34 lines
Diff to previous 1.95 (colored)

Remove a horrible sppp(4)-specific "fast queue" used for tcp ports 21 23 513.
You should use the proper queues via pf instead.  ok phessler@ henning@

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jan 19 01:13:20 2012 UTC (12 years, 4 months ago) by sthen
Branch: MAIN
Changes since 1.94: +25 -14 lines
Diff to previous 1.94 (colored)

Teach pppoe(4) about RFC 4638. This allows negotiating increased MTU with
compatible equipment provided that the physical interface and other layer 2
devices involved support and are configured to use jumbo frames.

Manpage to follow; typical use is to request 1500 MTU for pppoe, this
requires 1508+ MTU on the physical interface, e.g. "ifconfig em0 mtu 1508;
ifconfig pppoe0 mtu 1500". Known to be usable in the UK with some ISPs
(e.g. aaisp) using BT FTTC backhaul.

From Matt Dainty, originally based on support in NetBSD, changed to
decouple pppoe from physical interface MTU. Tested with UK FTTC by Matt,
no regressions on my standard UK ADSL setup or yasuoka@'s setup (in Japan,
NTT uses 1452 byte MTU for PPPoE and 1500 byte MTU for IPv6 on the same
network).

ok yasuoka@

Revision 1.94 / (download) - annotate - [select for diffs], Thu Jul 7 00:08:04 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.93: +6 -4 lines
Diff to previous 1.93 (colored)

another case of "clever" fiddling with ifq internals, just stumbled over
this in my monster diff and wondered that i hadn't put that in already...
claudio ryan ok

Revision 1.93 / (download) - annotate - [select for diffs], Wed Jul 6 02:54:31 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.92: +2 -11 lines
Diff to previous 1.92 (colored)

and make sppp_qflush a wrapper around IF_PURGE instead of handrolling
the same, ok'd with IFQ_PURGE with happens to break on altq kernels by
claudio, ryan and bluhm

Revision 1.92 / (download) - annotate - [select for diffs], Wed Jul 6 02:49:36 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

second trial: stop messing with ifq internals, this time use IF_IS_EMPTY
and not IFQ_IS_EMPTY, the former doesn't get overloaded with altq-specific
stuffz. original oks from claudio and ryan and bluhm, i take the liberty
to assume the oks for this fixed version

Revision 1.91 / (download) - annotate - [select for diffs], Wed Jul 6 02:42:28 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.90: +3 -4 lines
Diff to previous 1.90 (colored)

cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhm

Revision 1.90 / (download) - annotate - [select for diffs], Tue Jul 5 21:11:36 2011 UTC (12 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.89: +11 -2 lines
Diff to previous 1.89 (colored)

Revert henning's commit-n-run that broke the tree

Revision 1.89 / (download) - annotate - [select for diffs], Tue Jul 5 20:01:40 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.88: +3 -12 lines
Diff to previous 1.88 (colored)

2 cases of IFQ_IS_EMPTY instead of mucking with ifqueue internals
make sppp_flush use IFQ_PURGE instead of handrolling the same making
assumptions about ifqueue internals. ok ryan claudio

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jun 29 12:14:46 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.87: +7 -5 lines
Diff to previous 1.87 (colored)

always set sppp auth secret, as other code assumes it.
confirmed to fix paul stoeber's crash.  ok deraadt sthen

Revision 1.87 / (download) - annotate - [select for diffs], Sat Jun 18 23:52:49 2011 UTC (12 years, 11 months ago) by jsg
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

pass the correct size to memset
spotted by clang, ok matthew@

Revision 1.86 / (download) - annotate - [select for diffs], Wed May 4 16:05:49 2011 UTC (13 years, 1 month ago) by blambert
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Collapse m_pullup and m_pullup2 into a single function, as they're
essentially identical; the only difference being that m_pullup2 is
capable of handling mbuf clusters, but called m_pullup for shorter
lengths (!).

testing dlg@ ok claudio@

Revision 1.85 / (download) - annotate - [select for diffs], Sun Apr 17 20:44:27 2011 UTC (13 years, 1 month ago) by stsp
Branch: MAIN
Changes since 1.84: +43 -10 lines
Diff to previous 1.84 (colored)

in_ifinit() is not prepared to be called from interrupt context so add
addresses from process context by scheduling a work queue.
Fixes an assertwaitok panic. ok henning

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jan 11 15:42:05 2011 UTC (13 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.83: +6 -5 lines
Diff to previous 1.83 (colored)

for key material that is being being discarded, convert bzero() to
explicit_bzero() where required
ok markus mikeb

Revision 1.83 / (download) - annotate - [select for diffs], Wed Nov 17 19:25:49 2010 UTC (13 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

an extra parameter for in_ifinit, indicating wether the ifaddr passed to it
is new or an already existing one. for existing ones, call ifa_del first
tested by many as part of a larger diff, ok claudio dlg krw sthen

Revision 1.82 / (download) - annotate - [select for diffs], Mon Sep 13 08:53:06 2010 UTC (13 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.81: +39 -1 lines
Diff to previous 1.81 (colored)

Using a normaly unavailable 0.0.0.1 gateway on routes on sppp(4) based
devices is a bad idea. The problem is that the default route per se works
but PMTU is unable to clone host routes because the gateway is unreachable.
Fix sppp(4) so that it walks the routing table and fixes the gateways.
This makes PMTU work again. Diff tested by weerd@ and markus@ (older version)
for a long time.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jul 20 15:36:03 2010 UTC (13 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Switch some obvious network stack MAC comparisons from bcmp() to
timingsafe_bcmp().

ok deraadt@; committed over WPA.

Revision 1.80 / (download) - annotate - [select for diffs], Sat May 1 08:14:26 2010 UTC (14 years, 1 month ago) by mk
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

incomming -> incoming

The ones found in gnu/ left out by intention.

ok jmc

Revision 1.79 / (download) - annotate - [select for diffs], Mon Feb 8 13:37:02 2010 UTC (14 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

The IMPs are history so is splimp, this needs now splnet so update comment.
Another thing found by Gleydson Soares.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Nov 3 10:59:04 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.77: +5 -6 lines
Diff to previous 1.77 (colored)

rtables are stacked on rdomains (it is possible to have multiple routing
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@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Jul 27 11:40:59 2009 UTC (14 years, 10 months ago) by blambert
Branch: MAIN
Changes since 1.76: +4 -4 lines
Diff to previous 1.76 (colored)

tiemout_add -> timeout_add_sec

ok claudio@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Jul 13 16:23:28 2009 UTC (14 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.75: +14 -1 lines
Diff to previous 1.75 (colored)

Do the same rdomain checking in sppp as we do in the Ethernet case.
Encapsulated pppoe packets are moved into the rdomain of the physical interface
because it is possible that a pppoe(4) interface is in a different rdomain
then the physical interface.
OK reyk@

Revision 1.75 / (download) - annotate - [select for diffs], Wed Feb 18 08:36:20 2009 UTC (15 years, 3 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.74: +11 -1 lines
Diff to previous 1.74 (colored)

Free authentication data when detaching sppp from interface.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Feb 16 23:24:01 2009 UTC (15 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.73: +56 -37 lines
Diff to previous 1.73 (colored)

allocate the large structures instead of putting them on the stack, and
use M_CANWAIT throughout
ok sthen canacar claudio

Revision 1.73 / (download) - annotate - [select for diffs], Mon Feb 16 20:03:36 2009 UTC (15 years, 3 months ago) by canacar
Branch: MAIN
Changes since 1.72: +148 -89 lines
Diff to previous 1.72 (colored)

Allow username and password to be up to 255 characters in length.
Tested by many, thanks.
Put it in" deraadt@

Revision 1.72 / (download) - annotate - [select for diffs], Fri Feb 6 22:07:04 2009 UTC (15 years, 4 months ago) by grange
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

Remove bogus casts of integer constants SPPPIO[GS]DEFS to caddr_t
and fix typo while here.

ok canacar@

Revision 1.71 / (download) - annotate - [select for diffs], Sat Jan 31 21:28:40 2009 UTC (15 years, 4 months ago) by grange
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

u_char is not compatible with default argument promotion type thus
can't be used with va_start. change it to u_int.

ok miod@

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jun 9 07:07:16 2008 UTC (16 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

rename arc4random_bytes => arc4random_buf to match libc's nicer name;
ok deraadt@

Revision 1.69 / (download) - annotate - [select for diffs], Sun Jun 8 15:06:26 2008 UTC (16 years ago) by claudio
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Don't spam dmesg with sppp messages, instead use log(9).
OK canacar@ some time ago

Revision 1.68 / (download) - annotate - [select for diffs], Sat May 17 04:50:54 2008 UTC (16 years ago) by canacar
Branch: MAIN
Changes since 1.67: +7 -4 lines
Diff to previous 1.67 (colored)

Initialize the timeouts only once instead of everytime they are started
Prevents hangs as reported and tested by James Stark, PR:5795, ok henning@

Revision 1.67 / (download) - annotate - [select for diffs], Sun May 11 02:55:45 2008 UTC (16 years, 1 month ago) by brad
Branch: MAIN
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

Check to make sure pp_tlf is not NULL in sppp_keepalive() before calling it.

From NetBSD

ok canacar@

Revision 1.66 / (download) - annotate - [select for diffs], Sun May 11 02:28:16 2008 UTC (16 years, 1 month ago) by canacar
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

When passing opt[] array as an argument, use opt instead of &opt. While
they point to the same address, this is more readable. ok claudio@

Revision 1.65 / (download) - annotate - [select for diffs], Tue Dec 4 19:49:52 2007 UTC (16 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.64: +7 -5 lines
Diff to previous 1.64 (colored)

1500 is a 'magic number' in the protocol that all implementations
must be able to handle as MRU but while testing pppoe(4) against a pppoe(8)
server I figured out that pppoe(8) insists on a MRU 1492. Because of this
we allow the offered MRU to be between PP_MIN_MRU and PP_MAX_MRU especially
because the MRU is not used at all as long as it is smaller then PP_MAX_MRU.
OK canacar@

Revision 1.64 / (download) - annotate - [select for diffs], Mon Nov 26 09:28:33 2007 UTC (16 years, 6 months ago) by martynas
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

typos;  ok jmc@
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@
sys/dev/pci/bktr/* ok jakemsr@

Revision 1.63 / (download) - annotate - [select for diffs], Wed Nov 21 19:52:04 2007 UTC (16 years, 6 months ago) by canacar
Branch: MAIN
Changes since 1.62: +2 -4 lines
Diff to previous 1.62 (colored)

simplify sppp_chap_scr() now that we are using arc4random_bytes()

Revision 1.62 / (download) - annotate - [select for diffs], Fri Nov 16 05:08:39 2007 UTC (16 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.61: +2 -5 lines
Diff to previous 1.61 (colored)

use arc4random_bytes() instead of multiple arc4random() calls;
ok deraadt@ dlg@ henric@ mcbride@

Revision 1.61 / (download) - annotate - [select for diffs], Thu Nov 1 03:35:43 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

correct fix

Revision 1.60 / (download) - annotate - [select for diffs], Thu Nov 1 02:47:20 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

tsk tsk tsk, noone tested this; spotted by canacar

Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 31 21:13:45 2007 UTC (16 years, 7 months ago) by mikeb
Branch: MAIN
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

Don't leak potentially secret authname through ioctl interface.

Suggestions from mpf@ and canacar@

ok deraadt mpf canacar

Revision 1.58 / (download) - annotate - [select for diffs], Tue Sep 25 23:52:27 2007 UTC (16 years, 8 months ago) by canacar
Branch: MAIN
Changes since 1.57: +45 -6 lines
Diff to previous 1.57 (colored)

Handle incoming protocol reject packets now that we have
more than one protocol. From FreeBSD, reported and tested by jmc@

Revision 1.57 / (download) - annotate - [select for diffs], Wed Sep 5 21:01:49 2007 UTC (16 years, 9 months ago) by canacar
Branch: MAIN
Changes since 1.56: +721 -5 lines
Diff to previous 1.56 (colored)

IPv6 support for sppp layer, based on NetBSD version.
ok claudio@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Aug 28 15:59:18 2007 UTC (16 years, 9 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.55: +11 -9 lines
Diff to previous 1.55 (colored)

The m_pulldown used for aligning was not copying the header,
revert back to m_pullup2. Reported and tested by Enache Adrian
additional testing by naddy@ and claudio@
ok claudio@, deraadt@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Aug 20 16:46:00 2007 UTC (16 years, 9 months ago) by canacar
Branch: MAIN
Changes since 1.54: +14 -25 lines
Diff to previous 1.54 (colored)

Align the packet after the ppp header.
The earlier change was broken in sparc due to alignment problems.
reported and tested by nady@, ok deraadt@ claudio@

Revision 1.54 / (download) - annotate - [select for diffs], Tue Aug 14 18:11:46 2007 UTC (16 years, 10 months ago) by canacar
Branch: MAIN
Changes since 1.53: +20 -1 lines
Diff to previous 1.53 (colored)

Make sure all the packet is in one continuous mbuf.
This is a bandaid solution, a better solution will go
in post 4.2. Reported and tested by Joerg Zinke.
ok claudio@, deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Tue Aug 7 17:15:13 2007 UTC (16 years, 10 months ago) by canacar
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Use the length of the mbuf instead of the packet.
When sending a protocol reject. Prevents reading
past the mbuf in case the mbuf does not cover the
whole packet. ok claudio@, henning@

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jun 6 10:04:36 2007 UTC (17 years ago) by henning
Branch: MAIN
Changes since 1.51: +1 -27 lines
Diff to previous 1.51 (colored)

remove remaining IPX hooks. all inside #ifdef IPX, so no actual change

Revision 1.51 / (download) - annotate - [select for diffs], Mon May 28 06:31:01 2007 UTC (17 years ago) by mcbride
Branch: MAIN
Changes since 1.50: +4 -1 lines
Diff to previous 1.50 (colored)

Users of arc4random() should include dev/rndvar.h directly.

ok dlg claudio

Revision 1.50 / (download) - annotate - [select for diffs], Sun May 20 18:54:15 2007 UTC (17 years ago) by canacar
Branch: MAIN
Changes since 1.49: +44 -44 lines
Diff to previous 1.49 (colored)

Handle IP address stuff in tls/tlf state messages
instead of open/close events. Fixes PR 5457 where
an extra open event arrived due to an authentication
timeout/retransmission and confused things. Tested
by RD Thrush and mpf@, discussions and ok mpf@

Revision 1.49 / (download) - annotate - [select for diffs], Wed Apr 18 10:40:13 2007 UTC (17 years, 1 month ago) by mpf
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Typo in comment. From Brad.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Apr 17 21:36:58 2007 UTC (17 years, 1 month ago) by mpf
Branch: MAIN
Changes since 1.47: +123 -16 lines
Diff to previous 1.47 (colored)

Add support for setting the address of the ppp peer.
Use the proper in_ifscrub() / in_ifinit() calls for
address changes to generate routing messages.
The correct way to set the default route now
needs the -ifp option, e.g.
 route add default -ifp pppoe0 0.0.0.1
Since the route is set right after bringing
the interface up, it still works w/out -ifp though.

Changes mostly from NetBSD.

Tested by Matthias Bauer and bluhm@
OK canacar@

Revision 1.47 / (download) - annotate - [select for diffs], Mon Mar 19 23:31:14 2007 UTC (17 years, 2 months ago) by mpf
Branch: MAIN
Changes since 1.46: +20 -19 lines
Diff to previous 1.46 (colored)

Use u_int32_t instead of u_long for IP addresses.
OK claudio@

Revision 1.46 / (download) - annotate - [select for diffs], Wed Feb 14 00:53:48 2007 UTC (17 years, 4 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)

Consistently spell FALLTHROUGH to appease lint.
ok kettenis@ cloder@ tom@ henning@

Revision 1.45 / (download) - annotate - [select for diffs], Sun Feb 11 20:29:22 2007 UTC (17 years, 4 months ago) by miod
Branch: MAIN
Changes since 1.44: +1 -17 lines
Diff to previous 1.44 (colored)

Remove _KERNEL_OPT leftovers.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Dec 6 10:37:29 2006 UTC (17 years, 6 months ago) by bernd
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Missing newline in printf.

ok canacar@

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Sat Sep 2 18:09:01 2006 UTC (17 years, 9 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.38: +30 -31 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

MFC:
Fix by canacar@

Check for illegal option lengths when parsing LCP packets
and drop such bad packets. Also remove some redundant mallocs.

This fixes possible heap overflows when forming replys to such bad
packets as discovered by Martin Husemann and Pavel Cahyna.

reported by NetBSD, initial diff from markus@,
additional comments by claudio@, ok markus@

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Sat Sep 2 18:08:23 2006 UTC (17 years, 9 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.36: +30 -31 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

MFC:
Fix by canacar@

Check for illegal option lengths when parsing LCP packets
and drop such bad packets. Also remove some redundant mallocs.

This fixes possible heap overflows when forming replys to such bad
packets as discovered by Martin Husemann and Pavel Cahyna.

reported by NetBSD, initial diff from markus@,
additional comments by claudio@, ok markus@

Revision 1.43 / (download) - annotate - [select for diffs], Mon Aug 28 10:50:13 2006 UTC (17 years, 9 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.42: +30 -31 lines
Diff to previous 1.42 (colored)

Check for illegal option lengths when parsing LCP packets
and drop such bad packets. Also remove some redundant mallocs.

This fixes possible heap overflows when forming replys to such bad
packets as discovered by Martin Husemann and Pavel Cahyna.

reported by NetBSD, initial diff from markus@,
additional comments by claudio@, ok markus@

Revision 1.42 / (download) - annotate - [select for diffs], Tue Jul 11 21:36:51 2006 UTC (17 years, 11 months ago) by canacar
Branch: MAIN
Changes since 1.41: +5 -4 lines
Diff to previous 1.41 (colored)

Only print link state changes if interface is in debug mode.
Affects devices using the sppp layer (pppoe, art, san, lmc)
ok deraadt@

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jul 4 17:18:37 2006 UTC (17 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.40: +5 -3 lines
Diff to previous 1.40 (colored)

logging should be in debug mode only.  if every network driver did a
dmesg printf everytime they came up, would that be a better world?

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 2 11:01:06 2006 UTC (17 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

diff from peter phillip at freenet dot de:

	the "pppoe0: up" message is annoying when one is on console and the
	system has been configured to recall the ISP every minute or so.
	Moving the printf() to a log() fixes this and the "pppoe0: up"
	message is still seen in logs and dmesg.

ok canacar@

Revision 1.39 / (download) - annotate - [select for diffs], Sat Mar 4 22:40:16 2006 UTC (18 years, 3 months ago) by brad
Branch: MAIN
Changes since 1.38: +17 -18 lines
Diff to previous 1.38 (colored)

With the exception of two other small uncommited diffs this moves
the remainder of the network stack from splimp to splnet.

ok miod@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 24 20:34:34 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.37: +14 -14 lines
Diff to previous 1.37 (colored)

Another gem from the the-world-runs-on-i386 departement. Using u_long in
a packet format causes some troubles on 64bit archs. This fixes a sppp(4)
panic I got on alpha and makes cisco HDLC mode actually work. More cleanup
needs to be done post 3.9. OK brad@ looks good canacar@

Revision 1.37 / (download) - annotate - [select for diffs], Fri Oct 7 05:19:34 2005 UTC (18 years, 8 months ago) by canacar
Branch: MAIN
Changes since 1.36: +43 -19 lines
Diff to previous 1.36 (colored)

Report interface link state changes in sppp layer
Help and ok claudio@, ok brad@

Revision 1.36 / (download) - annotate - [select for diffs], Fri Aug 12 21:29:10 2005 UTC (18 years, 10 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_8
Changes since 1.35: +6 -4 lines
Diff to previous 1.35 (colored)

Use actual packet contents when sending protocol rejects. Fixes PR 4305.
Different fix tested by the submitter, xiangbo3 at gmail com.
ok claudio@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Aug 3 21:50:21 2005 UTC (18 years, 10 months ago) by canacar
Branch: MAIN
Changes since 1.34: +18 -4 lines
Diff to previous 1.34 (colored)

prevent unaligned memory access when processing LCP echo packets,
making pppoe(4) work on sparc64. Fixes PR-4311
Reported and fix tested by David Coppa < dcoppa at gmail com >

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jun 8 06:55:33 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.33: +1 -27 lines
Diff to previous 1.33 (colored)

bye bye netns (and a few leftover DECNET bits while here)

Revision 1.33 / (download) - annotate - [select for diffs], Fri May 13 20:17:02 2005 UTC (19 years, 1 month ago) by brad
Branch: MAIN
Changes since 1.32: +7 -6 lines
Diff to previous 1.32 (colored)

Fix for a panic experienced when authenticating a pppoe session on an amd64 system.

From: i4b project via FreeBSD via Jason Ackley

Fixes PR 4190 & 4196

ok canacar@

Revision 1.32 / (download) - annotate - [select for diffs], Sun Apr 24 20:56:48 2005 UTC (19 years, 1 month ago) by canacar
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Fix cisco-mode check in lcp up/down.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Apr 11 17:24:10 2005 UTC (19 years, 2 months ago) by canacar
Branch: MAIN
Changes since 1.30: +7 -1 lines
Diff to previous 1.30 (colored)

Ignore lcp up/down events in cisco mode

Revision 1.30 / (download) - annotate - [select for diffs], Fri Apr 1 22:09:32 2005 UTC (19 years, 2 months ago) by canacar
Branch: MAIN
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

do not mess with lcp if we are in cisco mode

Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 24 16:37:52 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.28: +15 -9 lines
Diff to previous 1.28 (colored)

Unbreak tree, mono_time may no longer be used because of timecounters.
Use getmicrouptime() instead. Found by grange@ and henning@.
OK henning@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Mar 23 00:26:06 2005 UTC (19 years, 2 months ago) by canacar
Branch: MAIN
Changes since 1.27: +112 -62 lines
Diff to previous 1.27 (colored)

Merge some sppp improvements from NetBSD:
1. better timeout and keepalive handling
2. fix some memory leaks on error paths.
3. use arc4random instead of random
4. always send keepalives in cHDLC mode, from claudio@
Tested by Greg Mortensen (san) and jmc@ (pppoe), ok claudio@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 23 00:11:40 2005 UTC (19 years, 2 months ago) by canacar
Branch: MAIN
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

Follow RFC and do not reset timeouts everytime sppp_cp_change_state()
is called. Makes two sppp instances to handshake against each other.
Tested by Greg Mortensen, ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Dec 10 14:35:30 2004 UTC (19 years, 6 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

Run address change notification hooks when the interface address is updated.
Notably, this fixes "(pppoe0)" in pf.  ok markus@

Revision 1.25 / (download) - annotate - [select for diffs], Sun Nov 28 23:39:45 2004 UTC (19 years, 6 months ago) by canacar
Branch: MAIN
Changes since 1.24: +103 -58 lines
Diff to previous 1.24 (colored)

In kernel pppoe client, a simple IPv4 only implementation.
Initial porting from NetBSD by David Berghoff.
Modified/simplified to match our sppp implementation.
ok deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jul 16 15:01:09 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.23: +1 -25 lines
Diff to previous 1.23 (colored)

remove netiso shitz, millert ok

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jun 24 19:35:25 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
Changes since 1.22: +2 -13 lines
Diff to previous 1.22 (colored)

This moves access to wall and uptime variables in MI code,
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.

It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code.  Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.

ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 22 02:02:45 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
Changes since 1.21: +7 -16 lines
Diff to previous 1.21 (colored)

Don't use time-based random number generation

ok millert@ deraadt@

Revision 1.3.4.10 / (download) - annotate - [select for diffs], Sat Jun 5 23:11:23 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.3.4.9: +3 -1 lines
Diff to previous 1.3.4.9 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Merge with the trunk

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 7 14:42:27 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Replace RSA-derived md5 code with code derived from Colin Plumb's PD version.
This moves md5.c out of libkern and into sys/crypto where it belongs (as
requested by markus@).  Note that md5.c is still mandatory (dev/rnd.c uses it).
Verified with IPsec + hmac-md5 and tcp md5sig. OK henning@ and hshoexer@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 25 18:50:01 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

check for input queue congestion on those as well and call if_congestion when
needed; these  are slightly different so that we cannot use the new
IF_INPUT_ENQUEUE macro
deraadt ok

Revision 1.3.4.9 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:21 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.3.4.8: +2 -2 lines
Diff to previous 1.3.4.8 (colored) to branchpoint 1.3 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jan 3 14:08:53 2004 UTC (20 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macros
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.

Revision 1.11.2.4 / (download) - annotate - [select for diffs], Mon May 19 22:30:41 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.11.2.3: +8 -15 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync

Revision 1.3.4.8 / (download) - annotate - [select for diffs], Tue May 13 19:36:15 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.3.4.7: +7 -7 lines
Diff to previous 1.3.4.7 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 6 07:28:39 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: UBC_SYNC_A, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

string cleaning; tedu ok

Revision 1.3.4.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:28 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3.4.6: +22 -17 lines
Diff to previous 1.3.4.6 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch with 3.3

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 7 09:00:33 2003 UTC (21 years, 5 months ago) by kjc
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.16: +2 -9 lines
Diff to previous 1.16 (colored)

remove the altq classifier code which is replaced by pf and no longer used.

ok henning@, deraadt@

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:45 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.11.2.2: +23 -11 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

sync to -current

Revision 1.16 / (download) - annotate - [select for diffs], Thu Sep 26 20:43:54 2002 UTC (21 years, 8 months ago) by chris
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.15: +21 -9 lines
Diff to previous 1.15 (colored)

BSD-style license from Serge Vakulenko <vak@cronyx.ru>

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 11 05:38:47 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

KNF - return is not a function.

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Tue Jun 11 03:30:45 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.11.2.1: +2 -3 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

Sync UBC branch to -current

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Thu Mar 28 14:57:37 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3.4.5: +1 -2 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored)

Merge in -current from roughly a week ago

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 12 09:51:20 2002 UTC (22 years, 3 months ago) by kjc
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

sync with KAME
ALTQify more drivers.
ok millert@

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:15:06 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.3.4.4: +11 -11 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored)

Merge in trunk

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Thu Jan 31 22:55:43 2002 UTC (22 years, 4 months ago) by niklas
Branch: UBC
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

Merge in -current, builds on i386, otherwise untested

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Thu Dec 27 15:39:32 2001 UTC (22 years, 5 months ago) by jason
Branch: OPENBSD_3_0
Changes since 1.10.2.1: +5 -5 lines
Diff to previous 1.10.2.1 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Pull in patch from current:
Fix (itojun):
revision 1.12 lacks paren around && within || (gcc warns and compilation stops).

Revision 1.13 / (download) - annotate - [select for diffs], Thu Dec 27 09:11:47 2001 UTC (22 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

revision 1.12 lacks paren around && within || (gcc warns and compilation stops).

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 23:51:36 2001 UTC (22 years, 5 months ago) by jason
Branch: OPENBSD_3_0
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Pull in patch from current:
Fix (mickey):
misplaced (), causing tcp header be examined in non-tcp packets

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 26 22:36:31 2001 UTC (22 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

misplaced (), causing tcp header be examined in non-tcp packets

Revision 1.11 / (download) - annotate - [select for diffs], Mon Dec 10 06:10:53 2001 UTC (22 years, 6 months ago) by jason
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.10: +7 -7 lines
Diff to previous 1.10 (colored)

use queue.h macros for TAILQ operations

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Wed Oct 31 03:29:02 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.3.4.3: +5 -3 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jul 10 11:09:07 2001 UTC (22 years, 11 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE
Branch point for: OPENBSD_3_0
Changes since 1.9: +5 -3 lines
Diff to previous 1.9 (colored)

Missing breaks.
Case labels must be integral values for deterministic behavior.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Wed Jul 4 10:54:07 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.3.4.2: +35 -15 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 27 06:07:43 2001 UTC (22 years, 11 months ago) by kjc
Branch: MAIN
Changes since 1.8: +35 -15 lines
Diff to previous 1.8 (colored)

introduce the ALTQ queue macros into sys/net files.
the new model removes direct references to the fields in ifp->if_snd,
and defines the following macros to manipulate ifp->if_snd.
  IFQ_ENQUEUE(ifq, m, pktattr, err)
  IFQ_DEQUEUE(ifq, m)
  IFQ_POLL(ifq, m)
  IFQ_PURGE(ifq)
  IFQ_IS_EMPTY(ifq)

the new model also enforces some rules regarding how to use these macros.
details are descrined in
http://www.csl.sony.co.jp/~kjc/software/altq-new-design.txt

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:40:01 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.3.4.1: +43 -17 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 25 02:56:18 2001 UTC (23 years, 2 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.7: +10 -4 lines
Diff to previous 1.7 (colored)

Minor bug. Could corrupt stat counters

Revision 1.7 / (download) - annotate - [select for diffs], Thu Mar 22 01:42:35 2001 UTC (23 years, 2 months ago) by mickey
Branch: MAIN
Changes since 1.6: +28 -9 lines
Diff to previous 1.6 (colored)

new timeouts

Revision 1.6 / (download) - annotate - [select for diffs], Wed Mar 7 05:44:05 2001 UTC (23 years, 3 months ago) by aaron
Branch: MAIN
Changes since 1.5: +7 -3 lines
Diff to previous 1.5 (colored)

Missing splx() calls in failure cases.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 26 18:39:38 2000 UTC (24 years, 1 month ago) by chris
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.4: +1 -4 lines
Diff to previous 1.4 (colored)

Cruft

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:32 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Sync with -current

Revision 1.4 / (download) - annotate - [select for diffs], Fri Mar 3 00:54:57 2000 UTC (24 years, 3 months ago) by todd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

$OpenBSD$

Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 6 23:02:27 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.2: +169 -163 lines
Diff to previous 1.2 (colored)

Fix an uninitialized variable bug.  Remove statics.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jul 2 17:46:55 1999 UTC (24 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +1 -9 lines
Diff to previous 1.1 (colored)

do not use fuword()

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jul 1 23:10:40 1999 UTC (24 years, 11 months ago) by deraadt
Branch: MAIN

lmc driver; ported by chris@dqc.org

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.