Skip to contentSkip to conversation

iw and non-ASCII SSIDs

DISCUSSION Joerg 4 participants 7 messages Jun 25, 2015 – Jun 29, 2015 1 message not in the archive

lore
Share & tools
lore

Joerg

author
#0 lore raw

Hello all,
is there a way to submit a non-ASCII SSID with iw? One that contains 0 as in an octet with value zero?

regards
Joerg

#1 lore raw
Quoted 3 lines · Joerg

Hello all,
is there a way to submit a non-ASCII SSID with iw? One that contains 0 as in an octet with value zero?

No, that doesn't seem to be possible in the code.

But it's certainly possible in wp_supplicant config file, which you should probably be using anyway?

johannes

author
#2 lore raw
Quoted 6 lines · Johannes Berg
Quoted 3 lines · Joerg

Hello all,
is there a way to submit a non-ASCII SSID with iw? One that contains 0 as in an octet with value zero?

Quoted 6 lines

No, that doesn't seem to be possible in the code.

But it's certainly possible in wp_supplicant config file, which you should probably be using anyway?

johannes

That's what I thought from looking at the code, too.

And no, this is for an IBSS network that uses an IPsec overlay for security. It doesn't use wpa_supplicant and changing the code that way would be a major hassle.

I would volunteer to change iw to accept a hex encoded binary blob as SSID. What commandline would be acceptable?

Regards
Joerg

#3 lore raw
Quoted 24 lines · Joerg
Quoted 7 lines · Johannes Berg
Quoted 4 lines · Joerg

Hello all,
is there a way to submit a non-ASCII SSID with iw? One that contains
0 as in an octet with value zero?

Quoted 6 lines

No, that doesn't seem to be possible in the code.

But it's certainly possible in wp_supplicant config file, which you should probably be using anyway?

johannes

That's what I thought from looking at the code, too.

And no, this is for an IBSS network that uses an IPsec overlay for security.
It doesn't use wpa_supplicant and changing the code that way would be a major
hassle.

Quoted 3 lines

I would volunteer to change iw to accept a hex encoded binary blob as SSID.
What commandline would be acceptable?

Well I guess you're not interested in "connect" but rather "ibss join" then.

We *could* break backward compatibility and say that if you pass "\x00" it's no longer interpreted as the bytes 5c 78 30 30 but rather as the byte 00, but I'm not sure we should?

OTOH, what choice do we really have - the only other option would be to add a command line flag indicating that this behaviour is desired?

johannes

#4 lore raw
Quoted 3 lines · Johannes Berg

OTOH, what choice do we really have - the only other option would be to add a command line flag indicating that this behaviour is desired?

Why not just using wpa_supplicant with key_mgmt=NONE ? It can handle the case where no encryption is required.

From your previous email I understood that it already supports hex SSIDs, therefore this should probably work, I guess. Has somebody tried this ?

This way there is no need to break/extend any other tool.

Cheers,

Signature · 1 line
Antonio Quartulli

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

[please don't use HTML]

Quoted 8 lines · Joerg Pommnitz

We don't have to break compatibility. The commandline syntax of iw is iw [options] command
My suggestion would be a new option "--binary-ssid" that sets a flag and causes all SSID to be treated as a hex encoded binary blob:
iw --binary-ssid dev wlan0 ibss join 0034AA 2412
and for consistency
iw --binary-ssid dev wlan0 connect 0034AA

Quoted 6 lines

Alternatively the option could be "--escaped-ssid" that would activate an escape processing for the SSID as you suggested. My preference is "--binary-ssid", because I'm always a little bit unsure what actually arrives in the program after the shell has done its own escape processing.

Yeah, that seems reasonable, though perhaps easier to do as

  iw dev wlan0 ibss join --binary-ssid 0034AA 2412

since options before the command are treated as generic iw options.

Then again, if all places that use an SSID were to use a "parse_ssid(argv[7])" function then the former could also be implemented.

johannes

#7 lore raw
Quoted 9 lines · Johannes Berg

[please don't use HTML]

Quoted 5 lines · Joerg Pommnitz

We don't have to break compatibility. The commandline syntax of iw is iw [options] command
My suggestion would be a new option "--binary-ssid" that sets a flag and causes all SSID to be treated as a hex encoded binary blob:
iw --binary-ssid dev wlan0 ibss join 0034AA 2412

Technically, I'd call this "--hex-ssid" considering the actual encoding shown.

Quoted 27 lines
Quoted 10 lines

and for consistency
iw --binary-ssid dev wlan0 connect 0034AA

Alternatively the option could be "--escaped-ssid" that would activate an escape processing for the SSID as you suggested. My preference is "--binary-ssid", because I'm always a little bit unsure what actually arrives in the program after the shell has done its own escape processing.

Yeah, that seems reasonable, though perhaps easier to do as

  iw dev wlan0 ibss join --binary-ssid 0034AA 2412

since options before the command are treated as generic iw options.

Then again, if all places that use an SSID were to use a "parse_ssid(argv[7])" function then the former could also be implemented.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html