Patrick McHardy
7e73e6223d
mm: only complete info request procedure in PP mode
...
The procedure only consists of a single message in FP->PP direction,
don't terminate prematurely in FP mode.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-05-30 17:04:31 +02:00
Patrick McHardy
b0de27b43d
mm: fix typo in debug message
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-05-05 22:38:52 +02:00
Patrick McHardy
7a75194dde
mm: properly complete procedure consisting only of a single message
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-03-20 16:20:05 +01:00
Patrick McHardy
2d39f5904e
mm: use mme->current in -res primitives instead of hard-coding procedure role
...
In some cases (f.i. temporary identity assignment) the initiator procedure is
converted, don't hard-code the role.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-02-26 19:23:46 +01:00
Patrick McHardy
3b1c1f5e44
mm: convert -res primitives to return void
...
There is no reasonable way for the caller to respond to an error returned
by a -res primitive, the initiator is responsible for resending the
request. Change all MM -res primitives to complete the procedure on error
and return void.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-02-24 21:47:07 +01:00
Patrick McHardy
ce7df5b796
lce: maintain TPUI assignment in location table
...
Maintain TPUIs and use for paging PTs.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-10 11:01:14 +01:00
Patrick McHardy
ff3028a515
lce: maintain LCE location table
...
Maintain LCE location table and use it for determining paging mode
and setup capabilities.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-09 12:17:34 +01:00
Patrick McHardy
fc63150b4d
Revert accidentally committed patch
...
This reverts commit d6d3253a5c
.
2010-10-14 22:43:24 +02:00
Patrick McHardy
d6d3253a5c
events
2010-10-14 08:11:59 +02:00
Patrick McHardy
00cc8509b8
mm: add function to get an existing or allocate a new MM endpoint
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-10 19:57:04 +02:00
Patrick McHardy
ce4da27071
mm: destroy endpoint when link is shut down
...
Also rebind the endpoint from the requesting link when an indirect link
establishment is complete.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-10 19:57:04 +02:00
Patrick McHardy
f8bf6942ab
debug: add libdect-specific assert-macro with optional backtrace support
...
Make assertions more useful by printing a backtrace on failed assertions.
Requires libbfd.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14 22:07:09 +02:00
Patrick McHardy
073d8f6617
timer: add some debugging code
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14 00:55:37 +02:00
Patrick McHardy
94ecef4cc3
mm: use mme->current in dect_mm_procedure_complete()
...
Procedures are supposed to be completed in reverse order of initiation,
so use mme->current for simplicity.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-08 20:06:43 +02:00
Patrick McHardy
657e322db1
mm: use mme->current in dect_mm_send_msg() instead of passing the MM procedure manually
...
Only the active procedure is supposed to send messages, so use mme->current for
simplicity.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-08 20:04:09 +02:00
Patrick McHardy
8c4fc03f20
mm: complete the proper procedure when authentication fails during key allocation
...
It should probably just use mme->current, but this needs some more thought.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 13:38:32 +02:00
Patrick McHardy
20d309fc70
lce: move protocol registration to dect_lce_init
...
Perform protocol initialization outside of __init functions to avoid
multiple registration with threaded library users.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 12:18:20 +02:00
Patrick McHardy
f5c9434230
mm/cc: provide empty parameters to -cfm primitives when aborting a transaction
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 11:27:05 +02:00
Patrick McHardy
1038f1b083
lce: order MM transactions properly
...
Order MM transactions such that the last one opened is shut down first.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 04:45:22 +02:00
Patrick McHardy
661b96d618
mm: only abort locally initiated transactions on link shurtdown.
...
A transaction only needs to be aborted for initiated transactions,
fix a segfault when calling (validly) non-existant callbacks.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 04:45:22 +02:00
Patrick McHardy
f83e4b328a
Revert "mm: change PMID when an access rights request is not confirmed"
...
This reverts commit de54717db0
.
Major misunderstanding, the PMID is supposed to get changed on
unconfirmed MAC layer Access requests, not on Access rights requests.
Signed-off-by: Patrick MCHardy <kaber@trash.net>
2010-08-23 12:17:54 +02:00
Patrick McHardy
3d98bc7b6e
lce: set the IPUI for incoming data links as soon as it is known
...
Set the IPUI of a data link as soon a request containing the portable_identity
is received. Additionally verify that the identity matches the IPUI if already
set.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-16 02:07:26 +02:00
Patrick McHardy
e9ecafde61
libdect: documentation update
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-14 16:32:27 +02:00
Patrick McHardy
906820a35e
libdect: prefix IE types with DECT_
...
Use DECT_ as common prefix for all IEs since they need to be exported for
the CLMS service.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13 13:03:42 +02:00
Patrick McHardy
d993094726
mm: catch link establishment errors in dect_mm_endpoint_alloc
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-12 01:38:20 +02:00
Patrick McHardy
6e11eee271
mm: add more documentation
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-03 01:30:20 +02:00
Patrick McHardy
c26e9df6e7
mm: clear iec pointer when initiating/responding to a procedure
...
Fix use-after-free when the procedure is used for a second time.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-03 00:06:04 +02:00
Patrick McHardy
3d125cbc83
libdect: name timer related functions more consistently
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:21:45 +02:00
Patrick McHardy
35dfe2ac3f
libdect: name transaction related functions more consistently
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:15:41 +02:00
Patrick McHardy
de54717db0
mm: change PMID when an access rights request is not confirmed
...
As specified in ETSI EN 300 175-6, section 9.1.2.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-01 16:14:18 +02:00
Patrick McHardy
fcadf4c79f
mm: store TPUI on identity assignment
...
Store the TPUI when successfully accpeting temporary identity assignement
in PP mode.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 18:49:23 +02:00
Patrick McHardy
e523f7c049
mm: add missing newline to timeout debugging
...
Signed-off-nby: Patrick McHardy <kaber@trash.net>
2010-07-31 14:03:52 +02:00
Patrick McHardy
8c74c93382
mm: add retransmission support
...
Properly retransmit a message on the first timeout.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 13:06:13 +02:00
Patrick McHardy
6f8f9fe140
lce: add support for retransmissions
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 12:46:01 +02:00
Patrick McHardy
9e6a9bba93
mm: properly end ciphering procedure in dect_mm_cipher_res()
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-28 09:08:16 +02:00
Patrick McHardy
699daad794
doc: more documentation updates
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-28 04:16:57 +02:00
Patrick McHardy
cb5d6bd44b
libdect: include cleanup - only include io.h where needed
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-26 22:47:53 +02:00
Patrick McHardy
e6e12fb611
libdect: include cleanup - only include timer.h where needed
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-26 22:38:20 +02:00
Patrick McHardy
931c335680
debug: make debugging more colorful
...
Add definitions for the various libdect subsystems, pass them to the
registered debugging handlers and add a handler to the example programs
to colorize debugging messages.
Still could use some cleanup, but causes too many clashes.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-24 21:49:43 +02:00
Patrick McHardy
3a1ff7e707
mm: properly support key allocation procedure
...
Key allocation includes mutual authentication, accept authentication
requests while a key allocation procedure is in progress.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-24 21:42:44 +02:00
Patrick McHardy
007d2e2a5f
mm: support detachment procedure
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-24 21:41:11 +02:00
Patrick McHardy
80a2fb4435
sfmt: treat empty IEs as absent
...
Empty mandatory IEs may be coded as empty attributes, treat them as absent
without failing policy checks.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-24 04:55:16 +02:00
Patrick McHardy
f9020e9086
doc: add some misc documentation
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-24 01:47:59 +02:00
Patrick McHardy
6764148547
doc: fix typo
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-08 20:28:15 +02:00
Patrick McHardy
1c450a1ac5
doc: fix up doxygen annotations, add some documentation
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-08 20:23:15 +02:00
Patrick McHardy
7e9184f91a
mm: properly begin new procedure for parameter retrieval
...
Fixes segfault when link is shut down and never started procedure is
aborted.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-06-17 01:33:51 +02:00
Patrick McHardy
be293dc31c
mm: proper procedure management
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-06-02 13:41:55 +02:00
Patrick McHardy
5008e60230
mm: fix potential NULL pointer dereference
...
An empty portable_identity IE may be included if no temporary
identity assignment is started, which is also represented as
NULL.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-05-27 03:15:02 +02:00
Patrick McHardy
f8b7b0909f
mm: add missing identity procedures
...
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-02-28 22:59:22 +01:00
Patrick McHardy
bdaa02113d
mm: fix model identifier placement in MM messages
...
Model Identifier IEs are located after IWU-to-IWU IEs.
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-02-28 22:59:22 +01:00