Commit Graph

657 Commits

Author SHA1 Message Date
Gleb Smirnoff
644168eedb Add macro NG_COPYMESSAGE(), which allocates memory and creates a
copy of given control message.
2005-04-20 12:18:22 +00:00
Gleb Smirnoff
bc90ff47ff Fix panics with misconfigured routing:
- Backout previous revision, the check is useless.
- Turn node to queue mode, since it is edge node.

Reported by:	sem
2005-04-18 11:32:17 +00:00
Gleb Smirnoff
dfc17a329e - Return error, if there was one.
- No need to initialize error here.

PR:		kern/79884
Submitted by:	Wojciech A. Koszek
2005-04-15 10:14:00 +00:00
Gleb Smirnoff
20064a62a9 NG_MKRESPONSE() macro includes sizeof struct ng_mesg when doing allocation.
PR:		kern/79806
Submitted by:	Wojciech A. Koszek
2005-04-13 14:03:28 +00:00
Gleb Smirnoff
d6bd5ec90c Remove goto. 2005-04-11 10:16:17 +00:00
Peter Wemm
e76ce25370 Change the embedded module name from "bluetooth" to "ng_bluetooth" to match
the rest of the names assigned to this object.
2005-04-08 05:13:53 +00:00
Maksim Yevmenkin
dc612cfc34 Correct typo that could cause FIFO overflow.
PR:		kern/78431
MFC after:	3 days
2005-04-06 22:09:32 +00:00
Maksim Yevmenkin
aa9e985aed Remove PR_ATOMIC flag in ng_btsocket_protosw[] for BLUETOOTH_PROTO_RFCOMM
protocol. RFCOMM is a SOCK_STREAM protocol not SOCK_SEQPACKET. This was a
serious bug caused by cut-and-paste. I'm surprised it did not bite me before.
Dunce hat goes to me.

MFC after:	3 days
2005-04-06 20:54:05 +00:00
Maksim Yevmenkin
f93b258c94 In ng_btsocket_rfcomm_receive_frame() correctly set length variable when
EA bit is set in hdr->length (16-bit length). This currently has no effect
on the rest of the code. It just fixes the debug message.

MFC After:	3 weeks
2005-04-06 18:55:58 +00:00
Gleb Smirnoff
d8f5d037f8 Major overhaul and cleanup of ng_source node.
Functional changes:
- Cut struct source_hookinfo. Just use hook_p pointer.
- Remove "start_now" command. "start" command now requires number of
  packets to send as argument. "start" command actually starts sending.
  Move the code that actually starts sending from ng_source_rcvmsg()
  to ng_source_start().
- Remove check for NG_SOURCE_ACTIVE in ng_source_stop(). We can be called
  with flag cleared (see begin of ng_source_intr()).
- If NG_SEND_DATA_ONLY() use log(LOG_DEBUG) instead of printf(). Otherwise
  we will *flood* console.
- Add ng_connect_t method, which sends NGM_ETHER_GET_IFNAME command
  to "output" hook. Cut ng_source_request_output_ifp(). Refactor
  ng_source_store_output_ifp() to use ifunit() and don't muck through
  interface list.
- Add "setiface" command, which gives ability to configure interface
  in case when ng_source_connect() failed. This happens, when we are not
  connected directly to ng_ether(4) node.
- Remove KASSERTs, which can never fire.
- Don't check for M_PKTHDR in rcvdata method. netgraph(4) does this
  for us.

Style:
- Assign sc_p = NG_NODE_PRIVATE(node) in declaration, to be
  consistent with style of other nodes.
- Sort variables.
- u_intXX -> uintXX.
- Dots at ends of comments.

Sponsored by:   Rambler
2005-04-05 17:22:05 +00:00
Brooks Davis
6d9a161274 Don't init ifp->if_addrhead, if_attach() does it for us. 2005-04-03 05:21:29 +00:00
Gleb Smirnoff
9818b82ff3 Add a possibility to bypass unmodified accounted data to special
hook(s). Data received on these hook(s) is sent back to ifaceX hook(s).
2005-03-22 15:49:22 +00:00
Gleb Smirnoff
2b38b68736 Refactor node so that it does not modify mbuf contents. Next step would
be pass-thru mode, when traffic is not copied by ng_tee, but passed thru
ng_netflow.

Changes made:

- In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
  IP header, and TCP/UDP header.
- Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
  headers are guaranteed to by after it.
- Merge make_flow_rec() function into ng_netflow_flow_add().
2005-03-21 15:40:25 +00:00
Gleb Smirnoff
1d03bd1684 Refactor node so that it does not modify mbuf contents. Next step would
be pass-thru mode, when traffic is not copied by ng_tee, but passed thru
ng_netflow.

Changes made:

- In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
  IP header, and TCP/UDP header.
- Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
  headers are guaranteed to by after it.
- Merge make_flow_rec() function into ng_netflow_flow_add().
2005-03-21 15:34:03 +00:00
Gleb Smirnoff
0e406d0f63 Plug item leak, which occured when m_pullup() failed. 2005-03-21 11:48:54 +00:00
Gleb Smirnoff
c1249c6338 - Don't lose TCP flags of the first packet in a flow.
- Don't account length of the first packet in a flow twice.
2005-03-20 21:03:43 +00:00
Gleb Smirnoff
30afbe338b Remove ng_connect_t where it is unused. Probably it remained from ng_source.c. 2005-03-14 20:49:48 +00:00
Gleb Smirnoff
8633e59c17 Use subr_unit allocator instead of own functions. 2005-03-14 20:11:29 +00:00
Gleb Smirnoff
933fedbacc Use subr_unit allocator instead of own functions. 2005-03-14 19:25:24 +00:00
Gleb Smirnoff
5cdd064d8a o Use subr_unit allocator. This simplifies code much:
- Remove get_free_unit().
  - Remove SLIST of nodes.
  - Remove global mutex.

o Increase NGD_MAX to 999.
o Move ngd_mod_event() up to netgraph methods.
2005-03-14 16:02:53 +00:00
Gleb Smirnoff
43eca7506e Fix getting stats from many links with index > 0.
Submitted by:	Richard Kojedzinszky
MFC after:	3 days
2005-03-11 10:29:38 +00:00
Bosko Milekic
2b0ffc0216 Make some basic grammar and style fixes to ng_source.c and ng_source.h.
The latter was particularly violated by someone's editor in the past, due
to an effect I like to call "premature linewrapping."
2005-03-10 21:50:50 +00:00
Gleb Smirnoff
1436fff881 Plug item leak in macro NG_RESPOND_MSG. Item was leaked when destination
node couldn't be addressed.

Submitted by:	Roselyn Lee
2005-03-10 19:34:20 +00:00
Gleb Smirnoff
8bb55179ad Plug item leak in case when NGI_FN is applied to invalid node.
Submitted by:	Roselyn Lee
MFC after:	3 days
2005-03-10 19:27:08 +00:00
Gleb Smirnoff
5fac4ee9ab Cisco uses milliseconds for uptime. This is stupid. Nobody cares of such
precision when IP packet may travel through internet for several seconds.
Also uptime measured in milliseconds overflows every 48+ days.
But we have to do same to keep compatibility with Cisco and flow-tools.

Make a macro MILLIUPTIME, which does overflowable multiplication to 1000.

Requested by:	Sergey Ryabin, Oleg Bulyzhin
MFC after:	1 week
2005-03-03 11:01:05 +00:00
Ruslan Ermilov
a9a03de54d Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input().
The bug was found by running ng_dummy(4) node configured with a
delay, in front of the ng_eiface(4) node.
2005-03-01 19:39:57 +00:00
Gleb Smirnoff
f627a37920 Replace NG_PARSE_APPEND() macro with ng_parse_append() function. Check
its return value and free resources if function returns error. Plug
several memory leaks with this change.

Submitted by:	archie
Found by:	Coverity Prevent analysis tool
2005-03-01 11:31:06 +00:00
Sam Leffler
81c95c5292 move ptr use down to after null check
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	emax
2005-02-26 02:31:34 +00:00
Robert Watson
0daccb9c94 In the current world order, solisten() implements the state transition of
a socket from a regular socket to a listening socket able to accept new
connections.  As part of this state transition, solisten() calls into the
protocol to update protocol-layer state.  There were several bugs in this
implementation that could result in a race wherein a TCP SYN received
in the interval between the protocol state transition and the shortly
following socket layer transition would result in a panic in the TCP code,
as the socket would be in the TCPS_LISTEN state, but the socket would not
have the SO_ACCEPTCONN flag set.

This change does the following:

- Pushes the socket state transition from the socket layer solisten() to
  to socket "library" routines called from the protocol.  This permits
  the socket routines to be called while holding the protocol mutexes,
  preventing a race exposing the incomplete socket state transition to TCP
  after the TCP state transition has completed.  The check for a socket
  layer state transition is performed by solisten_proto_check(), and the
  actual transition is performed by solisten_proto().

- Holds the socket lock for the duration of the socket state test and set,
  and over the protocol layer state transition, which is now possible as
  the socket lock is acquired by the protocol layer, rather than vice
  versa.  This prevents additional state related races in the socket
  layer.

This permits the dual transition of socket layer and protocol layer state
to occur while holding locks for both layers, making the two changes
atomic with respect to one another.  Similar changes are likely require
elsewhere in the socket/protocol code.

Reported by:		Peter Holm <peter@holm.cc>
Review and fixes from:	emax, Antoine Brodin <antoine.brodin@laposte.net>
Philosophical head nod:	gnn
2005-02-21 21:58:17 +00:00
Gleb Smirnoff
f1c6a420b1 Reimplement recursion protection, checking whether current thread holds
sockbuf mutex.

Reviewed by:	rwatson
2005-02-19 14:41:49 +00:00
Gleb Smirnoff
848a25c773 Remove a recursion protection, which we inherited from splnet() netgraph times.
Now several threads may write data to ng_ksocket. Locking of socket is done in
sosend().

Reviewed by:	archie, julian, rwatson
MFC after:	2 weeks
2005-02-16 16:00:35 +00:00
Gleb Smirnoff
843cfd5ae0 Make WITNESS happier:
- refactor ngd_constructor, so that make_dev() is called without
  any locks held, since it mallocs memory with M_WAITOK flag.
- rename global mtx, to have name different to per-node mtx

MFC after:	2 weeks
2005-02-14 13:47:06 +00:00
Gleb Smirnoff
cefddd662e Add new netgraph control message NGM_ETHER_DETACH, which actually
removes netgraph node and unwraps Ethernet interface.

This gives us ability to unload ng_ether.ko, when all interfaces
are detached, making ng_ether(4) developers happy.

Reviewed by:	ru
2005-02-14 12:01:09 +00:00
Archie Cobbs
cd22454e8b Bump cookie value to reflect change in NGM_IFACE_GET_IFNAME semantics. 2005-02-13 16:36:41 +00:00
Ruslan Ermilov
48f4d9918c Drop mythical module dependency on ng_ether. 2005-02-13 00:50:18 +00:00
Gleb Smirnoff
b5fe181661 Restore previous cookie. Old programs will work with new node OK,
new programs with old node wil receive EINVAL trying to access new
messages.

Submitted by:	ru
2005-02-12 19:23:20 +00:00
Gleb Smirnoff
ba20540e3d - bzero sockaddr_dl
- use constant instead of number

Suggested by:	ru
2005-02-12 19:19:29 +00:00
Ruslan Ermilov
3667c04da9 Fix typo in a comment. 2005-02-12 18:10:26 +00:00
Ruslan Ermilov
0572dfac4b Fallout from the ALTQ import. 2005-02-12 17:03:01 +00:00
Gleb Smirnoff
d96bd8d144 Allocate enough space for new tag.
Pointy hat to:	glebius
2005-02-12 16:26:36 +00:00
Gleb Smirnoff
b07785ef50 When netgraph(4) was converted to use mbuf_tags(9) instead of meta-data
a definite setup was broken: two ng_ksockets are connected to each other,
connect()ed to different remote hosts, and bind()ed to different local
interfaces. In this case one ng_ksocket is fooled with tag from the other
one.

Put node id into tag. In rcvdata method utilize tag only if it has our
own id inside or id equals zero. The latter case is added to support
packets send by some third, not ng_ksocket node.

MFC after:	1 week
2005-02-12 14:54:19 +00:00
Gleb Smirnoff
810d5e89f4 Add two new netgraph messages NGM_ETHER_ADD_MULTI and NGM_ETHER_DEL_MULTI,
to join and leave Ethernet multicast membership, respectively. Messages
take MAC address as argument.

Sponsored by:	Rinet ISP
2005-02-12 11:41:32 +00:00
Ruslan Ermilov
953a8b2e6d Removed redundant MODULE_VERSION(). 2005-02-12 11:14:25 +00:00
Gleb Smirnoff
687809752d Make netgraph ISR and callout MPSAFE.
Reviewed by:	rwatson, ru
2005-02-12 09:52:36 +00:00
Gleb Smirnoff
06a411d34c style: fix indentation and spacing.
Submitted by:	ru
2005-02-11 23:17:50 +00:00
Gleb Smirnoff
8c6f962996 Do not trust ipfw: check m_len always, not only after m_dup.
Submitted by:	ru
2005-02-11 23:07:22 +00:00
Gleb Smirnoff
aa4e078a04 - do m_pullup() after m_dup()
- clean style in previous commit

Suggested by:	ru
2005-02-11 22:28:58 +00:00
Gleb Smirnoff
0a1a279e93 pullup to sizeof struct ip before sending to ip_output.
Suggested by:	ru
2005-02-11 21:26:39 +00:00
Gleb Smirnoff
19b5577638 Packets from ipfw come with IP header in host byte order. Netgraph works
with net byte order. Change byte order to net in ng_ipfw_input(), change
byte order to host before ip_output(), do not change before ip_input().

In collaboration with:	ru
2005-02-11 20:53:41 +00:00
Poul-Henning Kamp
b1cb412630 Make M_NETGRAPH_ETF static 2005-02-10 12:26:57 +00:00
Archie Cobbs
25b67768f0 Fix incorrect comment.
Submitted by:	James Bowman <jamesb@acelere.net>
2005-02-10 02:43:26 +00:00
Ruslan Ermilov
195cf61776 In revision 1.29 timeout() was converted to ng_callout().
The difference is that the callout function installed via the
ng_callout() method is guaranteed to NOT fire after the shutdown
method was run (when a node is marked NGF_INVALID).  Also, the
shutdown method and the callout function are guaranteed to NOT
run at the same time, as both require the writer lock.  Thus
we can safely ignore a zero return value from ng_uncallout()
(callout_stop()) in shutdown methods, and go on with freeing
the node.

The said revision broke the node shutdown -- ng_bridge_timeout()
is no longer fired after ng_bridge_shutdown() was run, resulting
in a memory leak, dead nodes, and inability to unload the module.
Fix this by cancelling the callout on shutdown, and moving part
responsible for freeing a node resources from ng_bridge_timer()
to ng_bridge_shutdown().

Noticed by:	ru
Submitted by:	glebius, ru
2005-02-09 15:14:44 +00:00
Ruslan Ermilov
a921fb33b6 bzero() -> M_ZERO. 2005-02-08 10:31:55 +00:00
Gleb Smirnoff
ad1376cc73 Improve parsing of hook name.
Submitted by:	ru
2005-02-07 11:16:07 +00:00
Gleb Smirnoff
2c42caf7f0 Whitespace. 2005-02-06 19:24:59 +00:00
Gleb Smirnoff
50633c3a9f Remove comment which left after removal of ng_rcvdataq_t.
MFC after:	1 week
2005-02-06 19:20:16 +00:00
Gleb Smirnoff
4feaf224b8 Increase size of arglen to uint32_t, since uint16_t proved to be
not enough (e.g. listing 911 nodes). Bump NG_VERSION.

Reviewed by:	julian, archie, ru
2005-02-05 23:23:14 +00:00
Gleb Smirnoff
670742a102 Add a ng_ipfw node, implementing a quick and simple interface between
ipfw(4) and netgraph(4) facilities.

Reviewed by:	andre, brooks, julian
2005-02-05 12:06:33 +00:00
Gleb Smirnoff
d1240630b3 Expire aged flows in normal expiry thread. This fixes the problem, when
a node disconnected from all sources of traffic never purges its cache.
2005-02-05 10:00:04 +00:00
Gleb Smirnoff
020d3f61d8 Break long lines in code and comments. 2005-02-05 09:08:33 +00:00
Ruslan Ermilov
30aabc9afd Create a per-module mutex on MOD_LOAD, and destroy it on MOD_UNLOAD.
(This fixes witness_destroy() panic after module unload.)

OK'ed by:	rwatson, julian
2005-02-05 08:28:36 +00:00
Gleb Smirnoff
a436589ae2 Do check that version of a message from userland matches ours.
MFC after:	3 days
2005-02-04 21:38:42 +00:00
Gleb Smirnoff
7a1725fc46 - Fix build with TRACE_MESSAGES defined
- Remove extra parenthesis
2005-02-04 16:08:20 +00:00
Ruslan Ermilov
72369c34ac Parse "getifname" using the standard parse string type.
Fixed an off-by-one error when dealing with interface name
(if_xname is NUL-terminated).

Don't waste time making a copy of if_xname in constructor.
2005-02-03 13:03:31 +00:00
Ruslan Ermilov
96f82336ba Fixed an off-by-one error when dealing with interface name
(if_xname is NUL-terminated).

Don't waste time making a copy of if_xname in attach().
2005-02-03 12:54:18 +00:00
Ruslan Ermilov
bbb75d7844 Fixed an off-by-one error when dealing with interface name
(if_xname is IFNAMSIZ-sized and NUL-terminated).
2005-02-03 12:50:10 +00:00
Ruslan Ermilov
c60878f0d2 Added ASCII version of the NGM_EIFACE_GET_IFNAME message, "getifname". 2005-02-03 11:52:42 +00:00
Ruslan Ermilov
c266fbc2aa Removed unused includes. 2005-02-03 11:28:53 +00:00
Ruslan Ermilov
fcee8ae2e5 Fix the comment. 2005-02-02 14:02:40 +00:00
Ruslan Ermilov
48039d2d1d Whitespace and "const" changes to reduce diffs to RELENG_4.
(Gives the same object when compiled without NETGRAPH_DEBUG.)
2005-02-02 13:27:03 +00:00
Gleb Smirnoff
6aa1da2917 In case of various tunneling protocols, mbuf may pass several interfaces
before entering ng_netflow. In this case it will have not NULL m_pkthdr.rcvif.
However, it will enter ng_iface soon with another index. So let in_ifIndex
value configured by user override m_pkthdr.rcvif.

Reported by:	Damir Bikmuhametov
MFC after:	1 week
2005-02-01 14:07:05 +00:00
Gleb Smirnoff
1fbb36ff80 Rename ng_callout_trapoline to ng_callout_trampoline.
Requested by:	ru
2005-01-26 09:01:50 +00:00
Gleb Smirnoff
7b26345646 With recent changes to _callout_stop_safe() we can remove a hack
in ng_uncallout().
2005-01-25 22:08:19 +00:00
Gleb Smirnoff
19724144d6 Fix an evil typo.
Submitted by:	Roselyn Lee
MFC after:	3 days
2005-01-24 13:32:19 +00:00
Gleb Smirnoff
18c54fe665 Use log() instead of printf(), to reduce flood on console.
MFC after:	1 week
2005-01-20 13:28:39 +00:00
Roman Kurakin
5e93f2e558 Ups, misprint, change and => add.
Submitted by: ru
2005-01-16 23:30:45 +00:00
Roman Kurakin
67fb03d261 Fix comment. Code 0x95 means locking shift to codeset 5 according to
T1.617 AnnexD.
Locking shift procedure is described in ANSI T1.607.

MFC after:	3 days
2005-01-16 19:22:09 +00:00
Roman Kurakin
d62d2396c3 Fix variable name in comment num=>alen. (Lost part of commit rev 1.2)
MFC after:	3 days
2005-01-16 19:12:27 +00:00
Gleb Smirnoff
d0aa4b3fa0 Raise & drop IFF_RUNNING upon receival of netgraph flow control
messages.
2005-01-14 11:55:07 +00:00
Gleb Smirnoff
e3d0434573 Consider IFF_UP as "administratively up" flag, and IFF_RUNNING as
"operationally up" flag. Hence this, revert 1.35 to use IFF_RUNNING.
2005-01-14 11:52:45 +00:00
Gleb Smirnoff
d1426d7fc5 Locking and cleanup of tty netgraph node. Tty stack is Giant-locked,
so we need to acquire Giant in netgraph methods, so that we don't
race with line discipline methods. Remove NET_NEEDS_GIANT.

- Packets coming into node from netgraph are queued in ifqueue
  attached to node private data.
- Mutex in struct ifqueue is used to lock not only the queue, but
  the whole private data, and tp->t_lsc field.
- tp->t_lsc pointer is used to indicate whether line discipline is
  attached to netgraph or not.
- Use FLG_DIE flag to indicate that node may be destroyed.
  (This protection doesn't work, and it didn't before. Must be redesigned.)
- Increment ngt_unit atomically, removing mutex.
- Acquire Giant, when executing ngt_start() from netgraph context.
- Acquire Giant, when {,de}registering line discipline.
- Uncomment forcing queue mode on peers hook, since this is reasonable.
- Force queue mode on our hook, to avoid acquiring Giant when coming from
  network stack. We may already hold some mutexes at this point.

Cleanups:
- Use callout_pending() instead of our own flag.
- Remove spl(9) calls. Now we can use return() instead of ERROUT().

style(9):
- Sort includes.
- Sparse initializer for struct linesw.
- Remove some empty lines, sort declarations.

Reviewed by:	julian, phk
MFC after:	1 month
2005-01-13 07:43:12 +00:00
Gleb Smirnoff
dc2f4d7f5f Utilize callout_pending() macro 2005-01-11 12:20:28 +00:00
Gleb Smirnoff
9ce4c18856 - Use ng_callout() instead of timeout(9).
- Remove spl(9) calls.

XXX:	not tested
2005-01-11 11:59:59 +00:00
Gleb Smirnoff
c00e2d15b7 - Use ng_callout() instead of home-grown implementation.
Submitted by:	emax
2005-01-11 11:55:56 +00:00
Gleb Smirnoff
0ef8db8ff2 - Use ng_callout() instead of callout_reset(9).
- Use callout_pending() instead of our own flags.
- Remove home-grown protection of node, which has a scheduled
  callout().
- Remove spl(9) calls.

Tested by:	bz
2005-01-11 11:51:17 +00:00
Maksim Yevmenkin
980b8b89eb Make default RFCOMM session MTU match default L2CAP MTU.
This is just a workaround for a know problem with Motorola E1000
phone. Something is wrong with the configuration of L2CAP/RFCOMM
channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM
MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it,
the phone still sends oversized L2CAP packets. It appears that the
phone wants to use bigger (667 bytes) RFCOMM frames, but it does
not segment them according to the configured L2CAP MTU. The 667
bytes RFCOMM frame size corresponds to the default L2CAP MTU of
672 bytes (667 + 5 bytes RFCOMM frame header).

This problem only appears if connection was initiated from the
phone. I'm not sure who is at fault here, so for now just put
workaround in place. Quick look at the spec did not reveal any
anwser.

Tested by:	Jes < jjess at freebsd dot polarhome dot com >
MFC after:	3 days
2005-01-11 01:39:53 +00:00
Gleb Smirnoff
1c7899c74e This change adds reliability for Ethernet trunks built with ng_one2many:
- Introduce another ng_ether(4) callback ng_ether_link_state_p, which
  is called from if_link_state_change(), every time link is changed.
- In ng_ether_link_state() send netgraph control message notifying
  of link state change to a node connected to "lower" hook.

Reviewed by:	sam
MFC after:	2 weeks
2005-01-08 12:42:03 +00:00
Warner Losh
c398230b64 /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
Maksim Yevmenkin
aa38f8f98c Introduce new startup level SI_SUB_NETGRAPH that is after
SI_SUB_INIT_IF but before SI_SUB_DRIVERS. Make Netgraph(4)
framework initialize at SI_SUB_NETGRAPH level.

This does not address the bigger problem: MODULE_DEPEND
does not seem to work when modules are compiled in the
kernel, but it fixes the problem with Netgraph Bluetooth
device drivers reported by a few folks.

PR:		i386/69876
Reviewed by:	julian, rik, scottl
MFC after:	3 days
2005-01-06 17:45:03 +00:00
Roman Kurakin
a34891c667 Kill a half dead comment. It's first half was killed in rev 1.12.
MFC after:	3 days
2005-01-04 21:59:09 +00:00
Maksim Yevmenkin
6a2dbfa47f Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.
class is a reserved word in C++

Submitted by:	Markus Brueffer < markus AT brueffer DOT de >
MFC after:	3 days
2005-01-04 20:13:48 +00:00
Gleb Smirnoff
3cbbee76f8 Remove a check that never returns true, because in this case we have panic
before the check.
2004-12-30 12:22:51 +00:00
Gleb Smirnoff
92d7d5b445 - Plug a memory leak in ng_netflow_cache_init().
- Initialize error to 0 in ng_netflow_flow_add() (a nop change).
- Update cache statistics holding workqueue mutex.

MFC after:	3 days
2004-12-28 12:11:32 +00:00
Roman Kurakin
47095f775f tsleep => msleep
read sys/kern/kern_synch.c, msleep ():

	KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
	    ("sleeping without a mutex"));

MFC after:	3 days
2004-12-26 20:47:41 +00:00
Roman Kurakin
ff08c098f2 Fix creation on "dlciX" hook in ng_sample.
Approved by:	julian
MFC after:	3 days
2004-12-23 22:03:32 +00:00
Roman Kurakin
880904c323 Fix counting length of leadin for hook name (sizeof () => strlen ()).
Approved by:    julian
MFC after:      3 days
2004-12-23 18:39:13 +00:00
Gleb Smirnoff
8e853a2c74 Move systm.h up, since it is required by mbuf.h.
Requested by:	ru
2004-12-23 13:09:37 +00:00
Gleb Smirnoff
77a58296d8 - sort includes
- remove duplicate include sys/sysctl.h
2004-12-23 10:48:10 +00:00
Gleb Smirnoff
d58e678f22 Assert queue mutex in ng_dequeue() and ng_queue_rw(). 2004-12-19 14:58:13 +00:00
Gleb Smirnoff
e0d32af754 - Use ng_callout() instead of timeout.
- Schedule next timeout *after* finishing job of the current one.
- Remove spl(9) calls.

Tested by:	ru
Reviewed by:	julian
2004-12-14 08:05:29 +00:00