diff options
| author | Russell Bryant <rbryant@redhat.com> | 2012-01-31 17:42:23 -0500 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-01-31 20:30:50 -0500 |
| commit | 014f67a2769720f4833bba74343cedf0e894151c (patch) | |
| tree | 7d0a359aa24a61c8b59fe4296dd25c54d95c8140 /nova | |
| parent | 79746bbe5281f950ffd46310867c90423ee286b3 (diff) | |
| download | nova-014f67a2769720f4833bba74343cedf0e894151c.tar.gz nova-014f67a2769720f4833bba74343cedf0e894151c.tar.xz nova-014f67a2769720f4833bba74343cedf0e894151c.zip | |
Fix VPN ping packet length.
Fix bug 906346.
This patch addresses the typo pointed out in bug 906346. The ping being
sent was 15 bytes long when it should have been 14. Removing a pad byte
from the format string resolves this issue. I verified that the format
described in the code comments (and now the code) was correct using an
OpenVPN connection setup packet capture.
Change-Id: Idbc5e48ede4a8d2836dd1b102a9a0e172540776c
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py index 791c63167..c1df317a1 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -128,7 +128,7 @@ def vpn_ping(address, port, timeout=0.05, session_id=None): if session_id is None: session_id = random.randint(0, 0xffffffffffffffff) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - data = struct.pack('!BQxxxxxx', 0x38, session_id) + data = struct.pack('!BQxxxxx', 0x38, session_id) sock.sendto(data, (address, port)) sock.settimeout(timeout) try: |
