Opened 7 years ago

Closed 4 years ago

#143 closed Bug / Defect (fixed)

remote-random-hostname bug

Reported by: Psilo Owned by: cron2
Priority: minor Milestone: release 2.3.3
Component: Generic / unclassified Version: OpenVPN 2.2.0 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

The remote-random-hostname option does not work as described in the documentation.

Instead of "<6-random-chars>.foo.bar" I get "foo-0x<12-hex-values>.bar"

Tried with client 2.2.0 under Windows 7 x64 and Linux x64.

Change History (6)

comment:1 Changed 7 years ago by dazo

  • Milestone changed from release 2.2.1 to release 2.3

comment:2 Changed 6 years ago by psilo

Release 2.3? For a bug that should be fixed in 1 minute or 2? Really?

comment:3 Changed 6 years ago by psilo

File "misc.c" line 1223, replace :

buf_printf(&hname, "%s-0x%s.%s", hst, rnd_str, dot);

With:

buf_printf(&hname, "%s.%s.%s", rnd_str, hst, dot);

Should do the trick. No need to postpone to version 2.3 - which will probably be released next year...

comment:4 Changed 4 years ago by cron2

I've posted a fix to the openvpn-devel mailing list - arguably the code can be much simpler if it just prepends a random string, so it's not exactly clear whether the code or documentation are wrong.

patch is in <1384698620-27946-1-git-send-email-gert@…> but I've also posted a question to openvpn-users whether anyone is relying on the old format...

comment:5 Changed 4 years ago by cron2

  • Owner set to cron2
  • Status changed from new to assigned

comment:6 Changed 4 years ago by cron2

  • Milestone changed from release 2.3 to release 2.3.3
  • Resolution set to fixed
  • Status changed from assigned to closed

No response on openvpn-devel or openvpn-users regarding actual use case.

ACK from Arne, so the patch is now in the tree, and has made documentation and code consistant with the example given and the use case described (prevent DNS caching by having a wildcard record in DNS - that only works for <random>.foo.bar.org, not for foo-<random>.bar.org, so both code and documentation were wrong, just the example was right)

commit 7de8f3f322c1a1c13022a0243267624930dac5c9 (master)
commit 945cfa53cde35340da830f35fb0ae18f15b92862 (release/2.3)

Note: See TracTickets for help on using tickets.