Project

General

Profile

Bug #4001

osmo-mgw: Make sure non-sdp MGCP text is handled case-insensitive

Added by pespin about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
05/14/2019
Due date:
% Done:

0%


Description

MGCP RFC 3435 (https://tools.ietf.org/html/rfc3435) states almost all text has to be handled in a case-insensitive way, except SDP parts:

Commands and responses SHALL be encoded in accordance with the grammar, which, per RFC 2234, is case-insensitive except for the SDP part.

And even more explicitly in 3.2 section:

Unless otherwise noted or dictated by other referenced standards (e.g., SDP), each component in the command header is case insensitive.  This goes for verbs as well as parameters and values, and hence all comparisons MUST treat upper and lower case as well as combinations of these as being equal.

However, grepping for "casecmp" (str{n}casecmp) in osmo-mgw shows almost no use:

$ ag casecmp
src/libosmo-mgcp/mgcp_codec.c
287:    if (strcasecmp(codec_name, codec->subtype_name) == 0)

While grepping for str{n}cmp shows a lot more use. That means we need o switch to str{n}casecmp in some of them.

History

#1 Updated by pespin about 1 month ago

Pushed this one to gerrit to fix the issue for X-Osmux:
https://gerrit.osmocom.org/#/c/osmo-mgw/+/14043 mgw, mgcp-li: Handle X-Osmux param name as case insensitive

other params/verbs/etc. still need to be fixed too.

#2 Updated by pespin about 1 month ago

Similar fix provided in osmo-bsc_nat from openbsc.git:
https://gerrit.osmocom.org/#/c/openbsc/+/14131 mgcp: Handle CI ad X-Osmux param name as case insensitive

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)