Comment 4 for bug 818574

Revision history for this message
Niels Elgaard Larsen (elgaard) wrote :

In src/network-manager-0.9.2.0/libnm-util/nm-setting-gsm.c :

 /* APNs roughly follow the same rules as DNS domain names. Allowed
   * characters are a-z, 0-9, . and -. GSM 03.03 Section 9.1 states:
   *
   * The syntax of the APN shall follow the Name Syntax defined in
   * RFC 2181 [14] and RFC 1035 [15]. The APN consists of one or
   * more labels. Each label is coded as one octet length field
   * followed by that number of octets coded as 8 bit ASCII characters.
   * Following RFC 1035 [15] the labels should consist only of the
   * alphabetic characters (A-Z and a-z), digits (0-9) and the
   * dash (-). The case of alphabetic characters is not significant.
   *
   * A dot (.) is commonly used to separate parts of the APN, and
   * apparently the underscore (_) is used as well. RFC 2181 indicates
   * that no restrictions of any kind are placed on DNS labels, and thus
   * it would appear that none are placed on APNs either, but many modems
   * and networks will fail to accept APNs that include odd characters
   * like space ( ) and such.
   */
  for (i = 0; i < apn_len; i++) {
   if ( !isalnum (priv->apn[i])
       && (priv->apn[i] != '.')
       && (priv->apn[i] != '_')
       && (priv->apn[i] != '-')) {
    g_set_error (error,
                 NM_SETTING_GSM_ERROR,
                 NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
                 NM_SETTING_GSM_APN);
    return FALSE;
   }
  }

I disagree. We should be tolerant here not conservative.

Browsers deal with HTML that does not validate, libreoffice reads .doc files.
Why should we go out of the way to stop someone from using his mobile internet just because there should not be a space in an APN?

My wife has a dutch sim-card, it is a dutch Aldi Talk card.
The APN is "MEDIONmobile Handyweb"
http://www.medionmobile.nl/web/hulp_en_contact/mms_en_internet_instellingen/