<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Development &amp; Patches (new posts)</title>
		<link>http://tomatousb.org/forum/c-122857/development-patches</link>
		<description>Posts in the forum category &quot;Development &amp; Patches&quot; - This category is for development discussions and for submitting patches. Please post your general comments and bug reports on other sub-forums.</description>
				<copyright></copyright>
		<lastBuildDate>Fri, 24 May 2013 00:42:02 +0000</lastBuildDate>
		
					<item>
				<guid>http://tomatousb.org/forum/t-465378#post-1762503</guid>
				<title>editing default configuration: Re: editing default configuration</title>
				<link>http://tomatousb.org/forum/t-465378/editing-default-configuration#post-1762503</link>
				<description></description>
				<pubDate>Mon, 29 Apr 2013 13:39:16 +0000</pubDate>
				<wikidot:authorName>mmellon</wikidot:authorName>				<wikidot:authorUserId>1616690</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>If all you care about is the web administration username, edit the following code in httpd.c:</p> <div class="code"> <pre> <code> if ((authorization != NULL) &amp;&amp; (strncasecmp(authorization, &quot;Basic &quot;, 6) == 0)) { if (base64_decoded_len(strlen(authorization + 6)) &lt;= sizeof(buf)) { len = base64_decode(authorization + 6, buf, strlen(authorization) - 6); buf[len] = 0; if ((pass = strchr(buf, ':')) != NULL) { *pass++ = 0; if (((u = nvram_get(&quot;http_username&quot;)) == NULL) || (*u == 0)) u = &quot;root&quot;; if ((strcmp(buf, &quot;root&quot;) == 0) || (strcmp(buf, u) == 0)) { if (((p = nvram_get(&quot;http_passwd&quot;)) == NULL) || (*p == 0)) p = &quot;admin&quot;; if (strcmp(pass, p) == 0) { return AUTH_OK; } } } } return AUTH_BAD; }</code> </pre></div> <p>The conditional:</p> <div class="code"> <pre> <code>if ((strcmp(buf, &quot;root&quot;) == 0) || (strcmp(buf, u) == 0)) {</code> </pre></div> <p>is what checks the username. You could set this to just &quot;if (1==1)&quot; to ignore the username altogether, or you can change root to something else, etc.</p> <p>This has not been tested. Your mileage may vary.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-638871#post-1753567</guid>
				<title>Bidirectional copying with printer: Re: Bidirectional copying with printer</title>
				<link>http://tomatousb.org/forum/t-638871/bidirectional-copying-with-printer#post-1753567</link>
				<description></description>
				<pubDate>Mon, 15 Apr 2013 17:21:33 +0000</pubDate>
				<wikidot:authorName>Neet_Studio</wikidot:authorName>				<wikidot:authorUserId>720875</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The print server function provide by Tomato is a network print server, so not likely you would get messages back or other printer functions with that at all.</p> <p>For anything that involves USB low level stuff, you might want to look into &quot;USP over IP&quot;. That basically allow you to &quot;connect&quot; USB devices from the USB port on your router to your PC over LAN connection. The router side only passes the raw data and doesn't care nor need to know how to talk to your printer as all of that is handled by the PC side. The down side is that it is messy to setup. Thread here: <a href="http://tomatousb.org/forum/t-256764/usb-over-ip-support">http://tomatousb.org/forum/t-256764/usb-over-ip-support</a></p> <p>The alternative is a long USB extension cable like I <span style="text-decoration: line-through;">have</span> had been using to connect to my scanner.</p> <p>Edit:<br /> <span style="text-decoration: line-through;">I am using the unused 2 pairs of wires in the network cable (as 100Mbps only need 2 pairs) for USB signals to my router!! Don't try this at home as I am knowingly violating USB length, cross talks etc. I am very tempted to try USB over IP myself one of these days.</span></p> <p>It works for me! :)</p> <p>- go to page 4 on link above.<br /> - follow instructions from post detailed by Asherdu on 8 Sep 2011, 17:00</p> <p>Note:<br /> If you are using Win XP <strong>32-bit</strong>, replace windows client: usbip.exe with the one from usbip_windows_v0.1.0.0_signed. from sourceforge instead.<br /> (x32 bug: <a href="http://sourceforge.net/projects/usbip/forums/forum/418507/topic/4581128">http://sourceforge.net/projects/usbip/forums/forum/418507/topic/4581128</a>)</p> <p>Also see here for script: <a href="http://tomatousb.org/tut:loading-printer-s-firmware-hotplug-script">http://tomatousb.org/tut:loading-printer-s-firmware-hotplug-script</a><br /> Some printers (based on ZjStream or XQX stream protocol) - mostly manufactured by HP, i.e. HP LaserJet 1018/1020/1022/P2035/P1005/P1006/P1007/P1008/P1505/P1505n/P2014/P2014n, HP LaserJet Pro P1102/P1102w/P1566/P1606dn and some others - require a firmware to be loaded on the power up. You can configure the Tomato router to automatically upload firmware to the printer using Hotplug script.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-284878#post-1753330</guid>
				<title>Increasing NVRAM size?: Re: Increasing NVRAM size?</title>
				<link>http://tomatousb.org/forum/t-284878/increasing-nvram-size#post-1753330</link>
				<description></description>
				<pubDate>Mon, 15 Apr 2013 11:58:01 +0000</pubDate>
				<wikidot:authorName>Victek</wikidot:authorName>				<wikidot:authorUserId>658684</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Under my humble opinion I think working around the CFE is quite risky (as some of the people posting already said) and possibly other pathways have not been mentioned in this thread, the RAM and Flash is increasing in current routers (If so then.. manufacturers requested to go in this direction to low cost for fast access ram) &#8230; and may be it's the moment to run in the uci-lua concept also for Tomato. This would also allow portability to other platforms (Atheros) when you have less nvram (none) available but we have access for drivers available today. Broadcom lost the battle for marketshare since other chipset manufacturers (Ralink/Atheros) dive their efforts to release sources for developers&#8230; and they are heading the top now.<br /> For people interested to go in this direction I'm working on it&#8230;</p> <p>Thanks</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1748802</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1748802</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 14:16:21 +0000</pubDate>
				<wikidot:authorName>idimitro</wikidot:authorName>				<wikidot:authorUserId>1264071</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Is shibby integrating this to his build? I am really interested in the L2TP option. Thanks for great work so far guys.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-638871#post-1742152</guid>
				<title>Bidirectional copying with printer: Bidirectional copying with printer</title>
				<link>http://tomatousb.org/forum/t-638871/bidirectional-copying-with-printer#post-1742152</link>
				<description></description>
				<pubDate>Sun, 31 Mar 2013 08:33:02 +0000</pubDate>
				<wikidot:authorName>Lighthill</wikidot:authorName>				<wikidot:authorUserId>1590325</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I have hp 1018 printer. I have found instruction hou to use it with this firmware.<br /> HP 1018 has only RAM, so every time it turns on, computer (and now with script router) uploads firmware on it.<br /> Can anyone help me to write script, that will be worл with messages from printer (when there is no paper, or when I chose two-sided printing).<br /> When printer is connected to computer, it recieves messages from router and ask me to continue printing or not. I want to make router to do this.<br /> Is it possible?<br /> P.S. Sorry for my English:)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-635608#post-1735567</guid>
				<title>New Feature: Configurable Modem Chat Script: New Feature: Configurable Modem Chat Script</title>
				<link>http://tomatousb.org/forum/t-635608/new-feature:configurable-modem-chat-script#post-1735567</link>
				<description></description>
				<pubDate>Thu, 21 Mar 2013 20:07:00 +0000</pubDate>
				<wikidot:authorName>logistiker</wikidot:authorName>				<wikidot:authorUserId>1579839</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre> <code>diff --git a/release/src/router/httpd/tomato.c b/release/src/router/httpd/tomato.c index cc4c5d4..987488c 100644 --- a/release/src/router/httpd/tomato.c +++ b/release/src/router/httpd/tomato.c @@ -592,8 +592,7 @@ static const nvset_t nvset_list[] = { // 3G MODEM { &quot;modem_pin&quot;, V_LENGTH(0,6) }, { &quot;modem_dev&quot;, V_LENGTH(0,8) }, - { &quot;modem_init&quot;, V_LENGTH(0,25) }, - { &quot;modem_apn&quot;, V_LENGTH(0,25) }, + { &quot;modem_chat_script&quot;, V_TEXT(0, 2048) }, #endif // LAN networks diff --git a/release/src/router/nvram/defaults.c b/release/src/router/nvram/defaults.c index 302187a..70c5b4a 100644 --- a/release/src/router/nvram/defaults.c +++ b/release/src/router/nvram/defaults.c @@ -140,9 +140,8 @@ const defaults_t defaults[] = { // 3G Modem { &quot;modem_pin&quot;, &quot;&quot; }, { &quot;modem_dev&quot;, &quot;ttyUSB0&quot; }, - { &quot;modem_init&quot;, &quot;*99#&quot; }, - { &quot;modem_apn&quot;, &quot;internet&quot; }, - + { &quot;modem_chat_script&quot;, &quot;ABORT \&quot;NO CARRIER\&quot;\nABORT \&quot;NO DIALTONE\&quot;\nABORT \&quot;NO ERROR\&quot;\nABORT \&quot;NO ANSWER\&quot;\nABORT \&quot;BUSY\&quot;\nREPORT CONNECT\n\&quot;\&quot; \&quot;AT\&quot;\nOK \&quot;AT&amp;FE0V1X1&amp;D2&amp;C1S0=0\&quot;\nOK \&quot;AT\&quot;\nOK \&quot;ATS0=0\&quot;\nOK \&quot;AT\&quot;\nOK \&quot;AT&amp;FE0V1X1&amp;D2&amp;C1S0=0\&quot;\nOK \&quot;AT\&quot;\nOK 'AT+CGDCONT=1,\&quot;IP\&quot;,\&quot;internet\&quot;'\nOK \&quot;ATDT*99#\&quot;\nCONNECT \\c\n&quot; }, + // PPPoE parameters { &quot;pppoe_ifname&quot;, &quot;&quot; }, // PPPoE enslaved interface { &quot;ppp_username&quot;, &quot;&quot; }, // PPP username diff --git a/release/src/router/rc/wan.c b/release/src/router/rc/wan.c index 52a6395..acba794 100644 --- a/release/src/router/rc/wan.c +++ b/release/src/router/rc/wan.c @@ -210,39 +210,9 @@ static int config_pppd(int wan_proto, int num) perror(ppp3g_chatfile); return -1; } - fprintf(cfp, - &quot;ABORT \&quot;NO CARRIER\&quot;\n&quot; - &quot;ABORT \&quot;NO DIALTONE\&quot;\n&quot; - &quot;ABORT \&quot;NO ERROR\&quot;\n&quot; - &quot;ABORT \&quot;NO ANSWER\&quot;\n&quot; - &quot;ABORT \&quot;BUSY\&quot;\n&quot; - &quot;REPORT CONNECT\n&quot; - &quot;\&quot;\&quot; \&quot;AT\&quot;\n&quot;); -/* moved to switch3g script - if (strlen(nvram_get(&quot;modem_pin&quot;)) &gt;0 ) { - fprintf(cfp, - &quot;TIMEOUT 60\n&quot; - &quot;OK \&quot;AT+CPIN=%s\&quot;\n&quot; - &quot;TIMEOUT 10\n&quot;, - nvram_get(&quot;modem_pin&quot;)); - } -*/ - fprintf(cfp, - &quot;OK \&quot;AT&amp;FE0V1X1&amp;D2&amp;C1S0=0\&quot;\n&quot; - &quot;OK \&quot;AT\&quot;\n&quot; - &quot;OK \&quot;ATS0=0\&quot;\n&quot; - &quot;OK \&quot;AT\&quot;\n&quot; - &quot;OK \&quot;AT&amp;FE0V1X1&amp;D2&amp;C1S0=0\&quot;\n&quot; - &quot;OK \&quot;AT\&quot;\n&quot; - &quot;OK 'AT+CGDCONT=1,\&quot;IP\&quot;,\&quot;%s\&quot;'\n&quot; - &quot;OK \&quot;ATDT%s\&quot;\n&quot; - &quot;CONNECT \c\n&quot;, - nvram_safe_get(&quot;modem_apn&quot;), - nvram_safe_get(&quot;modem_init&quot;) - ); + fprintf(cfp, &quot;%s&quot;, nvram_safe_get(&quot;modem_chat_script&quot;)); fclose(cfp); - if (nvram_match(&quot;usb_3g&quot;, &quot;1&quot;)) { // clear old gateway if (strlen(nvram_get(&quot;wan_gateway&quot;)) &gt;0 ) { diff --git a/release/src/router/www/basic-network.asp b/release/src/router/www/basic-network.asp index a6d3991..e09ffc7 100644 --- a/release/src/router/www/basic-network.asp +++ b/release/src/router/www/basic-network.asp @@ -45,7 +45,7 @@ &lt;script type='text/javascript' src='wireless.jsx?_http_id=&lt;% nv(http_id); %&gt;'&gt;&lt;/script&gt; &lt;script type='text/javascript' src='interfaces.js'&gt;&lt;/script&gt; &lt;script type='text/javascript'&gt; -// &lt;% nvram(&quot;dhcp_lease,dhcp_num,dhcp_start,dhcpd_startip,dhcpd_endip,l2tp_server_ip,lan_gateway,lan_ipaddr,lan_netmask,lan_proto,lan_state,lan_desc,lan_invert,mtu_enable,ppp_demand,ppp_idletime,ppp_passwd,ppp_redialperiod,ppp_service,ppp_username,ppp_custom,pptp_server_ip,pptp_dhcp,wl_security_mode,wan_dns,dnscrypt_proxy,wan_gateway,wan_ipaddr,wan_mtu,wan_netmask,wan_proto,wan_wins,wl_wds_enable,wl_channel,wl_closed,wl_crypto,wl_key,wl_key1,wl_key2,wl_key3,wl_key4,wl_lazywds,wl_mode,wl_net_mode,wl_passphrase,wl_radio,wl_radius_ipaddr,wl_radius_port,wl_ssid,wl_wds,wl_wep_bit,wl_wpa_gtk_rekey,wl_wpa_psk,wl_radius_key,wl_auth,wl_hwaddr,wan_islan,t_features,wl_nbw_cap,wl_nctrlsb,wl_nband,wl_phytype,lan_ifname,lan_stp,lan1_ifname,lan1_ipaddr,lan1_netmask,lan1_proto,lan1_stp,dhcp1_start,dhcp1_num,dhcp1_lease,dhcpd1_startip,dhcpd1_endip,lan2_ifname,lan2_ipaddr,lan2_netmask,lan2_proto,lan2_stp,dhcp2_start,dhcp2_num,dhcp2_lease,dhcpd2_startip,dhcpd2_endip,lan3_ifname,lan3_ipaddr,lan3_netmask,lan3_proto,lan3_stp,dhcp3_start,dhcp3_num,dhcp3_lease,dhcpd3_startip,dhcpd3_endip,ppp_mlppp,modem_ipaddr,modem_pin,modem_dev,modem_init,modem_apn,cstats_enable&quot;); %&gt; +// &lt;% nvram(&quot;dhcp_lease,dhcp_num,dhcp_start,dhcpd_startip,dhcpd_endip,l2tp_server_ip,lan_gateway,lan_ipaddr,lan_netmask,lan_proto,lan_state,lan_desc,lan_invert,mtu_enable,ppp_demand,ppp_idletime,ppp_passwd,ppp_redialperiod,ppp_service,ppp_username,ppp_custom,pptp_server_ip,pptp_dhcp,wl_security_mode,wan_dns,dnscrypt_proxy,wan_gateway,wan_ipaddr,wan_mtu,wan_netmask,wan_proto,wan_wins,wl_wds_enable,wl_channel,wl_closed,wl_crypto,wl_key,wl_key1,wl_key2,wl_key3,wl_key4,wl_lazywds,wl_mode,wl_net_mode,wl_passphrase,wl_radio,wl_radius_ipaddr,wl_radius_port,wl_ssid,wl_wds,wl_wep_bit,wl_wpa_gtk_rekey,wl_wpa_psk,wl_radius_key,wl_auth,wl_hwaddr,wan_islan,t_features,wl_nbw_cap,wl_nctrlsb,wl_nband,wl_phytype,lan_ifname,lan_stp,lan1_ifname,lan1_ipaddr,lan1_netmask,lan1_proto,lan1_stp,dhcp1_start,dhcp1_num,dhcp1_lease,dhcpd1_startip,dhcpd1_endip,lan2_ifname,lan2_ipaddr,lan2_netmask,lan2_proto,lan2_stp,dhcp2_start,dhcp2_num,dhcp2_lease,dhcpd2_startip,dhcpd2_endip,lan3_ifname,lan3_ipaddr,lan3_netmask,lan3_proto,lan3_stp,dhcp3_start,dhcp3_num,dhcp3_lease,dhcpd3_startip,dhcpd3_endip,ppp_mlppp,modem_ipaddr,modem_pin,modem_dev,modem_chat_script,cstats_enable&quot;); %&gt; var lg = new TomatoGrid(); lg.setup = function() { @@ -728,8 +728,7 @@ function verifyFields(focused, quiet) _wan_wins: 1, _modem_pin: 1, _modem_dev: 1, - _modem_init: 1, - _modem_apn: 1 + _modem_chat_script: 1, }; var wl_vis = []; @@ -809,8 +808,7 @@ function verifyFields(focused, quiet) vis._modem_ipaddr = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; case 'dhcp': vis._l2tp_server_ip = 0; @@ -829,8 +827,7 @@ function verifyFields(focused, quiet) vis._lan_gateway = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; case 'pppoe': vis._l2tp_server_ip = 0; @@ -844,8 +841,7 @@ function verifyFields(focused, quiet) vis._lan_gateway = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; case 'ppp3g': vis._ppp_service = 0; @@ -873,8 +869,7 @@ function verifyFields(focused, quiet) vis._lan_gateway = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; case 'pptp': vis._l2tp_server_ip = 0; @@ -886,8 +881,7 @@ function verifyFields(focused, quiet) vis._lan_gateway = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; case 'l2tp': vis._pptp_server_ip = 0; @@ -899,8 +893,7 @@ function verifyFields(focused, quiet) vis._lan_gateway = 0; vis._modem_pin = 0; vis._modem_dev = 0; - vis._modem_init = 0; - vis._modem_apn = 0; + vis._modem_chat_script = 0; break; } @@ -1550,8 +1543,7 @@ createFieldTable('', [ value: nvram.wan_proto }, { title: 'Modem device', name: 'modem_dev', type: 'select', options: [['ttyUSB0', '/dev/ttyUSB0'],['ttyUSB1', '/dev/ttyUSB1'],['ttyUSB2', '/dev/ttyUSB2'],['ttyUSB3', '/dev/ttyUSB3'],['ttyACM0', '/dev/ttyACM0']], value: nvram.modem_dev }, { title: 'PIN Code', name: 'modem_pin', type: 'text', maxlen: 6, size: 8, value: nvram.modem_pin }, - { title: 'Modem init string', name: 'modem_init', type: 'text', maxlen: 25, size: 32, value: nvram.modem_init }, - { title: 'APN', name: 'modem_apn', type: 'text', maxlen: 25, size: 32, value: nvram.modem_apn }, + { title: 'Modem chat script', name: 'modem_chat_script', type: 'textarea', value: nvram.modem_chat_script }, { title: 'Username', name: 'ppp_username', type: 'text', maxlen: 60, size: 64, value: nvram.ppp_username }, { title: 'Password', name: 'ppp_passwd', type: 'password', maxlen: 60, size: 64, peekaboo: 1, value: nvram.ppp_passwd }, { title: 'Service Name', name: 'ppp_service', type: 'text', maxlen: 50, size: 64, value: nvram.ppp_service }, @@ -1561,7 +1553,7 @@ createFieldTable('', [ { title: 'Subnet Mask', name: 'wan_netmask', type: 'text', maxlen: 15, size: 17, value: nvram.wan_netmask }, { title: 'Gateway', name: 'wan_gateway', type: 'text', maxlen: 15, size: 17, value: nvram.wan_gateway }, { title: 'PPTP Gateway', name: 'pptp_server_ip', type: 'text', maxlen: 128, size: 64, value: nvram.pptp_server_ip }, - { title: 'Options', name: 'ppp_custom', type: 'text', maxlen: 256, size: 64, value: nvram.ppp_custom }, + { title: 'Options', name: 'ppp_custom', type: 'textarea', value: nvram.ppp_custom }, { title: 'Connect Mode', name: 'ppp_demand', type: 'select', options: [['1', 'Connect On Demand'],['0', 'Keep Alive']], value: nvram.ppp_demand }, { title: 'Max Idle Time', indent: 2, name: 'ppp_idletime', type: 'text', maxlen: 5, size: 7, suffix: ' &lt;i&gt;(minutes)&lt;/i&gt;',</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-635474#post-1735319</guid>
				<title>Shibby RT-N compile patch for Zlib.cpp error: Shibby RT-N compile patch for Zlib.cpp error</title>
				<link>http://tomatousb.org/forum/t-635474/shibby-rt-n-compile-patch-for-zlib-cpp-error#post-1735319</link>
				<description></description>
				<pubDate>Thu, 21 Mar 2013 15:26:05 +0000</pubDate>
				<wikidot:authorName>logistiker</wikidot:authorName>				<wikidot:authorUserId>1579839</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre> <code>diff --git a/release/src/lzma/CPP/7zip/Compress/LZMA_Lib/ZLib.cpp b/release/src/lzma/CPP/7zip/Compress/LZMA_Lib/ZLib.cpp index 5de1a51..646d915 100644 --- a/release/src/lzma/CPP/7zip/Compress/LZMA_Lib/ZLib.cpp +++ b/release/src/lzma/CPP/7zip/Compress/LZMA_Lib/ZLib.cpp @@ -180,9 +180,9 @@ protected: UInt64 m_offset; }; -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, +ZEXTERN int ZEXPORT compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, - int level)) + int level) { CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); CMyComPtr&lt;ISequentialInStream&gt; inStream = inStreamSpec; @@ -243,8 +243,8 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, return Z_OK; } -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)) +ZEXTERN int ZEXPORT uncompress (Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen) { CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); CMyComPtr&lt;ISequentialInStream&gt; inStream = inStreamSpec;</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-632636#post-1728296</guid>
				<title>libtool errors when compiling libnova on rt-n16: Re: libtool errors when compiling libnova on rt-n16</title>
				<link>http://tomatousb.org/forum/t-632636/libtool-errors-when-compiling-libnova-on-rt-n16#post-1728296</link>
				<description></description>
				<pubDate>Sun, 10 Mar 2013 22:31:08 +0000</pubDate>
				<wikidot:authorName>jrsphoto</wikidot:authorName>				<wikidot:authorUserId>1573030</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Just did a: #find /opt |xargs grep slug and got a lot of output like this:</p> <div class="code"> <pre> <code>/opt/lib/libmudflap.so:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-runtime.c /opt/lib/libmudflap.so:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-hooks2.c /opt/lib/libmudflap.so.0:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-runtime.c /opt/lib/libmudflap.so.0:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-hooks2.c /opt/lib/libmudflap.so.0.0.0:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-runtime.c /opt/lib/libmudflap.so.0.0.0:/home/slug/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/gcc-4.1.1/libmudflap/mf-hooks2.c</code> </pre></div> <p>so it looks like existing libs have this path embedded in them. I'm stumped - Any ideas how I should proceed?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-632636#post-1728265</guid>
				<title>libtool errors when compiling libnova on rt-n16: libtool errors when compiling libnova on rt-n16</title>
				<link>http://tomatousb.org/forum/t-632636/libtool-errors-when-compiling-libnova-on-rt-n16#post-1728265</link>
				<description></description>
				<pubDate>Sun, 10 Mar 2013 21:50:34 +0000</pubDate>
				<wikidot:authorName>jrsphoto</wikidot:authorName>				<wikidot:authorUserId>1573030</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I have a RT-N16 with TomatoUSB 1.28 that I am trying to compile some additional libraries for an astronomical application that will allow me to control my telescope remotely. I installed the dev tools on the box with out much problems. The program I'm trying to compile has 4 requirements. libusb-dev, lib-usb-1.0-0-dev (or newer) libnova &gt;= 0.12.2, and libcfitsio &gt;=3.0.</p> <p>I started with libnova-0.15.0 and ran into problems right away. I get what looks like a libtool config error:</p> <h6><span>../libtool: line 4577: /home/slug/optware/ddwrt/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: No such file or directory</span></h6> <h6><span>make[3]: *** [libnova.la] Error 127</span></h6> <p>That directory is not in my structure so I suspect whoever compiled the opware ipkg file for tomatousb had this. Any ideas where to go from here?</p> <p>Thanks</p> <p>John</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1728156</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1728156</link>
				<description></description>
				<pubDate>Sun, 10 Mar 2013 18:51:01 +0000</pubDate>
				<wikidot:authorName>jayhawk81</wikidot:authorName>				<wikidot:authorUserId>1557119</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Did indeed clear NVRAM after flashing, not once but twice prior to making any changes. At first I thought it was linked to my AIO+IPSEC build, but it was the same with My-VPN build.<br /> Will look at certificates later when I have more time.</p> <p>Thanks<br /> Jayhawk81</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1728015</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1728015</link>
				<description></description>
				<pubDate>Sun, 10 Mar 2013 14:31:27 +0000</pubDate>
				<wikidot:authorName>dborca</wikidot:authorName>				<wikidot:authorUserId>1554940</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It is strange that l2tp server page resets. This is probably why it does not create /tmp/l2tpd. Did you clear nvram after upgrade?</p> <p>As for the invalid server name in the drop down of IPSec, this is because it cannot read subjectAltName from the certificate.</p> <p>You have PM.</p> <p>-dborca</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1726920</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1726920</link>
				<description></description>
				<pubDate>Fri, 08 Mar 2013 23:20:38 +0000</pubDate>
				<wikidot:authorName>jayhawk81</wikidot:authorName>				<wikidot:authorUserId>1557119</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Strange, I am somehow not able to connect to the IPSEC server unless I have the code below added to my iptables rules. Without them, my iphone cannot even find the server and there are no messages logged for connections attempts. While I successfully connect after adding rules to iptables, i cannot access my LAN as the packets are dropped by the firewall, so I will need to manually add my vpn subnet to iptables as well. I was using opendns servers from the get go, so I did not experience the DNS issue you had.</p> <p>I am not using certificates yet as I want to get everything working right with just PSK first, I am planning to reuse the same certificates as my OpenVPN server, so I hope that will work. For some reason my server name says invalid in the drop down, I will investigate later.</p> <p>and finally, I don't even have /tmp/l2tpd and nothing is logged. when I attempt to save the configuration for the l2tp server, this page resets and loses all settings entered. Maybe it has something to do with my specific hardware, since you haven't experienced these issues.<br /> If I am able to connect to my LAN subnet with the IPsec server, (Note: my internet traffic is routed through the IPsec tunnel) all will be good since I use OpenVPN for my laptop when I am away.</p> <div class="code"> <pre> <code>iptables -I INPUT -p udp --dport 4500 -j ACCEPT iptables -I INPUT -p udp --dport 500 -j ACCEPT iptables -I INPUT -p esp -j ACCEPT iptables -I INPUT -p ah -j ACCEPT</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1726455</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1726455</link>
				<description></description>
				<pubDate>Fri, 08 Mar 2013 08:29:35 +0000</pubDate>
				<wikidot:authorName>dborca</wikidot:authorName>				<wikidot:authorUserId>1554940</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>@jayhawk81</p> <p>First, in my setup, IPSec has a problem with DNS. In IPSec, your encrypted packets arrive at wanface, they are decrypted and reinjected into the same wanface. Now, DNSMasq does not listen to wanface, so any DNS request will be ignored. Just enter 8.8.8.8 (Google) as your DNS.</p> <p>Second, if your iDevice is jailbroken with corona, IPSec with certificates won't work. This is because racoon executable is modified and the Darwin kernel does not allow it to process certificates. Moreover, if your server is uberuser.dyndns.org, the server certificate MUST contain uberuser.dyndns.org in subjectAltName and you MUST connect to uberuser.dyndns.org (not the IP).</p> <p>For more info and troubleshooting, look into /tmp/ipsec and /var/log/messages</p> <p>L2TP has no known problems. Look into /tmp/l2tpd and /var/log/messages</p> <p>In either cases, the GUI should handle iptables. To dump the tables:</p> <div class="code"> <pre> <code>ln -s /usr/sbin/iptables iptables-save ./iptables-save</code> </pre></div> <p>@coolbird<br /> I'm sorry you gave up. If you just need the racoon executable, and start it from there, just let me know.</p> <p>-dborca</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1725935</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1725935</link>
				<description></description>
				<pubDate>Thu, 07 Mar 2013 17:39:24 +0000</pubDate>
				<wikidot:authorName>jayhawk81</wikidot:authorName>				<wikidot:authorUserId>1557119</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>dborca, while I managed to build tomato using your lycopene repo, I can't get ipsec to work, server not responding to client. Is the GUI supposed to take care of iptable rules or do I have to manually add them?<br /> Also the l2tp server does not stay enabled once the settings are saved.<br /> Thanks</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1724251</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1724251</link>
				<description></description>
				<pubDate>Tue, 05 Mar 2013 04:16:16 +0000</pubDate>
				<wikidot:authorName>jayhawk81</wikidot:authorName>				<wikidot:authorUserId>1557119</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I did manage to build lycopene repo after creating a debian virtual machine. My ubuntu virtual machine and server were giving me weird error messages but with debian, I got it almost right away. I had to disable lzo because it was causing &quot;libtool args = not found&quot;, once I disabled it from the makefile it was smooth sailing from there. Thanks Dborca for this great piece of work.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1722982</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1722982</link>
				<description></description>
				<pubDate>Sun, 03 Mar 2013 03:32:24 +0000</pubDate>
				<wikidot:authorName>coolbird</wikidot:authorName>				<wikidot:authorUserId>1425772</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks, dborca! I gave up!! I will stick with openvpn for now ,,,</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1722699</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1722699</link>
				<description></description>
				<pubDate>Sat, 02 Mar 2013 17:57:47 +0000</pubDate>
				<wikidot:authorName>dborca</wikidot:authorName>				<wikidot:authorUserId>1554940</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>@jayhawk81<br /> Try to get rid of &quot;&#8212;enable-shared&quot;? Make sure PATH is correctly set? I cannot comprehend how were you able to compile standalone racoon (which also includes ./configure step) but you stumble upon racoon when building the whole firmware.</p> <p>@coolbird<br /> Try to get rid of the &quot;autoreconf -i&quot; step? Update your autotools packages? Make sure PATH is correctly set?</p> <p>Guys, I really want to help, but the original post was meant as a networking howto and basic building instructions, not to teach how to compile stuff on your [as yet unknown] machines. In the beginning, there was this: &quot;Also, you need to know how to compile stuff, use git and so on.&quot;</p> <p>Besides, I am increasingly frustrated by this forum. I hate how it needs to handle my cookies, I cannot post links, etc. Yet I came here simply because I was, and still am, a fan of Teddy Bear's releases.</p> <p>Now, if you want binaries, I will be happy to provide them, one way or another. If you have some subtle problems that I can solve, I will try to help. But beyond that, you HAVE TO try harder.</p> <p>-dborca</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1722325</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1722325</link>
				<description></description>
				<pubDate>Sat, 02 Mar 2013 00:45:50 +0000</pubDate>
				<wikidot:authorName>jayhawk81</wikidot:authorName>				<wikidot:authorUserId>1557119</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><em>Target r2z does not have racoon in lycopene repo. You need to either build r2y or add IPSEC_TOOLS=y to r2z target.<br /> Look in /home/USER/tomato/release/src-rt/router/mipsel-uclibc/target/usr/sbin/racoon</em></p> <p>Could not find /target/usr/sbin/racoon, so I tried building r2y but everytime the build gets to IPSEC, I get these errors:</p> <div class="code"> <pre> <code>cd /root/lycopene/release/src-rt/router/ipsec-tools &amp;&amp; CC=mipsel-uclibc-gcc STRIP='mipsel-uclibc-strip' \ CFLAGS=&quot;-Os -Wall -DLINUX26 -DCONFIG_BCMWL5 -pipe -DBCMWPA2 -funit-at-a-time -Wno-pointer-sign -mtune=mips32 -mips32 -DCONFIG_NVRAM_SIZE=60 -ffunction-sections -fdata-sections&quot; \ LDFLAGS=&quot;-ffunction-sections -fdata-sections -Wl,--gc-sections -L/root/lycopene/release/src-rt/router/openssl&quot; \ ./configure --host=mipsel-linux --build=i686-linux-gnu --prefix=/usr --sysconfdir=/etc \ --with-openssl=/root/lycopene/release/src-rt/router/openssl --with-kernel-headers=/root/lycopene/release/src-rt/linux/linux-2.6/include \ --enable-natt=kernel --enable-hybrid --enable-frag --enable-dpd --enable-ipv6 \ --disable-security-context --without-libiconv --without-libradius --without-libpam --without-libldap \ --enable-shared configure: WARNING: unrecognized options: --enable-shared checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /root/lycopene/release/src-rt/router/ipsec-tools/missing: Unknown `--is-lightweight' option Try `/root/lycopene/release/src-rt/router/ipsec-tools/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for mipsel-linux-strip... mipsel-uclibc-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes ./configure: line 2873: syntax error near unexpected token `no' ./configure: line 2873: `AC_ENABLE_SHARED(no)' make[4]: *** [ipsec-tools/stamp-h1] Error 2 make[4]: Leaving directory `/root/lycopene/release/src/router' make[3]: *** [all] Error 2 make[3]: Leaving directory `/root/lycopene/release/src-rt' make[2]: *** [bin] Error 2 make[2]: Leaving directory `/root/lycopene/release/src-rt' make[1]: *** [y] Error 2 make[1]: Leaving directory `/root/lycopene/release/src-rt' make: *** [r2y] Error 2 root@MediaServer:~/lycopene/release/src-rt#</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-542268#post-1722077</guid>
				<title>I&#039;ve implemented IPSec support: Re: I&#039;ve implemented IPSec support</title>
				<link>http://tomatousb.org/forum/t-542268/i-ve-implemented-ipsec-support#post-1722077</link>
				<description></description>
				<pubDate>Fri, 01 Mar 2013 17:31:06 +0000</pubDate>
				<wikidot:authorName>idimitro</wikidot:authorName>				<wikidot:authorUserId>1264071</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey guys I am glad for the work you are doing but I am getting a bit confused here. According to the change log and this thread the IPSec should be supported. I see this thread &quot;IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16&quot; where the guys are compiling and &quot;hacking&quot; to make it work. So is it working or not with AiO build? And most important, how do I configure this sh@t?<br /> I have an IPSEC account with username and password. So no fancy certificates and keys required.<br /> BTW any progress with the GUI? As it appears the IPSEC is currently at the forefront of Tomato development :)<br /> Thanks.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tomatousb.org/forum/t-625093#post-1722067</guid>
				<title>IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16: Re: IPSec/L2TP (racoon+xl2tpd) tomato-shibby Asus RT-N16</title>
				<link>http://tomatousb.org/forum/t-625093/ipsec-l2tp-racoon-xl2tpd-tomato-shibby-asus-rt-n16#post-1722067</link>
				<description></description>
				<pubDate>Fri, 01 Mar 2013 16:54:33 +0000</pubDate>
				<wikidot:authorName>coolbird</wikidot:authorName>				<wikidot:authorUserId>1425772</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Man, compiling this thing is hard! I ran the following command and re-ran the compile script, and some other errors popped up :(</p> <p>touch AUTHORS &amp;&amp; autoreconf -i</p> <p>Errors:</p> <p>./configure: line 12843: syntax error near unexpected token &#8216;MD5_Init,&#8217;<br /> ./configure: line 12843: &#8216;RACOON_PATH_LIBS(MD5_Init, crypto)&#8217;<br /> make: *** [config.status] Error 2</p> <p>BTW, I used your compile script exactly as it is.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>