a mistake in nova/utils.py/vpn_ping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Russell Bryant |
Bug Description
I'm just starting to read the source code of nova, but I believe someone has made a mistake.
Because the comments and code don't match
the comments:
Client packet (14 bytes)::
0 1 8 9 13
+-+
|x| cli_id |?????|
+-+
x = packet identifier 0x38
cli_id = 64 bit identifier
? = unknown, probably flags/padding
the code:
data = struct.
where in the format string:
! for network(
B for unsigned char, 1 byte
Q for unsigned long long, 8 byte
x for pad byte
I think the format string !BQxxxxxx should be !BQxxxxx
btw, I actually don't understand what this function do and the name 'vpn_ping' confuses me
can anyone explain it?
Changed in nova: | |
assignee: | nobody → Russell Bryant (russellb) |
status: | Triaged → In Progress |
Changed in nova: | |
milestone: | none → essex-4 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-4 → 2012.1 |
The code sends a fake handshake packet to a vpn server and waits for a valid repsonse. It allows us to programmatically check if a vpn is listening as it should.
On Dec 19, 2011, at 6:43 AM, can. wrote:
> Public bug reported: pack('! BQxxxxxx' , 0x38, session_id) =big-endian) /bugs.launchpad .net/bugs/ 906346 py/vpn_ ping pack('! BQxxxxxx' , 0x38, session_id) =big-endian) /bugs.launchpad .net/nova/ +bug/906346/ +subscriptions
>
> I'm just starting to read the source code of nova, but I believe someone has made a mistake.
> Because the comments and code don't match
>
> the comments:
> Client packet (14 bytes)::
> 0 1 8 9 13
> +-+--------+-----+
> |x| cli_id |?????|
> +-+--------+-----+
> x = packet identifier 0x38
> cli_id = 64 bit identifier
> ? = unknown, probably flags/padding
>
> the code:
>
> data = struct.
>
> where in the format string:
> ! for network(
> B for unsigned char, 1 byte
> Q for unsigned long long, 8 byte
> x for pad byte
>
> I think the format string !BQxxxxxx should be !BQxxxxx
>
> btw, I actually don't understand what this function do and the name 'vpn_ping' confuses me
> can anyone explain it?
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https:/
>
> Title:
> a mistake in nova/utils.
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> I'm just starting to read the source code of nova, but I believe someone has made a mistake.
> Because the comments and code don't match
>
> the comments:
> Client packet (14 bytes)::
> 0 1 8 9 13
> +-+--------+-----+
> |x| cli_id |?????|
> +-+--------+-----+
> x = packet identifier 0x38
> cli_id = 64 bit identifier
> ? = unknown, probably flags/padding
>
> the code:
>
> data = struct.
>
> where in the format string:
> ! for network(
> B for unsigned char, 1 byte
> Q for unsigned long long, 8 byte
> x for pad byte
>
> I think the format string !BQxxxxxx should be !BQxxxxx
>
> btw, I actually don't understand what this function do and the name 'vpn_ping' confuses me
> can anyone explain it?
>
> To manage notifications about this bug go to:
> https:/