[OpenWrt-Devel] uclient-fetch & SSL WAS:Re: DD: CONFIG_BUSYBOX_DEFAULT_WGET is not set

Arjen de Korte arjen+openwrt at de-korte.org
Sat Jan 23 14:54:24 EST 2016


Citeren Felix Fietkau <nbd at openwrt.org>:

> On 2016-01-23 01:25, Felix Fietkau wrote:
>> On 2016-01-23 00:45, Arjen de Korte wrote:
>>> It also behaves differently with the http://dyn.dns.he.net servers
>>> (returning a Connection failure, despite also returning a result). See
>>> below:
>>>
>>> # /bin/uclient-fetch -O-
>>> 'https://dyn.dns.he.net/nic/update?hostname=example.com&password=munged&myip=1.2.3.4'
>>> Downloading
>>> 'https://dyn.dns.he.net/nic/update?hostname=example.com&password=munged&myip=1.2.3.4'
>>> Connecting to 2001:470:0:193::3000:443
>>> Writing to stdout
>>> nochg 1.2.3.4Connection error: Connection failed
>>>
>>> I'm not too concerned about the first, but the latter is a bit
>>> inconvenient. I suspect the HE servers close the connection
>>> immediately after sending the result and that this is not expected.
>> I'll make an account and look into that soon.
>
> Figured it out. It was a mix of two things:
>
> - Needed to change ustream-ssl to treat SSL close notification as EOF
> - The he.net HTTP server sends \n as linebreak instead of \r\n
>
> I've changed the code to deal with both issues, it should work now, as
> of r48463. Please test.

The above mentioned problems seem to be fixed. I can now successfully  
send the update to the HE servers. I do notice another issue however.  
When using the -O <file> option, the output file is not truncated  
before writing data. This is undesireable if the file already contains  
data and less than the existing data is written. After the new data is  
written, the remaining old data is still there. A strategically placed  
O_TRUNC flag will probably fix this.

Regards, Arjen
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list