aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-06-18lapd_core: msgb_trim() the L2 padding from ESTABLISH.ind0.6.1Harald Welte1-2/+3
When a SABM(E) frame arrives, we have to trim the L2 padding (0x2b for gsm) before handing the data off to L3, just like we do with I frames. Also, we should use mggb_trim() or even msgb_l3trim() instead of manually fiddling with msgb->length and ->tail pointers.
2013-06-11misc: Fix the spelling of frame in the RLM cause stringsHolger Hans Peter Freyther1-1/+1
2013-05-23gsm_utils: refer to ETSI TS 05.08 instead of TS 08.05Bhaskar1-2/+2
2013-05-08lapd: Set the tx_hist to NULL after freeing itHolger Hans Peter Freyther1-0/+1
Make detecting use after free of the tx_hist easy and set the variable to NULL after talloc_free has been freed.
2013-04-06Fix of potential memory leaks at lapdm.cAndreas Eversberg1-4/+17
2013-04-06Fix: LAPDm contention resoltion must acknowledge subsequent SABMAndreas Eversberg1-2/+8
After reception of SABM, the network responds with UA and enters the establised multiframe state. If UA is not received by mobile, the SABM is transmitted again, and the network must respond with UA again, unless it is from a different mobile. Add LAPDm collision test (contention resolution on network side).
2013-03-25gprs_ns: Allow to set the DSCP for the UDP socket.Holger Hans Peter Freyther3-0/+24
Allow to tag the NS service with a custom DSCP.
2013-03-19logging_vty: Fix segfault un unused entries in log_info_cat array of appHarald Welte1-0/+4
2013-03-19Revert "Follow up fix for the log level "everything""Harald Welte1-3/+0
This reverts commit a6428d2376034d619f342897d3ce415b3f9a3584.
2013-03-19Revert "Fix log level "everything" and make it equal to "debug""Harald Welte1-1/+1
This reverts commit cd6ed82d1ff48f47ad9e33e6322df62896a76ed5.
2013-03-18application: don't ignore SIGHUP but do config file reopen.Harald Welte1-1/+6
2013-03-18logging: add new log_targets_reopen() functionHarald Welte1-0/+20
This function will re-open all existing log files in the application, praticularly useful for SIGHUP handlers in case of logrotate
2013-03-13gsm_septets2octets(): Input parameter should be constHarald Welte1-1/+2
2013-03-13logging_vty: Print 'log filter all' info in 'show logging vty'Harald Welte1-0/+6
When we print information about the current logging configuration, it makes sense to also print information about the log filters.
2013-03-03cygwin: Link many libraries with -no-undefined to create a dllHolger Hans Peter Freyther4-5/+5
Only the Gb library relies on having undefined references to a symbol that needs to be provided by the host application. For all other libraries we can link with -no-undefined.
2013-03-01codec: Fix the GSM 06.20 ordering tablesSylvain Munaut1-41/+41
Seems the script I used to parse those had a bug where range of bits in the 'decreasing' direction ( like 6..0 ) were not processed properly. Thanks to Andreas for noticing this ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-02-27Follow up fix for the log level "everything"Holger Hans Peter Freyther1-0/+3
Commit cd6ed82d1ff48f47ad9e33e6322df62896a76ed5 made "EVERYTHING" map to LOGL_DEBUG but when writing out the configuration the following would be written: logging level all unknown 0x0 This happend because no string was found for the value 0. Address it by adding a legacy check for 0 and write out the str from the index 0. Currently this is "EVERYTHING".
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi4-6/+352
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2013-02-27Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther4-351/+6
I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi4-6/+351
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2013-02-19Fix log level "everything" and make it equal to "debug"Harald Welte1-1/+1
As Holger points out "logging level XXX everything" wasn't working, as it sets category->loglevel to 0, which is checked in osmo_vlogp() and will never get logged.
2013-02-15misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi12-18/+19
Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
2013-02-12VTY: don't show HIDDEN or DEPRECATED vty commands in ? completionHarald Welte1-0/+3
This hides HIDDEN or DEPRECATED commands from showing up when the full list of commands is inquired with '?' at any given point in the command tree. Only if the hidden/deprecated command is already typed in partially, then it will still tab-complete.
2013-02-12vty/command.c: Cosmetic cleanupHarald Welte1-82/+81
this is just changing some of the code to reduce the way too high level of indentation and thus improve readability.
2013-02-10turn abis_nm_debugp_foh() into a macroHarald Welte1-12/+10
this will avoid printing 'abis_nm.c' as the filename in the log, which is pretty useless during debugging. We want to know where abis_nm_debugp_foh() is being used from, not where it is implemented.
2013-02-01core/crc: Fix the 64 bits implementationSylvain Munaut1-2/+2
We used 1ULL at one place and not the other ... at the same time, we now use (uintXX_t) so that the proper type is used each time. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-15socket: fix osmo_sock_init with SOCK_RAW and IPPROTO_RAWPablo Neira Ayuso1-3/+16
getaddrinfo returns EAI_SERVICE (-8) if that combination is used. More information available in here: http://sourceware.org/bugzilla/show_bug.cgi?id=15015 Reported by Holger Hans Peter Freyther. While at it, this patch also removes hints.ai_flags = 0 as memset to zero already happened just a bit before that.
2013-01-12Fix build on CygwinEvgeny Zverev1-1/+5
2013-01-11add some missing doxygen annotation for libosmocore functionsHarald Welte7-11/+75
2013-01-03vty: Do better filtering of arguments, optional args particularlySylvain Munaut1-208/+143
This is essentially http://patchwork.diac24.net/patch/271/ forward ported to libosmovty Original-by: Paul Jakma <paul@quagga.net> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-03core/bits: Prevent osmo_revbytebits_buf stack trashingSylvain Munaut1-1/+1
The second loop in osmo_revbytebits_buf() in src/bits.c grabs 4 bytes each iteration, which can easily go past the supplied input in some cases. Compiled with -fstack-protector , I get a "stack smashing detected" in the bits test. From: Nils O. SelÄsdal <noselasd@fiane.dyndns.org> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-26lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann1-2/+18
This was found while implementing handover on a sysmobts. When we receive a channel release request for a channel that was never really activated (set_lapdm_context() was not called) we segfault in lapd_recv_dlsap(). We now return early with -EINVAL in rslms_rx_rll() if we receive a message that assumes set_lapdm_context() was already called. These are: * RSL_MT_UNIT_DATA_REQ * RSL_MT_DATA_REQ * RSL_MT_SUSP_REQ * RSL_MT_REL_REQ A test case was added to trigger the issue.
2012-12-12core: Fix missing include in msgfile.c for getlineSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut5-10/+5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11gsm: Add method to find ARFCN based on frequencySylvain Munaut2-45/+66
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-06sms: Print 'network' or 'mobile' when creating the SMC/SMRHolger Hans Peter Freyther2-3/+4
2012-12-06gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut1-2/+6
Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-11-26lapd: Use LOGL_ERROR for messgaes that are wrong in the given contextHolger Hans Peter Freyther1-14/+14
Log message that are either too big or have the C/R bit set as error.
2012-11-22misc: Use static const struct for LAPD and AbisHolger Hans Peter Freyther2-2/+2
2012-11-22sms: Mark the state dispatch table as static constHolger Hans Peter Freyther2-4/+4
GCC 4.7.2 was already smart enough to see that the table is const so there is no change in the generated assembly code. For some reason the dispatch is still going through one relocation.
2012-11-22sms: Fix typos in the comments and log messages.Holger Hans Peter Freyther2-5/+5
2012-11-22smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther1-31/+68
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMR instance. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMR(ID). This change is ABI and API incompatible with previous versions of libosmogsm.
2012-11-22smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther1-30/+60
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMC. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMC(ID). This change is ABI and API incompatible with previous versions of libosmogsm. Example: SMC(100) instance created SMC(100) message MNSMS-EST-REQ received in state IDLE
2012-11-14smc: Fix a typo in the smc codeHolger Hans Peter Freyther1-1/+1
2012-11-11smc: Print the current state of the SMSHolger Hans Peter Freyther1-1/+3
When the connection may not released print the name of the current state to ease with debugging and verification that this is not a valid state transition.
2012-11-11sms: Remove the commented out code that was the default in OpenBSCHolger Hans Peter Freyther1-1/+0
This code got copied from OpenBSC and we used the network specific and private numbering plan. Remove it as it can be easily set.
2012-11-11sms: Reduce the logging level to debugHolger Hans Peter Freyther1-3/+3
<001c> gsm0411_smr.c:175 TX: MNSMS-REL-REQ adds little value so I am reducing it to a debug statement.
2012-11-05GSM48: Avoid unaligned access in gsm48_construct_raAndreas Eversberg1-1/+3
This avoids an unaligned access on platforms that don't support them, such as ARMv4/ARMv5.
2012-10-27Do not use --version-script linker flag on OSXTobias Engel2-2/+2
Add a check to not use --version-script linker flag if compiled on OSX since it doesn't exist there
2012-10-27Define struct iphdr for OSXTobias Engel1-1/+1
Use FreeBSD struct iphdr definition for OSX also. From the commentary in the source file: On BSD the IPv4 struct is called struct ip and instead of iXX the members are called ip_XX. One could change this code to use struct ip but that would require to define _BSD_SOURCE and that might have other complications. Instead make sure struct iphdr is present on FreeBSD.