#
352481 |
|
18-Sep-2019 |
hselasky |
MFC r352137: Callout drain does not have to be followed by a callout stop call. Fix bogus code.
Sponsored by: Mellanox Technologies
|
#
351026 |
|
14-Aug-2019 |
emaste |
MFC r350497: ppp: correct echo-req magic number on big endian archs
The magic number is a 32-bit quantity; use uint32_t to match hton's return type and avoid sending zeros (upper 32 bits) on big-endian architectures.
PR: 184141 Sponsored by: The FreeBSD Foundation
|
#
332288 |
|
08-Apr-2018 |
brooks |
MFC r331797:
Use an accessor function to access ifr_data.
This fixes 32-bit compat (no ioctl command defintions are required as struct ifreq is the same size).
Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14900
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298995 |
|
03-May-2016 |
pfg |
sys/net*: minor spelling fixes.
No functional change.
|
#
298075 |
|
15-Apr-2016 |
pfg |
sys/net* : for pointers replace 0 with NULL.
Mostly cosmetical, no functional change.
Found with devel/coccinelle.
|
#
286001 |
|
29-Jul-2015 |
ae |
Convert in_ifaddr_lock and in6_ifaddr_lock to rmlock.
Both are used to protect access to IP addresses lists and they can be acquired for reading several times per packet. To reduce lock contention it is better to use rmlock here.
Reviewed by: gnn (previous version) Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D3149
|
#
283291 |
|
22-May-2015 |
jkim |
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent.
Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
|
#
273784 |
|
28-Oct-2014 |
kib |
Replace some calls to fuword() by fueword() with proper error checking.
Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 3 weeks
|
#
271867 |
|
19-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
#
268787 |
|
17-Jul-2014 |
kevlo |
Deprecate m_act. Use m_nextpkt always.
|
#
263140 |
|
14-Mar-2014 |
glebius |
Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998. Later, in this century the Novell Open Enterprise Server became successor of Novell NetWare. The last release that claimed to still support IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco) discontinued support for IPX in 2011.
Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
|
#
257176 |
|
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
#
255471 |
|
11-Sep-2013 |
glebius |
Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is extremely outdated, and I doubt that it was ever used for ifnet drivers. It was used for AF_INET sockets in pre-FreeBSD time.
Approved by: re (hrs) Sponsored by: Nginx, Inc.
|
#
250131 |
|
01-May-2013 |
eadler |
Correct a few sizeof()s
Submitted by: swildner@DragonFlyBSD.org Reviewed by: alfred
|
#
249925 |
|
26-Apr-2013 |
glebius |
Add const qualifier to the dst parameter of the ifnet if_output method.
|
#
243882 |
|
05-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched - sys/mbuf.h edited manually
|
#
241686 |
|
18-Oct-2012 |
andre |
Mechanically remove the last stray remains of spl* calls from net*/*. They have been Noop's for a long time now.
|
#
241394 |
|
10-Oct-2012 |
kevlo |
Revert previous commit...
Pointyhat to: kevlo (myself)
|
#
241370 |
|
09-Oct-2012 |
kevlo |
Prefer NULL over 0 for pointers
|
#
227293 |
|
07-Nov-2011 |
ed |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
|
#
223741 |
|
03-Jul-2011 |
bz |
Tag mbufs of all incoming frames or packets with the interface's FIB setting (either default or if supported as set by SIOCSIFFIB, e.g. from ifconfig).
Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: julian MFC after: 2 weeks
|
#
196019 |
|
01-Aug-2009 |
rwatson |
Merge the remainder of kern_vimage.c and vimage.h into vnet.c and vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes.
Reviewed by: bz Approved by: re (vimage blanket)
|
#
195699 |
|
14-Jul-2009 |
rwatson |
Build on Jeff Roberson's linker-set based dynamic per-CPU allocator (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables.
Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker.
Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided.
This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS.
Bump __FreeBSD_version and update UPDATING.
Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith)
|
#
195070 |
|
26-Jun-2009 |
rwatson |
Use if_addr_rlock/if_addr_runlock for if_spp when iterating if_addrhead, as it is loadable as a module.
Approved by: re (kib) MFC after: 6 weeks
|
#
194951 |
|
25-Jun-2009 |
rwatson |
Add a new global rwlock, in_ifaddr_lock, which will synchronize use of the in_ifaddrhead and INADDR_HASH address lists.
Previously, these lists were used unsynchronized as they were effectively never changed in steady state, but we've seen increasing reports of writer-writer races on very busy VPN servers as core count has gone up (and similar configurations where address lists change frequently and concurrently).
For the time being, use rwlocks rather than rmlocks in order to take advantage of their better lock debugging support. As a result, we don't enable ip_input()'s read-locking of INADDR_HASH until an rmlock conversion is complete and a performance analysis has been done. This means that one class of reader-writer races still exists.
MFC after: 6 weeks Reviewed by: bz
|
#
194813 |
|
24-Jun-2009 |
rwatson |
Lock if_addrhead when iterating, and where necessary acquire and release ifadr references in if_sppp.
MFC after: 6 weeks
|
#
191148 |
|
16-Apr-2009 |
kmacy |
Change if_output to take a struct route as its fourth argument in order to allow passing a cached struct llentry * down to L2
Reviewed by: rwatson
|
#
190818 |
|
07-Apr-2009 |
ed |
Add parentheses to under-parenthesized macro.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
#
188668 |
|
16-Feb-2009 |
rwatson |
IFF_NEEDSGIANT will no longer be supported, so remove compatibility code from if_sppp framework for interfaces requiring Giant.
|
#
185571 |
|
02-Dec-2008 |
bz |
Rather than using hidden includes (with cicular dependencies), directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files.
For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h.
Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation
|
#
184682 |
|
05-Nov-2008 |
bz |
Make compile without INET.
The change is modelled after the way it was done for (without) INET6.
MFC after: 2 months
|
#
183550 |
|
02-Oct-2008 |
zec |
Step 1.5 of importing the network stack virtualization infrastructure from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit
Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs.
Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().
Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.).
All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*).
(*) netipsec/keysock.c did not validate depending on compile time options.
Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation
|
#
182121 |
|
24-Aug-2008 |
imp |
MFp4:
Remove all the OtherBSD ifdefs. They are very out of date at this point. OtherBSD doesn't use this file verbatim, and they don't have FreeBSD ifdefs in their code.
Reviewed by: bms@, joerg@
|
#
181803 |
|
17-Aug-2008 |
bz |
Commit step 1 of the vimage project, (network stack) virtualization work done by Marko Zec (zec@).
This is the first in a series of commits over the course of the next few weeks.
Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only.
We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again.
Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
|
#
170490 |
|
10-Jun-2007 |
mjacob |
Cast the ioctl define to the type of the variable being switched on.
|
#
165118 |
|
12-Dec-2006 |
bz |
MFp4: 92972, 98913 + one more change
In ip6_sprintf no longer use and return one of eight static buffers for printing/logging ipv6 addresses. The caller now has to hand in a sufficiently large buffer as first argument.
|
#
161556 |
|
23-Aug-2006 |
cperciva |
Correct buffer overflow in the handling of LCP options in ppp(4)
Security: FreeBSD-SA-06:18.ppp
|
#
160377 |
|
15-Jul-2006 |
brooks |
Use TAILQ_FOREACH instead of poking around in the guts of the list macros.
|
#
153084 |
|
04-Dec-2005 |
ru |
Fix -Wundef from compiling the amd64 LINT.
|
#
150349 |
|
19-Sep-2005 |
andre |
Use monotonic time_uptime instead of 'time_second' as timebase for timeouts.
|
#
148887 |
|
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
|
#
148385 |
|
25-Jul-2005 |
ume |
scope cleanup. with this change - most of the kernel code will not care about the actual encoding of scope zone IDs and won't touch "s6_addr16[1]" directly. - similarly, most of the kernel code will not care about link-local scoped addresses as a special case. - scope boundary check will be stricter. For example, the current *BSD code allows a packet with src=::1 and dst=(some global IPv6 address) to be sent outside of the node, if the application do: s = socket(AF_INET6); bind(s, "::1"); sendto(s, some_global_IPv6_addr); This is clearly wrong, since ::1 is only meaningful within a single node, but the current implementation of the *BSD kernel cannot reject this attempt.
Submitted by: JINMEI Tatuya <jinmei__at__isl.rdc.toshiba.co.jp> Obtained from: KAME
|
#
147256 |
|
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
#
139823 |
|
06-Jan-2005 |
imp |
/* -> /*- for license, minor formatting changes
|
#
139365 |
|
27-Dec-2004 |
rik |
Add FR support to sppp (MFCronyx).
Silence on: net@, current@, hackers@. No objections: joerg
Requested by: by many (mostly Cronyx) users for a long long time. MFC after: 10 days
PR: kern/21771, kern/66348
|
#
138855 |
|
14-Dec-2004 |
rik |
Kill double inclusion for <netinet/in.h> and <netinet/in_systm.h>.
|
#
138745 |
|
12-Dec-2004 |
rik |
Make sppp MPSAFE. MPSAFE could be turned off by IFF_NEEDSGIANT.
Silence on: net@, current@, hackers@. No objections: joerg
|
#
134391 |
|
27-Aug-2004 |
andre |
Apply error and success logic consistently to the function netisr_queue() and its users.
netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported.
Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets.
PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days
|
#
132199 |
|
15-Jul-2004 |
phk |
Do a pass over all modules in the kernel and make them return EOPNOTSUPP for unknown events.
A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
|
#
131241 |
|
28-Jun-2004 |
rik |
Do not m_free packet since IF_HANDOFF (called from netisr_queue) will do it for us, just count it.
|
#
131093 |
|
25-Jun-2004 |
rik |
Do not count loobacks as other fuilures. As a result magic will not be rejected any more in case of loopback.
Discussed with: joerg@
|
#
130549 |
|
15-Jun-2004 |
mlaier |
Replace IF_HANDOFF with new IFQ_HANDOFF to enqueue with ALTQ once enabled on the respective drivers.
|
#
130416 |
|
13-Jun-2004 |
mlaier |
Link ALTQ to the build and break with ABI for struct ifnet. Please recompile your (network) modules as well as any userland that might make sense of sizeof(struct ifnet). This does not change the queueing yet. These changes will follow in a seperate commit. Same with the driver changes, which need case by case evaluation.
__FreeBSD_version bump will follow.
Tested-by: (i386)LINT
|
#
129734 |
|
25-May-2004 |
rik |
Keepalive timer should be added if we does not have any sppp consumers before and should be deleted if we do not have any anymore.
|
#
126939 |
|
13-Mar-2004 |
rwatson |
Compare spppq to NULL instead of using spppq as a boolean.
|
#
126910 |
|
13-Mar-2004 |
rwatson |
Constify interactive_ports, as its value is static, and therefore doesn't require synchronization.
|
#
124808 |
|
21-Jan-2004 |
phk |
Remove #ifdef for ancient source FreeBSD compat.
|
#
121816 |
|
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics.
Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
|
#
118072 |
|
26-Jul-2003 |
gj |
Use M_WAITOK instead of M_WAIT in sppp_attach().
|
#
111926 |
|
05-Mar-2003 |
peter |
Finish driving a stake through the heart of netns and the associated ifdefs scattered around the place - its dead Jim!
The SMB stuff had stolen AF_NS, make it official.
|
#
111888 |
|
04-Mar-2003 |
jlemon |
Update netisr handling; Each SWI now registers its queue, and all queue drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off.
Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
|
#
111119 |
|
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
#
111038 |
|
17-Feb-2003 |
maxim |
o Restore an interrupt priority level before return.
Submitted by: Roman Kurakin <rik@cronyx.ru> Reviewed by: joerg MFC after: 5 days
|
#
109623 |
|
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
#
105228 |
|
16-Oct-2002 |
phk |
Be consistent about functions being static.
Spotted by: FlexeLint
|
#
103842 |
|
23-Sep-2002 |
alfred |
s/__attribute__((__packed__))/__packed/g
|
#
102412 |
|
25-Aug-2002 |
charnier |
Replace various spelling with FALLTHROUGH which is lint()able
|
#
96349 |
|
10-May-2002 |
joerg |
Fix a misplaced break statement within a switch that accidentally made it into an "#ifdef INET6" block. This caused a (harmless but annoying) EINVAL return value to be sent even though the operation completed successfully.
PR: kern/37786 Submitted by: Ari Suutari <ari.suutari@syncrontech.com>,David Malone <dwmalone@maths.tcd.ie> MFC after: 1 day
|
#
95848 |
|
01-May-2002 |
obrien |
"pointers are not permitted as case values", so force the macros to ints.
|
#
93818 |
|
04-Apr-2002 |
jhb |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
#
88723 |
|
30-Dec-2001 |
joerg |
Implement an option to administratively disable the negotiation of IPv6 on an sppp interface. In an IPv6-enabled kernel, every IPv6 interface automatically gets an IPv6 address assigned (and IPv6 multicast packets sent at initialization time). For sppp links where we know our remote peer wouldn't support IPv6 at all, there's no point in attempting to negotiate IPV6CP (or to even dial out for an IPv6 packet at all for dial-on-demand interfaces).
I wish there were a more generic way to administratively disable IPv6 on an interface instead. ume told me there isn't.
While i was at it, converted both, enable_vj and enable_ipv6 into flag bits in struct sppp (enable_vj used to be an int of its own).
MFC after: 1 month
|
#
88716 |
|
30-Dec-2001 |
joerg |
Merge last-minute fix from the i4b file made by gj:
Protect mtx_init() invocations with mtx_intialized() checks to avoid a reported panic.
MFC after: 1 month
|
#
88710 |
|
30-Dec-2001 |
joerg |
We explicitly close LCP when going to state CLOSED, so we better open it again when going from INITIAL to STARTING. This has been done for passive or auto-conecting interfaces always, but not for permanent ones.
Obtained from: NetBSD (rev 1.32)
|
#
88709 |
|
30-Dec-2001 |
joerg |
run IPCP only if we have IPv4 in kernel
Obtained from: NetBSD (rev 1.19) MFC after: 1 month
|
#
88706 |
|
30-Dec-2001 |
joerg |
Fix a long-standing blatant bug where the operator precedence between & and && has been botched. This was likely the cause for some havoc with various negotiation cases of sppp in the past.
Obtained from: NetBSD (rev 1.13) MFC after: 1 week
|
#
88705 |
|
30-Dec-2001 |
joerg |
Fix compilation without INET (though not really tested yet without INET).
Obtained from: NetBSD (rev 1.12) MFC after: 1 month
|
#
88704 |
|
30-Dec-2001 |
joerg |
Add the `packed' attribute to structures which describe wire protocol data formats.
Obtained from: NetBSD (rev 1.6) MFC after: 1 month
|
#
88702 |
|
30-Dec-2001 |
joerg |
Extend the hack where 0.0.0.1 meant `any address for remote is acceptable' to addresses 0.0.0.*. This allows for multiple such interfaces.
MFC after: 1 month
|
#
88700 |
|
30-Dec-2001 |
joerg |
Fix the handling of VJ uncompression. Unfortunately, tcp_uncompress() makes the implied assumption there were another 128 bytes of space in front of the packet handed off to it... which is not the case for sppp. This could easily end up in corrupting random memory.
This fix is about the same as revs 1.6, 1.8, and 1.9 from our i4b_ispppsubr.c.
Also fixed IPCP option negotiation to zero out the options when starting IPCP. Otherwise, if negotiation parameters change between various IPCP startups, it could happen that old options would still be requested (this happened if VJ was turned off, and ended up in half off the link still negotiating for VJ compression).
IMHO, the base system's sppp is now feature-wise up to date with the one in the i4b part of the tree, so the latter can be disabled.
MFC after: 1 month
|
#
88600 |
|
28-Dec-2001 |
joerg |
Convert sppp_params() to use a malloced structure in order to reduce kernel stack usage.
This effectively merges rev 1.3 of i4b's i4b_ispppsubr.c.
MFC after: 1 month
|
#
88599 |
|
28-Dec-2001 |
joerg |
Fix my breakage to the low-level hardware sync drivers brought by the inclusion of VJ compression into sppp.
Now, instead of the need to include this and that and everything plus the kitchensink in each of those drivers, struct sppp uses struct slcompress as an opaque structure only referenced by a pointer. The actual structure is then malloced at initialization time.
While i was at it, also fixed a bug where received VJ packets would only be recognized if INET6 was defined.
|
#
88577 |
|
28-Dec-2001 |
joerg |
Implement timestamps so i4b/driver/i4b_isppp.c can derive the idle time from the PPP packets sent. This effectively merges rev 1.2 of the old i4b_ispppsubr.c, with the exception that i eventually ended up in debugging and fixing it so the idle time is now really detected. ;-) (The version in i4b simply doesn't work right since it still accounts for incoming LCP echo packets which it is supposed to ignore for idle time considerations...)
Obtained from: i4b MFC after: 1 month
|
#
88558 |
|
27-Dec-2001 |
joerg |
Break out the relevant fields from struct sppp into a struct sppp_parms that are needed for the SPPPIO[GS]DEFS ioctl commands. This allows it to keep struct sppp inside #ifdef _KERNEL (where it belongs), and prevents userland programs that wish to include <net/if_sppp.h> from including the earth, the hell, and the universe before the are able to resolve all the kernel-internal stuff that's in struct sppp.
Discussed with: hm MFC after: 1 month
|
#
88550 |
|
27-Dec-2001 |
joerg |
Make the LCP restart timer configurable.
This (effectively) merges rev 1.36 of i4b's old if_spppsubr.c, albeit in a slightly different manner (we export the timer in millisecond values as exposed to tick values from/to userland).
Obtained from: i4b MFC after: 1 month
|
#
88534 |
|
27-Dec-2001 |
joerg |
Implement VJ header compression for sppp.
This is the logical merge of rev 1.32 of i4b's old if_spppsubr.c (which was based on PR misc/11767), plus (i4b) rev 1.6 of i4b's if_ispppsubr.c, albeit with numerous stylistic and cosmetic changes.
PR: misc/11767 Submitted by: i4b, Joachim Kuebart MFC after: 1 month
|
#
88508 |
|
26-Dec-2001 |
joerg |
Don't log RXJ+ protocol rejects unless we are in debug mode. (RXJ- events are always logged.) This stops sppp from spamming the syslog files in case the remote peer is not configured to negotiate IPv6.
|
#
88506 |
|
26-Dec-2001 |
joerg |
Ignore (and silently conf-ack) conf-reqs for an Async-Control- Character-Map. RFC 1662 demands it for the sake of async to sync PPP protocol converters (like Win9* :).
This merges rev 1.26/1.27 of the old i4b sppp changes.
|
#
88503 |
|
26-Dec-2001 |
joerg |
For SIOCSIFADDR, don't call if_up() since it would attempt to add the route to the destination twice. Now that brian has fixed route.c to no longer accept this second route, this long-standing nuisance became a showstopper bug for sppp users.
In retrospect, this is the same fix as the one in rev 1.78 of if_sl.c; most likely the original version of sppp has been cloned from SLIP. ;-)
|
#
84318 |
|
01-Oct-2001 |
jlemon |
Update the hash table when sppp mucks directly with the interface address.
|
#
80715 |
|
31-Jul-2001 |
ume |
If LCP proto-rej is received, drop the protocol mentioned by the message. This is to be friendly with non-IPv6 peer (If the peer complains due to lack of IPv6CP, drop IPv6CP). This basically implements "RXJ+" state transition in the RFC.
Obtained from: NetBSD
|
#
78250 |
|
15-Jun-2001 |
peter |
Fix warning: 848: warning: label `nosupport' defined but not used
|
#
78176 |
|
13-Jun-2001 |
ume |
Make compilable. addlog(...) was replaced with log(-1, ...)
Reported by: peter
|
#
78134 |
|
12-Jun-2001 |
ume |
Restore the code wrongly nuked by previous commit.
Following changed was made by previous commit:
- IPV6CP supporting in kernel level ppp from NetBSD.
Submitted by: y.shirasaki@ntt.com
|
#
78064 |
|
11-Jun-2001 |
ume |
Sync with recent KAME. This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge.
TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT.
Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
|
#
75321 |
|
08-Apr-2001 |
joerg |
Move the decision whether we want to request authentication from our peer out from sppp_lcp_open() to sppp_lcp_up(). For one, this makes things look more symmetrical to sppp_lcp_close(), and somehow it also just occurred to me that an Up event following the open caused the value of the authentication option to be clobbered.
|
#
74774 |
|
25-Mar-2001 |
joerg |
This is another MFC candidate.
Fix a serious bug in sppp where anyone could obtain a successful PAP authentication by supplying a null password. I've only stumpled across the PR while browsing for all sppp-related PRs.
Should we also file a security advisory for this?
PR: 21592 Submitted by: <dli@3bc.de> Dirk Liebke
|
#
74703 |
|
23-Mar-2001 |
joerg |
(MFC candidate, see below).
When we get an Open event in stopped state, experience shows that this is usually means we've somehow missed a previous Down event. This has occasionally bitten people for the IPCP layer with ISDN, apparently a previously aborted IPCP negotiation must have caused this. As a bandaid, we quickly pretent a Down event by advancing to starting state; this effectively implements the `restart' option mentioned in RFC 1663.
While i'm not yet fully convinced this is the best thing to do (and is fully compliant with RFC 1661), i've seen a number of reports here on the German mailing lists where people have been bitten by the previous behaviour which usually causes quickly looping ISDN reconnects (thus loss of money...), and where just this patch fixes the problem.
For this, i'd even like to see it MFC'd if possible.
Submitted by: Helmut Kreft <kreft@zeus.ai-lab.fh-furtwangen.de>
|
#
71959 |
|
03-Feb-2001 |
phk |
Use <sys/queue.h> macro api rather than fondle its implementation detals.
Created with: /usr/bin/sed Reviewed by: /sbin/md5
|
#
70199 |
|
19-Dec-2000 |
jhay |
Various fixes to make leased line operation more robust. On lcp_up, start to negotiate from scratch. Make leased lines survive being put into loopback mode. Bits and pieces and ideas taken from PRs 11238 and 21771. Make it a module so that it can be kldloaded. Whitespace cleanup. (Can be ignored with "cvs diff -b".)
PR: 11238 and 21771 (bits and pieces)
|
#
69211 |
|
26-Nov-2000 |
phk |
Make log(-1, ...) do what addlog(...) did.
Replace all uses of addlog(...) with log(-1, ...)
Remove bogus "register" keywords in subr_prf.c
Make log() return void.
|
#
69152 |
|
25-Nov-2000 |
jlemon |
Lock down the network interface queues. The queue mutex must be obtained before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex.
IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged.
Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
|
#
59604 |
|
24-Apr-2000 |
obrien |
* Use sys/sys/random.h rather than a i386 specific one. * There was nothing that should be machine dependant about i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
|
#
57178 |
|
13-Feb-2000 |
peter |
Clean up some loose ends in the network code, including the X.25 and ISO #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world.
Approved by: jkh
|
#
54263 |
|
07-Dec-1999 |
shin |
udp IPv6 support, IPv6/IPv4 tunneling support in kernel, packet divert at kernel for IPv6/IPv4 translater daemon
This includes queue related patch submitted by jburkhol@home.com.
Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
|
#
52633 |
|
29-Oct-1999 |
joerg |
When getting a RCN event in state ACK_RCVD, RFC 1661 demands that we go to REQ_SENT (and we probably should also log this since it should only happen in a cross-linked connection).
Submitted by: Mark Tinguely <tinguely@plains.NoDak.edu>
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
45152 |
|
30-Mar-1999 |
phk |
rganize the various modes (CISCO/AUTO/DEMAND/LEASED) a little bit better, centralize the code.
Remember to call TLF/TLS on the hardware in CISCO mode.
|
#
44235 |
|
23-Feb-1999 |
phk |
Misplaces brace puts important code into debug section.
Reviewed by: phk Submitted by: Stefan Bethke <stefan.bethke@hanse.de>
|
#
44145 |
|
19-Feb-1999 |
phk |
Remove all the #ifdef notyet stuff, it is probably never going to happen in the first place.
Use 3sec timeout as recommended.
Reorder some debug messages.
Label som of the 0x%x in debug messages
Make sppp_print_bytes() use %*D and handle zero length.
If we don't have MAGIC numbers, don't yell loopback if 0 == 0
|
#
42104 |
|
27-Dec-1998 |
phk |
Update sppp support to i4b level. This includes the new spppcontrol program to set PPP options like authentication with.
|
#
42066 |
|
26-Dec-1998 |
phk |
More isdn4bsd convergence: cleanup log messages.
|
#
42065 |
|
26-Dec-1998 |
phk |
Converge further on the isdn4bsd version of this file.
|
#
42064 |
|
26-Dec-1998 |
phk |
clean up more timeout/untimeout portability stuff. make sure flags and stuff are set sensibly.
|
#
41881 |
|
16-Dec-1998 |
phk |
Straigthen out the use of the tls and tlf callbacks.
Not tested on the if_sr, if_cx and if_ar drivers, but expected to work just the same as it used to.
Any users of these drivers (or even better: donors of hardware for them) please contact phk@freebsd.org so we can test the next batch of changes to if_sppp.
|
#
41686 |
|
11-Dec-1998 |
phk |
*** empty log message ***
|
#
41514 |
|
04-Dec-1998 |
archie |
Examine all occurrences of sprintf(), strcat(), and str[n]cpy() for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
|
#
40010 |
|
06-Oct-1998 |
joerg |
Minor cleanup: kill a couple of unused variables, and a couple of uninitialized variables.
Obtained from: The isdn4bsd project (partially)
|
#
40008 |
|
06-Oct-1998 |
joerg |
In an attempt to reduce the huge number of differences between the FreeBSD repository version of this file and the isdn4bsd version, adopt those changes from the i4b version that make this file BSD-version independent. I attempted to avoid uglifying this file too much, thus deviated a little from the i4b version (and hope they will adopt the changes, too).
The diffs mostly concentrate on:
. #include differences between the systems . different callout handling between FreeBSD vs. Net/OpenBSD . interface naming (Net/OpenBSD store the ASCII name including the unit # in struct ifnet, FreeBSD only the name) . use of random() in FreeBSD vs. time-based pseudo-randomization in Net/OpenBSD (for loopback detection ad CHAP challenges -- i assume at least OpenBSD could also benefit from random(), but that's the way i've got this file) . interface address list elements are named a little differently between FreeBSD and Net/OpenBSD
I attempted to segregate those compat fixes from other code fixes and enhancements.
Obtained from: The isdn4bsd project
|
#
39981 |
|
05-Oct-1998 |
joerg |
Fix a =/== confusion that caused the CHAP type renegotiation to completely fail.
Obtained from: The isdn4bsd project (original author unknown right now)
|
#
38372 |
|
16-Aug-1998 |
bde |
Fixed printf format errors. sppp_dotted_quad() was yet another private, broken, version of inet_ntoa(). It should go away.
|
#
38343 |
|
15-Aug-1998 |
bde |
Fixed yet more ioctl breakage due to the type of the `cmd' arg changing from int to u_long but not changing here.
|
#
37094 |
|
21-Jun-1998 |
bde |
Removed unused includes.
|
#
36119 |
|
17-May-1998 |
phk |
s/nanoruntime/nanouptime/g s/microruntime/microuptime/g
Reviewed by: bde
|
#
35064 |
|
06-Apr-1998 |
phk |
Use random() for seq numbers and read_random for CHAP challenge.
|
#
35060 |
|
06-Apr-1998 |
phk |
Make read_random() take a (void *) argument instead of (char *)
|
#
35029 |
|
04-Apr-1998 |
phk |
Time changes mark 2:
* Figure out UTC relative to boottime. Four new functions provide time relative to boottime.
* move "runtime" into struct proc. This helps fix the calcru() problem in SMP.
* kill mono_time.
* add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!)
* nanosleep, select & poll takes long sleeps one day at a time
Reviewed by: bde Tested by: ache and others
|
#
34961 |
|
30-Mar-1998 |
phk |
Eradicate the variable "time" from the kernel, using various measures. "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part.
Most uses of time.tv_sec now uses the new variable time_second instead.
gettime() changed to getmicrotime(0.
Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it).
A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random.
Add a new nfs_curusec() function.
Mark a couple of bogosities involving the now disappeard time variable.
Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args.
Change profiling in ncr.c to use ticks instead of time. Resolution is the same.
Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences.
Reviewed by: bde
|
#
33939 |
|
01-Mar-1998 |
bde |
Fixed syntax error in previous commit.
|
#
33928 |
|
28-Feb-1998 |
phk |
Make it possible to indicate that we don't care about the remote sides IP address, as long as it isn't 0.0.0.0
|
#
33181 |
|
09-Feb-1998 |
eivind |
Staticize.
|
#
32350 |
|
08-Jan-1998 |
eivind |
Make INET a proper option.
This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-(
This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
|
#
32169 |
|
01-Jan-1998 |
gj |
Reviewed by: Joerg Wunsch In sppp_chap_input: 1) in the CHAP_CHALLENGE case don't output the peer's name if it is not what we expected (DEBUG) since it will be printed out in the course of events anyway. 2) in the CHAP_SUCCESS case test whether the peer is required to authenticate himself [(sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO))], otherwise the state machine may never switch into the network state. I saw this case against 2 different ISPs; they never bothered to authenticate themselves to me.
In sppp_pap_input: in the PAP_ACK case do the same as in 2) above for the same reason.
|
#
31742 |
|
15-Dec-1997 |
eivind |
Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and ifconfig.c only).
I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code inside, as it never could have compiled - doh.)
|
#
30300 |
|
11-Oct-1997 |
joerg |
Jumbo patch to implement PAP and CHAP for sppp(4). Partially based on Serge's (Cronyx's) code in the vendor branch. (FR support not yet merged.)
|
#
29681 |
|
21-Sep-1997 |
gibbs |
Update for new callout interface.
|
#
29024 |
|
01-Sep-1997 |
bde |
Added used #include - don't depend on <sys/mbuf.h> including <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
|
#
28088 |
|
12-Aug-1997 |
kjc |
Fix a traceroute problem in the CISCO HDLC mode. (cisco routers not returning ICMP_TIMXCEED)
use CISCO_UNICAST instead of CISCO_MULTICAST to send normal packets. this is needed for packets to get processed by a cisco router, but doesn't matter if a packet is just forwarded.
Reviewed by:itojun@itojun.org
|
#
28036 |
|
10-Aug-1997 |
joerg |
Implement the LCP fail_counter: if an option has been NAK'ed for more than max_failures attempts, we are going to REJ it, to prevent endless NAK loops.
(This is actually part of a larger local set of modifications i'm running with, but the remainder (PAP & CHAP) ain't ready for prime- time yet.)
|
#
27929 |
|
05-Aug-1997 |
itojun |
PR: kern/4117 Reviewed by: ishii@csl.sony.co.jp, kjc@csl.sony.co.jp
checked with FreeBSD+Riscom - cisco4500 configuration.
|
#
26077 |
|
23-May-1997 |
joerg |
Fix a couple of log()'s that came out with the wrong (default) log level, as opposed to LOG_DEBUG.
|
#
26018 |
|
22-May-1997 |
joerg |
Introduce a third queue per interface, serving only PPP control protocol packets. This queue is the only one being enabled until network phase has been reached.
|
#
25955 |
|
20-May-1997 |
joerg |
Major nit: i've confused link0 and link1 in my brain and/or in either the man page or the source file. Fix this.
Minor problem: don't choke with ENETDOWN early. As long as our output queue has space, put the IP packets there even if IPCP ain't up yet. We will eventually be able delivering them once the PPP state machine came up.
|
#
25944 |
|
19-May-1997 |
joerg |
Major overhaul of the SyncPPP layer. Basically, this comprises now a full implementation of the sate machine as described in RFC1661, and provides support for plugging in various control protocols. I needed this to provide PPP support for the BISDN project (right now).
Unfortunatley, while the existing API was almost up to the point, i needed one minor API change in order to decouple the this-layer- started and this-layer-finished actions from the respective Up and Down events of the lower layer. This requires two additional lines in the attach routines of all existing lower layer interface drivers that are using syncPPP (shortcutting these actions and events). Apart from this, i believe i didn't change the API of all this, so everything should plug in without too many hassles. Please report if i broke something in the existing drivers.
For a list of features (including new ones like dial-on-demand), and things still to be done, please refer to the man page i'll commit asap.
Encouraged by: Serge Vakulenko <vak@cronyx.ru>
|
#
25706 |
|
11-May-1997 |
joerg |
Make sppp's logging human-readable. Also, use log(9), as opposed to printf(9), so the log output doesn't clutter the console.
While i was at it, KNFified some function definitions. This file was very inconsistent in this respect.
|
#
24204 |
|
24-Mar-1997 |
bde |
Don't include <sys/ioctl.h> in the kernel. Stage 2: include <sys/sockio.h> instead of <sys/ioctl.h> in network files.
|
#
22975 |
|
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
20407 |
|
13-Dec-1996 |
wollman |
Convert the interface address and IP interface address structures to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
|
#
17949 |
|
30-Aug-1996 |
jhay |
Get rid of the ifdef MULTICAST's. I think the rest of the kernel got rid of them 2 years ago.
|
#
16288 |
|
10-Jun-1996 |
gpalmer |
Add $Id$
|
#
16287 |
|
10-Jun-1996 |
gpalmer |
Change the use if ifnet.if_lastchange to be more in line with SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
|
#
12820 |
|
14-Dec-1995 |
phk |
Another mega commit to staticize things.
|
#
12495 |
|
27-Nov-1995 |
peter |
Implement some rudimentry IPX support...
|
#
12436 |
|
20-Nov-1995 |
peter |
If a lcp configure request is received in the lcp opened state and it is acknowledged, it should go to the lcp ack sent state.
Don't reply on lcp echo requests when not in the lcp opened state.
If the interface is set to CISCO mode, it should still be marked running when ifconfiged.
Fixed a few indentations that had gone wrong somewhere.
Submitted-by: John.Hay@csir.co.za
|
#
11819 |
|
26-Oct-1995 |
julian |
Reviewed by: julian and jhay@mikom.csir.co.za Submitted by: Mike Mitchell, supervisor@alb.asctmd.com
This is a bulk mport of Mike's IPX/SPX protocol stacks and all the related gunf that goes with it.. it is not guaranteed to work 100% correctly at this time but as we had several people trying to work on it I figured it would be better to get it checked in so they could all get teh same thing to work on..
Mikes been using it for a year or so but on 2.0
more changes and stuff will be merged in from other developers now that this is in.
Mike Mitchell, Network Engineer AMTECH Systems Corporation, Technology and Manufacturing 8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000 supervisor@alb.asctmd.com
|
#
11189 |
|
04-Oct-1995 |
jkh |
This upgrades the driver for Cronyx-Sigma multiplexor boards from version 1.2 to version 1.9. Submitted by: Serge Vakulenko, <vak@cronyx.ru>
|
#
8456 |
|
11-May-1995 |
rgrimes |
Fix -Wformat warnings from LINT kernel.
|
#
6429 |
|
15-Feb-1995 |
jkh |
Nuke some more compiler warnings, while I'm at it..
|
#
5099 |
|
13-Dec-1994 |
wollman |
Add support for two separate cloning flags, one set by the lower layers, and one set by the protocol family. Also add another parameter to rtalloc1() to allow for any interface flags to be ignored; currently this is only useful for RTF_PRCLONING. Get rid of rt_prflags and re-unite with rt_flags. Add T/TCP ``route metrics''.
NB: YOU MUST RECOMPILE `route' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE.
This also adds a new interface parameter, `ifi_physical', which will eventually replace IFF_ALTPHYS as the mechanism for specifying the particular physical connection desired on a multiple-connection card.
NB: YOU MUST RECOMPILE `ifconfig' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE.
|
#
4952 |
|
04-Dec-1994 |
bde |
Fix bogus include paths:
<systm.h> is <sys/systm.h>. <kernel.h> is <sys/kernel.h>.
|
#
4911 |
|
02-Dec-1994 |
wollman |
This commit was generated by cvs2svn to compensate for changes in r4910, which included commits to RCS files with non-trunk default branches.
|
#
4910 |
|
02-Dec-1994 |
wollman |
Cronyx/Sigma sync/async serial driver with PPP support from Serge Vakulenko
|