| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Do not put/remove node references, since this no longer
needed.
- Remove timerActive flag, use callout flags.
- Schedule next callout after doing current one.
Reviewed by: archie
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=138479
|
| |
|
|
|
|
|
| |
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=138420
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Always check that index number passed from userland
is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]
Noticed by: Roman Palagin [1]
Requested by: Yuri Y. Bushmelev [2]
MFC after: 1 week
Notes:
svn path=/head/; revision=138392
|
| |
|
|
|
|
|
|
|
|
| |
This is done to keep both versions in RELENG_5 and support both APIs.
Reviewed by: scottl
Approved by: julian (mentor), implicitly
Notes:
svn path=/head/; revision=138268
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
call net_add_domain(). Calling this function too early (or late) breaks
assertations about the global domains list.
Actually it should be forbidden to call net_add_domain() outside of
SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse
the domains list unprotected, but for now we allow late calls (mostly to
support netgraph). In order to really fix this we have to lock the domains
list in all places or find another way to ensure that we can safely walk the
list while another thread might be adding a new domain.
Spotted by: se
Reviewed by: julian, glebius
PR: kern/73321 (partly)
Notes:
svn path=/head/; revision=138238
|
| |
|
|
|
|
|
|
|
|
| |
normal PPP compression, as a workaround for certain (arguably) broken
Linux PPP implementations that can't handle this particular case.
MFC after: 1 week
Notes:
svn path=/head/; revision=138138
|
| |
|
|
|
|
|
|
|
|
| |
LINK_IS_UP/LINK_IS_DOWN messages.
Approved by: julian (mentor), implicitly
MFC after: 1 week
Notes:
svn path=/head/; revision=138011
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It means, that node listens to flow control messages from downstreams
and removes link from list of active links whenever a LINK_IS_DOWN message
is received. If LINK_IS_UP message is received, then links is put
back into list of active links.
Approved by: julian (mentor), implicitly
MFC after: 1 week
Notes:
svn path=/head/; revision=138010
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Implement some netgraph flow control:
- Whenever status of HDLC heartbeat from pear is timed out,
send NGM_LINK_IS_DOWN message.
- If HDLC link changes status from down to up, send
NGM_LINK_IS_UP message.
Approved by: julian (mentor), implicitly
MFC after: 1 week
Notes:
svn path=/head/; revision=138009
|
| |
|
|
|
|
|
| |
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137899
|
| |
|
|
|
|
|
|
|
| |
item leak, I've introduced with previous change.
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137897
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137896
|
| |
|
|
|
|
|
| |
Approved by: marks
Notes:
svn path=/head/; revision=137525
|
| |
|
|
|
|
|
|
|
| |
default elements in net_init_domain().
This makes it possible to grep these structures and see any bogosities.
Notes:
svn path=/head/; revision=137386
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
out c->c_func, we can't take it after callout_stop(). To take it before
we need to acquire callout_lock, to avoid race. This commit narrows
down area where lock is held, but hack is still present.
This should be redesigned.
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137230
|
| |
|
|
|
|
|
|
|
| |
the callout instead of the timeout interface.
Submitted by: glebius
Notes:
svn path=/head/; revision=137199
|
| |
|
|
|
|
|
| |
Submitted by: glebius
Notes:
svn path=/head/; revision=137163
|
| |
|
|
|
|
|
|
|
|
| |
- Remove callout-hacking from ng_untimeout().
Approved by: julian (mentor)
MFC after: 1 month
Notes:
svn path=/head/; revision=137138
|
| |
|
|
|
|
|
| |
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137136
|
| |
|
|
|
|
|
|
| |
field created for line disciplne drivers private use. Also add NET_NEEDS_GIANT
warning. For whatever reason ng_tty(4) was fixed but ng_h4(4) was not :(
Notes:
svn path=/head/; revision=137133
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137115
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- tabs after defines
- tabs instead of many spaces
- sort local variables by size
o remove spl(9) calls
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137114
|
| |
|
|
|
|
|
|
|
|
|
| |
macros with 'do {} while (0)' to avoid error in case macro is
not defined.
Prodded by: julian, archie
Pointy hat to: glebius
Notes:
svn path=/head/; revision=137100
|
| |
|
|
|
|
|
|
| |
Requested by: maxim
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=137022
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(sorele()/sotryfree()):
- This permits the caller to acquire the accept mutex before the socket
mutex, avoiding sofree() having to drop the socket mutex and re-order,
which could lead to races permitting more than one thread to enter
sofree() after a socket is ready to be free'd.
- This also covers clearing of the so_pcb weak socket reference from
the protocol to the socket, preventing races in clearing and
evaluation of the reference such that sofree() might be called more
than once on the same socket.
This appears to close a race I was able to easily trigger by repeatedly
opening and resetting TCP connections to a host, in which the
tcp_close() code called as a result of the RST raced with the close()
of the accepted socket in the user process resulting in simultaneous
attempts to de-allocate the same socket. The new locking increases
the overhead for operations that may potentially free the socket, so we
will want to revise the synchronization strategy here as we normalize
the reference counting model for sockets. The use of the accept mutex
in freeing of sockets that are not listen sockets is primarily
motivated by the potential need to remove the socket from the
incomplete connection queue on its parent (listen) socket, so cleaning
up the reference model here may allow us to substantially weaken the
synchronization requirements.
RELENG_5_3 candidate.
MFC after: 3 days
Reviewed by: dwhite
Discussed with: gnn, dwhite, green
Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de>
Reported by: Vlad <marchenko at gmail dot com>
Notes:
svn path=/head/; revision=136682
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
List of functional changes:
- Make a single device per single node with a single hook.
This gives us parrallelizm, which can't be achieved on a single
node with many devices/hooks. This also gives us flexibility - we
can play with a particular device node, not affecting others.
- Remove read queue as it is. Use struct ifqueue instead. This change
removes a lot of extra memcpy()ing, m_devget()ting and m_copymem()ming.
In ng_device_receivedata() we enqueue an mbuf and wake readers.
In ngdread() we take one mbuf from qeueue and uiomove() it to
userspace. If no mbuf is present we optionally block. [1]
- In ngdwrite() we create an mbuf from uio using m_uiotombuf().
This is faster then uiomove() into buffer, and then m_copydata(),
and this is much better than huge m_pullup().
- Perform locking of device
- Perform locking of connection list.
- Clear out _rcvmsg method, since it does nothing good yet.
- Implement NGM_DEVICE_GET_DEVNAME message.
- #if 0 ioctl method, while nothing is done here yet.
- Return immediately from ngdwrite() if uio_resid == 0.
List of tidyness changes:
- Introduce device2priv(), to remove cut'n'paste.
- Use MALLOC/FREE, instead of malloc/free.
- Use unit2minor().
- Use UID_ROOT/GID_WHEEL instead of 0/0.
- Define NGD_DEVICE_DEVNAME, use it.
- Use more nice macros for debugging. [2]
- Return Exxx, not -1.
style(9) changes:
- No "#endif" after short block.
- Break long lines.
- Remove extra spaces, add needed spaces.
[1] Obtained from: if_tun.c
[2] Obtained from: ng_pppoe.c
Reviewed by: marks
Approved by: julian (mentor)
MFC after: 1 month
Notes:
svn path=/head/; revision=136673
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The original idea was to use it for firmware upgrading and similar
operations. In real life almost all Bluetooth USB devices do not
need firmware download. If device does require firmware download
then ugen(4) (or specialized driver like ubtbcmfw(8)) should be
used instead.
MFC after: 3 days
Notes:
svn path=/head/; revision=136460
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- push all bridge logic from if_ethersubr.c into bridge.c
make bridge_in() return mbuf pointer (or NULL).
- call only bridge_in() from ether_input(), after ng_ether_input()
was optinally called.
- call bridge_in() from ng_ether_rcv_upper().
Long description: http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html
Reported by: Jian-Wei Wang <jwwang at FreeBSD.csie.NCTU.edu.tw>
Tested by: myself, Sergey Lyubka
Reviewed by: sam
Approved by: julian (mentor)
MFC after: 2 months
Notes:
svn path=/head/; revision=136428
|
| |
|
|
| |
Notes:
svn path=/head/; revision=136312
|
| |
|
|
|
|
|
|
|
| |
reserved for the device drivers:
Add a t_lsc field for line discipline private use.
Notes:
svn path=/head/; revision=135406
|
| |
|
|
|
|
|
|
|
| |
- Change my email to glebius@FreeBSD.org
Requested by: ru [1]
Notes:
svn path=/head/; revision=135400
|
| |
|
|
|
|
|
|
| |
Supported by: Bestcom ISP, Rinet ISP
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=135332
|
| |
|
|
| |
Notes:
svn path=/head/; revision=135075
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
loss links, and 1 second appeared to be too small for high latency links.
If we will receive more complaints, we should make this parameter configurable.
PR: kern/69536
Approved by: archie, julian (mentor)
MFC after: 3 days
Notes:
svn path=/head/; revision=134865
|
| |
|
|
|
|
|
|
|
| |
and optionally use &thread0 if it's NULL.
Spotted by: julian
Notes:
svn path=/head/; revision=134651
|
| |
|
|
|
|
|
|
|
|
|
| |
We now no longer hold Giant in send(), so it isn't inheritted by the
linker, which calls into VFS.
Reported by: glebius
Discussed with: glebius, bz
Notes:
svn path=/head/; revision=134521
|
| |
|
|
|
|
|
|
|
|
| |
operation using NET_NEEDS_GIANT(). This will result in a boot-time
restoration of Giant-enabled network operation, or run-time warning on
dynamic load (applicable only to the Netgraph component). Additional
components will likely need to be marked with this in the future.
Notes:
svn path=/head/; revision=134445
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=134391
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
requires a recompile of netgraph users.
Also change the size of a field in the bluetooth code
that was waiting for the next change that needed recompiles so
it could piggyback its way in.
Submitted by: jdp, maksim
MFC after: 2 days
Notes:
svn path=/head/; revision=134057
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and preserves the ipfw ABI. The ipfw core packet inspection and filtering
functions have not been changed, only how ipfw is invoked is different.
However there are many changes how ipfw is and its add-on's are handled:
In general ipfw is now called through the PFIL_HOOKS and most associated
magic, that was in ip_input() or ip_output() previously, is now done in
ipfw_check_[in|out]() in the ipfw PFIL handler.
IPDIVERT is entirely handled within the ipfw PFIL handlers. A packet to
be diverted is checked if it is fragmented, if yes, ip_reass() gets in for
reassembly. If not, or all fragments arrived and the packet is complete,
divert_packet is called directly. For 'tee' no reassembly attempt is made
and a copy of the packet is sent to the divert socket unmodified. The
original packet continues its way through ip_input/output().
ipfw 'forward' is done via m_tag's. The ipfw PFIL handlers tag the packet
with the new destination sockaddr_in. A check if the new destination is a
local IP address is made and the m_flags are set appropriately. ip_input()
and ip_output() have some more work to do here. For ip_input() the m_flags
are checked and a packet for us is directly sent to the 'ours' section for
further processing. Destination changes on the input path are only tagged
and the 'srcrt' flag to ip_forward() is set to disable destination checks
and ICMP replies at this stage. The tag is going to be handled on output.
ip_output() again checks for m_flags and the 'ours' tag. If found, the
packet will be dropped back to the IP netisr where it is going to be picked
up by ip_input() again and the directly sent to the 'ours' section. When
only the destination changes, the route's 'dst' is overwritten with the
new destination from the forward m_tag. Then it jumps back at the route
lookup again and skips the firewall check because it has been marked with
M_SKIP_FIREWALL. ipfw 'forward' has to be compiled into the kernel with
'option IPFIREWALL_FORWARD' to enable it.
DUMMYNET is entirely handled within the ipfw PFIL handlers. A packet for
a dummynet pipe or queue is directly sent to dummynet_io(). Dummynet will
then inject it back into ip_input/ip_output() after it has served its time.
Dummynet packets are tagged and will continue from the next rule when they
hit the ipfw PFIL handlers again after re-injection.
BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as
they did before. Later this will be changed to dedicated ETHER PFIL_HOOKS.
More detailed changes to the code:
conf/files
Add netinet/ip_fw_pfil.c.
conf/options
Add IPFIREWALL_FORWARD option.
modules/ipfw/Makefile
Add ip_fw_pfil.c.
net/bridge.c
Disable PFIL_HOOKS if ipfw for bridging is active. Bridging ipfw
is still directly invoked to handle layer2 headers and packets would
get a double ipfw when run through PFIL_HOOKS as well.
netinet/ip_divert.c
Removed divert_clone() function. It is no longer used.
netinet/ip_dummynet.[ch]
Neither the route 'ro' nor the destination 'dst' need to be stored
while in dummynet transit. Structure members and associated macros
are removed.
netinet/ip_fastfwd.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code.
netinet/ip_fw.h
Removed 'ro' and 'dst' from struct ip_fw_args.
netinet/ip_fw2.c
(Re)moved some global variables and the module handling.
netinet/ip_fw_pfil.c
New file containing the ipfw PFIL handlers and module initialization.
netinet/ip_input.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code. ip_forward() does not longer require
the 'next_hop' struct sockaddr_in argument. Disable early checks
if 'srcrt' is set.
netinet/ip_output.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code.
netinet/ip_var.h
Add ip_reass() as general function. (Used from ipfw PFIL handlers
for IPDIVERT.)
netinet/raw_ip.c
Directly check if ipfw and dummynet control pointers are active.
netinet/tcp_input.c
Rework the 'ipfw forward' to local code to work with the new way of
forward tags.
netinet/tcp_sack.c
Remove include 'opt_ipfw.h' which is not needed here.
sys/mbuf.h
Remove m_claim_next() macro which was exclusively for ipfw 'forward'
and is no longer needed.
Approved by: re (scottl)
Notes:
svn path=/head/; revision=133920
|
| |
|
|
|
|
|
| |
node for ATM. This node implements the API to the signalling services.
Notes:
svn path=/head/; revision=133578
|
| |
|
|
| |
Notes:
svn path=/head/; revision=133415
|
| |
|
|
|
|
|
|
|
|
| |
for L2TP tunnel statistics (which do not take an argument sessionID).
Reviewed by: archie
Approved by: pjd (mentor)
Notes:
svn path=/head/; revision=133060
|
| |
|
|
|
|
|
|
| |
Reviewed by: archie
Approved by: pjd (mentor)
Notes:
svn path=/head/; revision=133058
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- according to RFC2661 an offset size of 0 is allowed.
- when skipping offset padding do not forget to also skip
the 2 octets of the offset size field.
Reviewed by: archie
Approved by: pjd (mentor)
Notes:
svn path=/head/; revision=133056
|
| |
|
|
|
|
|
|
|
|
|
|
| |
link[n].latency calculated from user supplied value.
This prevents repeated NGM_PPP_SET_CONFIG/NGM_PPP_GET_CONFIG
from failing because of link[n].conf.latency being out of range.
Reviewed by: archie
Approved by: pjd (mentor)
Notes:
svn path=/head/; revision=133055
|
| |
|
|
|
|
|
|
|
|
|
| |
in enum {}, and then redefined with #define.
No warnings from compiler, though.
Submitted by: bz
Pointy hat to: glebius
Notes:
svn path=/head/; revision=132975
|
| |
|
|
|
|
|
|
|
| |
of many nodes.
Pointy hat to: glebius
Notes:
svn path=/head/; revision=132939
|
| |
|
|
|
|
|
| |
Approved by: julian (mentor)
Notes:
svn path=/head/; revision=132828
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132780
|