Ticket #91 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Ticket #89 did it wrong

Reported by: guest Owned by:
Priority: normal Milestone: 0.6.0 "Hotspotify"
Version: 0.5.2 "WifiFree" Keywords:
Cc:

Description

The changes to fix ticket #89  http://dev.kryo.se/iodine/changeset/965 are wrong:

  1. users_get_first_ip() uses inet_ntoa() and returns
  1. tun_setip() gets passed the result as remoteip
  1. tun_setip() uses inet_ntoa() and therefore remoteip gets overwritten with inet_ntoa(net).

One solution would be to change

if (tun_setip(argv[0], users_get_first_ip(), netmask) != 0
tun_setmtu(mtu) != 0) {

to

if (tun_setip(argv[0], strdup( users_get_first_ip() ), netmask) != 0
tun_setmtu(mtu) != 0) {

or even let users_get_first_ip() return with a strdup'ed value.

Change History

comment:1 Changed 2 years ago by yarrick

  • Status changed from new to closed
  • Resolution set to fixed

Commited to trunk in [974].

comment:2 Changed 2 years ago by yarrick

  • Milestone set to x.y.z "Hotspotify"
Note: See TracTickets for help on using tickets.