Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Felix Fietkau
On 2013-06-17 1:57 AM, Ben West wrote:
 I can confirm the 100-sizeof_long_long.patch patch for curl provided
 by Massimo does work fine for me under ar71xx and atheros platforms. 
 That is, I can now successfully have libcurl link to cyassl instead of
 openssl.
 
 What additional steps are needed to close this thread, specifically to
 update the cyassl Makefile to pull version 2.6.0?
A size comparison would be useful. Also, libustream-cyassl + uhttpd
needs to be tested against the new version.

- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Sebastian Muszynski
Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
 On 2013-06-17 1:57 AM, Ben West wrote:
  I can confirm the 100-sizeof_long_long.patch patch for curl provided
  by Massimo does work fine for me under ar71xx and atheros platforms.
  That is, I can now successfully have libcurl link to cyassl instead of
  openssl.
  
  What additional steps are needed to close this thread, specifically to
  update the cyassl Makefile to pull version 2.6.0?
 
 A size comparison would be useful. 

CyaSSL:

insgesamt 340
-rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
-rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
-rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk

OpenSSL:

-rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
-rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
-rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
-rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk

CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl + OpenSSL 
does not fit usually. 

Kind regards,

Sebastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Sebastian Muszynski
Am Montag, 17. Juni 2013, 13:40:20 schrieb Felix Fietkau:
 On 2013-06-17 1:33 PM, Sebastian Muszynski wrote:
  Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
  On 2013-06-17 1:57 AM, Ben West wrote:
   I can confirm the 100-sizeof_long_long.patch patch for curl provided
   by Massimo does work fine for me under ar71xx and atheros platforms.
   That is, I can now successfully have libcurl link to cyassl instead of
   openssl.
   
   What additional steps are needed to close this thread, specifically to
   update the cyassl Makefile to pull version 2.6.0?
  
  A size comparison would be useful.
  
  CyaSSL:
  
  insgesamt 340
  -rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
  -rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk
  
  OpenSSL:
  
  -rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
  -rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
  -rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
  -rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk
  
  CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl +
  OpenSSL does not fit usually.
 
 I meant a size comparison of old CyaSSL vs. new CyaSSL of course :)

Ups. :-) 

-rw-r--r-- 1 x x 64570 Jun 16 00:29 libcyassl_1.6.5-2_ar71xx.ipk

This is the filesize of the current version in trunk.

Kind regards,

Sebastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [package] dnsmasq: use host-record instead of address

2013-06-17 Thread Jo-Philipp Wich
Applied in r36943 with various modifications to the shell code (no
functional changes).

Thank you,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] hostapd: correctly handle macfile uci option

2013-06-17 Thread Jo-Philipp Wich
Applied in r36944, thank you!

~ jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] openssh-server configure in attitude_adjustment

2013-06-17 Thread bjzhougong
Thanks for your reponse.
But this issue exist too follow your suggestion, I will try dropbear.
Thanks!




bjzhougong

From: Peter Wagner
Date: 2013-06-17 03:10
To: jinzhcheng
CC: openwrt-devel
Subject: Re: [OpenWrt-Devel] openssh-server configure in attitude_adjustment
Hi,

Try to set the pw for the root user again from the telnet login with

passwd

and try to login afterwards with ssh.

Also set PasswordAuthentication yes - allthough the default value should be yes.

With kind regards,
Peter Wagner

On Sun, 16 Jun 2013 12:27:08 +0800 (CST)
jinzhcheng bjzhoug...@126.com wrote:

 Dear Sir
 
 
 (1)
 This my config file in attitude_adjustment about openssh-server:
 CONFIG_DEFAULT_dropbear=y
 # CONFIG_PACKAGE_dropbear is not set
 #
 # SSH
 #
 # CONFIG_PACKAGE_openssh-client is not set
 # CONFIG_PACKAGE_openssh-client-utils is not set
 CONFIG_PACKAGE_openssh-keygen=y
 CONFIG_PACKAGE_openssh-moduli=y
 CONFIG_PACKAGE_openssh-server=y
 # CONFIG_PACKAGE_openssh-sftp-client is not set
 # CONFIG_PACKAGE_openssh-sftp-server is not set
 
 
 
 (2)
 after telnet openwrt, I changed root passwd
 and modify /etc/ssh/sshd_config:
 
 
 Port 22
 #AddressFamily any 
 #ListenAddress 0.0.0.0 
 #ListenAddress ::  

 # The default requires explicit activation of protocol 1   
 Protocol 2 

 # HostKey for protocol version 1   
 #HostKey /etc/ssh/ssh_host_key 
 # HostKeys for protocol version 2
 HostKey /etc/ssh/ssh_host_rsa_key
 HostKey /etc/ssh/ssh_host_dsa_key   
 #HostKey /etc/ssh/ssh_host_ecdsa_key
 
 # Lifetime and size of ephemeral version 1 server key   
 KeyRegenerationInterval 1h  
 ServerKeyBits 1024  
  
 # Logging
 # obsoletes QuietMode and FascistLogging
 SyslogFacility AUTH 
 LogLevel INFO
  
 # Authentication:
  
 LoginGraceTime 2m
 PermitRootLogin yes  
 StrictModes yes 
 #MaxAuthTries 6 
 #MaxSessions 10 
 
 RSAAuthentication yes   
 PubkeyAuthentication yes
 
 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
 # but this is overridden so installations will only check .ssh/authorized_keys
 #AuthorizedKeysFile .ssh/authorized_keys  
   
 #AuthorizedPrincipalsFile none
 # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
 RhostsRSAAuthentication no 
 # similar for protocol version 2   
 HostbasedAuthentication no 
 # Change to yes if you don't trust ~/.ssh/known_hosts for
 # RhostsRSAAuthentication and HostbasedAuthentication 
 #IgnoreUserKnownHosts no  
 # Don't read the user's ~/.rhosts and ~/.shosts files  
 IgnoreRhosts yes  
   
 # To disable tunneled clear text passwords, change to no here! 
 #PasswordAuthentication yes
 PermitEmptyPasswords no 
 
 # Change to no to disable s/key passwords
 #ChallengeResponseAuthentication yes 
  
 # Kerberos options
 #KerberosAuthentication no
 #KerberosOrLocalPasswd yes  
 #KerberosTicketCleanup yes   

Re: [OpenWrt-Devel] openssh-server configure in attitude_adjustment

2013-06-17 Thread bjzhougong
After select any config item:
CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_BUSYBOX_CONFIG_USE_BB_PWD_GRP=y
CONFIG_BUSYBOX_CONFIG_USE_BB_SHADOW=y
CONFIG_BUSYBOX_CONFIG_PASSWD=y

now I can log openwrt by ssh:)



bjzhougong

From: Peter Wagner
Date: 2013-06-17 03:10
To: jinzhcheng
CC: openwrt-devel
Subject: Re: [OpenWrt-Devel] openssh-server configure in attitude_adjustment
Hi,

Try to set the pw for the root user again from the telnet login with

passwd

and try to login afterwards with ssh.

Also set PasswordAuthentication yes - allthough the default value should be yes.

With kind regards,
Peter Wagner

On Sun, 16 Jun 2013 12:27:08 +0800 (CST)
jinzhcheng bjzhoug...@126.com wrote:

 Dear Sir
 
 
 (1)
 This my config file in attitude_adjustment about openssh-server:
 CONFIG_DEFAULT_dropbear=y
 # CONFIG_PACKAGE_dropbear is not set
 #
 # SSH
 #
 # CONFIG_PACKAGE_openssh-client is not set
 # CONFIG_PACKAGE_openssh-client-utils is not set
 CONFIG_PACKAGE_openssh-keygen=y
 CONFIG_PACKAGE_openssh-moduli=y
 CONFIG_PACKAGE_openssh-server=y
 # CONFIG_PACKAGE_openssh-sftp-client is not set
 # CONFIG_PACKAGE_openssh-sftp-server is not set
 
 
 
 (2)
 after telnet openwrt, I changed root passwd
 and modify /etc/ssh/sshd_config:
 
 
 Port 22
 #AddressFamily any 
 #ListenAddress 0.0.0.0 
 #ListenAddress ::  

 # The default requires explicit activation of protocol 1   
 Protocol 2 

 # HostKey for protocol version 1   
 #HostKey /etc/ssh/ssh_host_key 
 # HostKeys for protocol version 2
 HostKey /etc/ssh/ssh_host_rsa_key
 HostKey /etc/ssh/ssh_host_dsa_key   
 #HostKey /etc/ssh/ssh_host_ecdsa_key
 
 # Lifetime and size of ephemeral version 1 server key   
 KeyRegenerationInterval 1h  
 ServerKeyBits 1024  
  
 # Logging
 # obsoletes QuietMode and FascistLogging
 SyslogFacility AUTH 
 LogLevel INFO
  
 # Authentication:
  
 LoginGraceTime 2m
 PermitRootLogin yes  
 StrictModes yes 
 #MaxAuthTries 6 
 #MaxSessions 10 
 
 RSAAuthentication yes   
 PubkeyAuthentication yes
 
 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
 # but this is overridden so installations will only check .ssh/authorized_keys
 #AuthorizedKeysFile .ssh/authorized_keys  
   
 #AuthorizedPrincipalsFile none
 # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
 RhostsRSAAuthentication no 
 # similar for protocol version 2   
 HostbasedAuthentication no 
 # Change to yes if you don't trust ~/.ssh/known_hosts for
 # RhostsRSAAuthentication and HostbasedAuthentication 
 #IgnoreUserKnownHosts no  
 # Don't read the user's ~/.rhosts and ~/.shosts files  
 IgnoreRhosts yes  
   
 # To disable tunneled clear text passwords, change to no here! 
 #PasswordAuthentication yes
 PermitEmptyPasswords no 
 
 # Change to no to disable s/key passwords
 #ChallengeResponseAuthentication yes 
  
 # Kerberos options
 #KerberosAuthentication no 

[OpenWrt-Devel] [PATCH] packages: postgresql: install host tools to host/bin

2013-06-17 Thread Paul Fertser
Host tools should go to host/bin, not usr/bin.

Signed-off-by: Paul Fertser fercer...@gmail.com
---
 libs/postgresql/Makefile |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile
index 37ae8f6..6307887 100644
--- a/libs/postgresql/Makefile
+++ b/libs/postgresql/Makefile
@@ -230,8 +230,8 @@ fi
 endef
 
 define Build/InstallDev
-   $(INSTALL_DIR) $(1)/usr/bin
-   $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host 
$(1)/usr/bin/pg_config
+   $(INSTALL_DIR) $(1)/host/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host 
$(1)/host/bin/pg_config
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(1)/usr/include/
@@ -241,8 +241,8 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(1)/usr/lib/
-   $(CP) $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host 
$(1)/usr/bin/ecpg
-   $(CP) $(PKG_BUILD_DIR)/host-zic $(1)/usr/bin/zic
+   $(CP) $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host 
$(1)/host/bin/ecpg
+   $(CP) $(PKG_BUILD_DIR)/host-zic $(1)/host/bin/zic
 endef
 
 $(eval $(call BuildPackage,libpq))
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-06-17 Thread Ben West
Thank you all for filling in details about remaining steps to get cyassl
Makefile updated.

Here are sizes of the compiled cyassl ipk under ar71xx platform:

-rw-r--r-- 1 ben ben 105819 Jun 11 18:53 libcyassl_2.6.0-1_ar71xx.ipk

... and under atheros:

-rw-r--r-- 1 ben ben 105826 Jun  6 14:10 libcyassl_2.6.0-1_atheros.ipk

I'm assuming the ~40Kbyte size increase for my  Massimo's instance results
from our enabling additional options while compiling cyassl, for use with
libcurl.  Namely --enable-dtls and --enable-opensslextra.  I have not had
opportunity to verify cyassl still functions adequately with libcurl, with
these options disabled.

On Mon, Jun 17, 2013 at 6:47 AM, Sebastian Muszynski ba...@linkt.de wrote:

 Am Montag, 17. Juni 2013, 13:40:20 schrieb Felix Fietkau:
  On 2013-06-17 1:33 PM, Sebastian Muszynski wrote:
   Am Montag, 17. Juni 2013, 13:16:13 schrieb Felix Fietkau:
   On 2013-06-17 1:57 AM, Ben West wrote:
I can confirm the 100-sizeof_long_long.patch patch for curl
 provided
by Massimo does work fine for me under ar71xx and atheros platforms.
That is, I can now successfully have libcurl link to cyassl instead
 of
openssl.
   
What additional steps are needed to close this thread, specifically
 to
update the cyassl Makefile to pull version 2.6.0?
  
   A size comparison would be useful.
  
   CyaSSL:
  
   insgesamt 340
   -rw-r--r-- 1 x x   43182 Jun 17 13:23 curl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 123484 Jun 17 13:23 libcurl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 101719 Jun 17 13:23 libcyassl_2.6.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x   31580 Jun 17 13:23 libpthread_0.9.33.2-1_ar71xx.ipk
   -rw-r--r-- 1 x x   40643 Jun 17 13:23 zlib_1.2.7-1_ar71xx.ipk
  
   OpenSSL:
  
   -rw-r--r-- 1 x x   42620 Jun 16 00:40 curl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 133415 Jun 16 00:39 libcurl_7.29.0-1_ar71xx.ipk
   -rw-r--r-- 1 x x 630003 Jun 16 00:30 libopenssl_1.0.1e-1_ar71xx.ipk
   -rw-r--r-- 1 x x   31285 Jun 16 00:14 libpthread_0.9.33.2-1_ar71xx.ipk
   -rw-r--r-- 1 x x   40219 Jun 16 00:18 zlib_1.2.7-1_ar71xx.ipk
  
   CyaSSL is pretty small, so you can use it on small flashs (4MB). Curl +
   OpenSSL does not fit usually.
 
  I meant a size comparison of old CyaSSL vs. new CyaSSL of course :)

 Ups. :-)

 -rw-r--r-- 1 x x 64570 Jun 16 00:29 libcyassl_1.6.5-2_ar71xx.ipk

 This is the filesize of the current version in trunk.

 Kind regards,

 Sebastian
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




-- 
Ben West
http://gowasabi.net
b...@gowasabi.net
314-246-9434
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv4 0/3] Add new target for i.MX23-based boards

2013-06-17 Thread Sergey Shcherbakov
Hello Zoltan,

I would like to check your patches. Which branch you used or trunk?

Thanks a lot,
Sergey

With best regards,
Sergey D. Shcherbakov


2013/6/5 Zoltan HERPAI wigy...@uid0.hu

 Hi,

 Any comments on this set?

 Thanks,
 Zoltan Herpai


 On Mon, 27 May 2013, Zoltan HERPAI wrote:

  This patch will add support for i.MX23-based boards, starting with
 Olimex Olinuxino. This is an ARM9-based board which comes in different
 flavours depending on devices.

 Currently supported:
 - 3.9.4 kernel
 - ext4 rootfs
 - USB
 - ethernet
 - RTC, watchdog

 Work in progress for:
 - I2C
 - SPI
 - probably sound and FB

 Patch list:
 [PATCH 1/3]: Add tools support for i.MX23
 [PATCH 2/3]: Add target for i.MX23
 [PATCH 3/3]: Add missing regulator symbols

 Regards,
 Zoltan Herpai

 __**_
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.**org openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/**mailman/listinfo/openwrt-develhttps://lists.openwrt.org/mailman/listinfo/openwrt-devel

  __**_
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.**org openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/**mailman/listinfo/openwrt-develhttps://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] DIR-610 A1 Support

2013-06-17 Thread Flávio Silveira

Good evening,

 Can somebody help me with this? Please :-)


- Original Message - 
From: Flávio Silveira

To: openwrt-devel@lists.openwrt.org
Sent: Sunday, May 26, 2013 2:43 PM
Subject: [OpenWrt-Devel] DIR-610 A1 Support


Good afternoon,

 This is my first attempt to add support for this router.

 It has 4Mb of flash (ESMT F25L32PA) and 32Mb of RAM (Etron EM63A165TS), 
chipset is Ralink RT5350F.


 I'm attaching my patches for review based on trunk revision 36033, most 
are just guess, because from what I understand, I have to make it boot 
first, then get proper gpios, MAC Addresses etc.


 Router uses Seama, I don't know how to build a firmware with it to test, 
so if someone could help.


 Also, there is a small patch to support this flashchip, I didn't know how 
to create a patch file from the kernel.



File: linux-3.7.10/drivers/mtd/devices/m25p80.c

In function: static const struct spi_device_id m25p_ids[]

/* ESMT */
   { f25l32pa, INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K) },

 Please review.

Best regards,
 Flavio






___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel 


dir610a1.patch
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [odhcp6c] [PATCH] Add -H option to override the host id

2013-06-17 Thread Thomas Bächler
When assigned a static prefix, it is desirable to also have
a static IP, however, the link-local address assigned from
the provider during ipv6cp may change on each connection.
This option solves this problem - for example, you can
append -H '::1' to the odhcp6c command line.
---
 src/odhcp6c.c | 10 --
 src/ra.c  | 23 +--
 src/ra.h  |  2 +-
 3 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/src/odhcp6c.c b/src/odhcp6c.c
index 4fefcd7..04b2c6b 100644
--- a/src/odhcp6c.c
+++ b/src/odhcp6c.c
@@ -50,6 +50,7 @@ int main(_unused int argc, char* const argv[])
// Allocate ressources
const char *pidfile = NULL;
const char *script = /usr/sbin/odhcp6c-update;
+   const char *hostid = NULL;
ssize_t l;
uint8_t buf[134];
char *optpos;
@@ -59,7 +60,7 @@ int main(_unused int argc, char* const argv[])
bool help = false, daemonize = false;
int logopt = LOG_PID;
int c, request_pd = 0;
-   while ((c = getopt(argc, argv, S::N:P:c:r:s:khedp:)) != -1) {
+   while ((c = getopt(argc, argv, S::N:P:c:H:r:s:khedp:)) != -1) {
switch (c) {
case 'S':
allow_slaac_only = (optarg) ? atoi(optarg) : -1;
@@ -98,6 +99,10 @@ int main(_unused int argc, char* const argv[])
}
break;
 
+   case 'H':
+   hostid = optarg;
+   break;
+
case 'r':
optpos = optarg;
while (optpos[0]) {
@@ -151,7 +156,7 @@ int main(_unused int argc, char* const argv[])
signal(SIGUSR2, sighandler);
 
if ((urandom_fd = open(/dev/urandom, O_CLOEXEC | O_RDONLY))  0 ||
-   init_dhcpv6(ifname, request_pd) || ra_init(ifname) ||
+   init_dhcpv6(ifname, request_pd) || ra_init(ifname, 
hostid) ||
script_init(script, ifname)) {
syslog(LOG_ERR, failed to initialize: %s, strerror(errno));
return 3;
@@ -314,6 +319,7 @@ static int usage(void)
   -N mode   Mode for requesting addresses 
[try|force|none]\n
   -P length Request IPv6-Prefix (0 = auto)\n
   -c clientid   Override client-ID (base-16 encoded)\n
+  -H hostid Override host id with the given IPv6 address\n
   -r optionsOptions to be requested (comma-separated)\n
   -s script Status update script 
(/usr/sbin/odhcp6c-update)\n
   -k  Don't send a RELEASE when stopping\n
diff --git a/src/ra.c b/src/ra.c
index b1526ae..be37b2d 100644
--- a/src/ra.c
+++ b/src/ra.c
@@ -42,7 +42,7 @@ static struct in6_addr lladdr = IN6ADDR_ANY_INIT;
 
 static void ra_send_rs(int signal __attribute__((unused)));
 
-int ra_init(const char *ifname)
+int ra_init(const char *ifname, const char *hostid)
 {
sock = socket(AF_INET6, SOCK_RAW | SOCK_CLOEXEC, IPPROTO_ICMPV6);
if_index = if_nametoindex(ifname);
@@ -74,17 +74,20 @@ int ra_init(const char *ifname)
fcntl(sock, F_SETOWN, ourpid);
fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_ASYNC);
 
-   // Get LL-addr
-   FILE *fp = fopen(/proc/net/if_inet6, r);
-   if (fp) {
-   char addrbuf[33], ifbuf[16];
-   while (fscanf(fp, %32s %*x %*x %*x %*x %15s, addrbuf, ifbuf) 
== 2) {
-   if (!strcmp(ifbuf, if_name)) {
-   script_unhexlify((uint8_t*)lladdr, 
sizeof(lladdr), addrbuf);
-   break;
+   // Use hostid if -H was specified
+   if(hostid == NULL || inet_pton(AF_INET6, hostid, lladdr) != 1) {
+   // Get LL-addr if -H was missing or inet_pton failed
+   FILE *fp = fopen(/proc/net/if_inet6, r);
+   if (fp) {
+   char addrbuf[33], ifbuf[16];
+   while (fscanf(fp, %32s %*x %*x %*x %*x %15s, addrbuf, 
ifbuf) == 2) {
+   if (!strcmp(ifbuf, if_name)) {
+   script_unhexlify((uint8_t*)lladdr, 
sizeof(lladdr), addrbuf);
+   break;
+   }
}
+   fclose(fp);
}
-   fclose(fp);
}
 
// Open rtnetlink socket
diff --git a/src/ra.h b/src/ra.h
index f87c4f7..5a37694 100644
--- a/src/ra.h
+++ b/src/ra.h
@@ -34,6 +34,6 @@ struct icmpv6_opt {
(void*)(opt + opt-len) = (void*)(end); opt += opt-len)
 
 
-int ra_init(const char *ifname);
+int ra_init(const char *ifname, const char *hostid);
 bool ra_process(void);
 bool ra_rtnl_process(void);
-- 
1.8.3.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] package/dhcpv6.sh: Add hostid option to dhcpv6 protocol

2013-06-17 Thread Thomas Bächler
---
 package/odhcp6c/files/dhcpv6.sh | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/odhcp6c/files/dhcpv6.sh b/package/odhcp6c/files/dhcpv6.sh
index b2264ed..7a5585b 100755
--- a/package/odhcp6c/files/dhcpv6.sh
+++ b/package/odhcp6c/files/dhcpv6.sh
@@ -12,14 +12,15 @@ proto_dhcpv6_init_config() {
proto_config_add_string noslaaconly
proto_config_add_string norelease
proto_config_add_string ip6prefix
+   proto_config_add_string hostid
 }
 
 proto_dhcpv6_setup() {
local config=$1
local iface=$2
 
-   local reqaddress reqprefix clientid reqopts noslaaconly norelease 
ip6prefix iface_dslite
-   json_get_vars reqaddress reqprefix clientid reqopts noslaaconly 
norelease ip6prefix iface_dslite
+   local reqaddress reqprefix clientid reqopts noslaaconly norelease 
ip6prefix iface_dslite hostid
+   json_get_vars reqaddress reqprefix clientid reqopts noslaaconly 
norelease ip6prefix iface_dslite hostid
 
 
# Configure
@@ -35,6 +36,8 @@ proto_dhcpv6_setup() {
 
[ $norelease = 1 ]  append opts -k
 
+   [ -n $hostid ]  append opts -H$hostid
+
for opt in $reqopts; do
append opts -r$opt
done
-- 
1.8.3.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv4 0/3] Add new target for i.MX23-based boards

2013-06-17 Thread Zoltan HERPAI

Hi Sergey,

Yes, this has been based off trunk, r36731, and you can give it a shot 
on latest trunk.


Regards,
Zoltan H



Sergey Shcherbakov wrote:

Hello Zoltan,

I would like to check your patches. Which branch you used or trunk?

Thanks a lot,
Sergey

With best regards,
Sergey D. Shcherbakov


2013/6/5 Zoltan HERPAI wigy...@uid0.hu mailto:wigy...@uid0.hu

Hi,

Any comments on this set?

Thanks,
Zoltan Herpai


On Mon, 27 May 2013, Zoltan HERPAI wrote:

This patch will add support for i.MX23-based boards, starting with
Olimex Olinuxino. This is an ARM9-based board which comes in
different
flavours depending on devices.

Currently supported:
- 3.9.4 kernel
- ext4 rootfs
- USB
- ethernet
- RTC, watchdog

Work in progress for:
- I2C
- SPI
- probably sound and FB

Patch list:
[PATCH 1/3]: Add tools support for i.MX23
[PATCH 2/3]: Add target for i.MX23
[PATCH 3/3]: Add missing regulator symbols

Regards,
Zoltan Herpai

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
mailto:openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
mailto:openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
  


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [odhcp6c] [PATCH] Add -H option to override the host id

2013-06-17 Thread Steven Barth

Hi Thomas,

I don't think the DHCPv6 client is the right place to do this.
You should rather configure PPP and select the interface identifier in 
its configuration as this patch would completely defeat the purpose of 
IPv6CP.



Regards,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel