Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Etienne Champetier
Hi and sorry John and all other that i could have offended.
That was really not the goal of my mail, and me being a bit tired and not
so good in english,
i wrote an awful rant without noticing.

Thanks for all the work that you are doing. I know that you and other are
working hard
to provide us the best router distribution out there
(i really mean it: infinite uptime (between power surge :) ), endless
customisation, great hardware support).

I originaly wrote this mail because i read a ticket on github asking to
backport some stuff to for-14.07,
but maybe it's too late for BB ... and was thinking why isn't BB out?
RC1 RC2 RC3 were quick but after that very few news
31 Jul - RC3, RC4 or final in 2 weeks
8 Sep - tests builds done, some more bugs fixed
18Sep - BB 14.07 is using 533282da863c27be4805fc1655f82f
5d9550194b
1Oct ...

Thanks for everything and sorry again for this useless rant
Etienne

2014-10-02 7:30 GMT+02:00 John Crispin :

>
> no its certainly farting. i have you 2 and about 1 other person
> complain. the other 95% sent me mails with nice and simple questions and
> input and so forth.
>
> i just had a look, yesterday i got related to BB
>
> * 8 "thank you" mails
> * 6 mails asking for various support things
> * 4 pkg maintainers ask for help/logs
> * 2 devs asking for root on the build server
> * 2 people reminded me that now BB is out of the way that i promised to
> fix NCM, hwdetect, ...
> * 2 mails of people voicing wishes for CC
> * 2 driver fixes for i2c on mediatek  .
> * and etiennes mails and your reply
>
> sorry but looking at those numbers it is farting that you are doing.
>
> John
>
>
> On 02/10/2014 07:01, Hanno Schupp wrote:
> > I think this is his point, mate: You work hard (in isolation), but
> > don't communicate.
> > If you want to avoid emails that smell like farts to you, why not tell
> > people what's going on?
> >
> > On 2 October 2014 17:51, John Crispin  > > wrote:
> >
> > nice rant, what happened at mignight that you got so angry that you
> > feel you needed to vent it out on us ?
> >
> > i would like to point out that the BB-final binaries have been online
> > for over a day. currently the root filesystems only hold a opkg.conf
> > with base and luci. last night we regenerated the files so that the
> > opkg.conf holds all feeds.
> >
> > while you were busy farting we were busy working. but thanks for the
> > nice mail.
> >
> >
> > On 01/10/2014 23:59, Etienne Champetier wrote:
> > > Hi,
> > >
> > > OpenWRT is a wonderfull piece of open source code, and it would be
> > > really great if the project management could be as open as the
> > > code. BB should be out now but for an unknow reason, it's not, and
> > > it's frustating. If some feature are missing, let people know. If
> > > some bugs need to be killed, let the community help. If buildbots
> > > are broken, let someone provide new ones. Open a TODO list on an
> > > etherpad, involve people. Whatever the reasons are, i'm sure some
> > > people can help.
> > >
> > > When you open the process, you get more work done (see new packages
> > > feed).
> > >
> > > Please communicate!!!
> > >
> > > Thanks Etienne
> > >
> > >
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Saverio Proto
Hello everyone !

Relax :) If we are reading this list it is because we all want a
better OpenWrt, and we all do the best we can for it.

Etienne in my experience the OpenWrt group is really open. The problem
is the that core people have to face thousands of contacts over the
Internet from unknown people. It is really hard to manage all this
incoming requests.

If you work on OpenWrt over the years, it is a good idea to come once
a while to some developer meeting. We have so many. Battlemesh.org,
FOSDEM, Freifunk WCW, CCC Camping 

Meet the people face to face it always helps to decode better the
emails at a later time. It is not just emails and forums, dont lose
the contact with the real life :)

Cheers !!!

Saverio




2014-10-02 9:20 GMT+02:00 Etienne Champetier :
> Hi and sorry John and all other that i could have offended.
> That was really not the goal of my mail, and me being a bit tired and not so
> good in english,
> i wrote an awful rant without noticing.
>
> Thanks for all the work that you are doing. I know that you and other are
> working hard
> to provide us the best router distribution out there
> (i really mean it: infinite uptime (between power surge :) ), endless
> customisation, great hardware support).
>
> I originaly wrote this mail because i read a ticket on github asking to
> backport some stuff to for-14.07,
> but maybe it's too late for BB ... and was thinking why isn't BB out?
> RC1 RC2 RC3 were quick but after that very few news
> 31 Jul - RC3, RC4 or final in 2 weeks
> 8 Sep - tests builds done, some more bugs fixed
> 18Sep - BB 14.07 is using 533282da863c27be4805fc1655f82f
> 5d9550194b
> 1Oct ...
>
> Thanks for everything and sorry again for this useless rant
> Etienne
>
> 2014-10-02 7:30 GMT+02:00 John Crispin :
>>
>>
>> no its certainly farting. i have you 2 and about 1 other person
>> complain. the other 95% sent me mails with nice and simple questions and
>> input and so forth.
>>
>> i just had a look, yesterday i got related to BB
>>
>> * 8 "thank you" mails
>> * 6 mails asking for various support things
>> * 4 pkg maintainers ask for help/logs
>> * 2 devs asking for root on the build server
>> * 2 people reminded me that now BB is out of the way that i promised to
>> fix NCM, hwdetect, ...
>> * 2 mails of people voicing wishes for CC
>> * 2 driver fixes for i2c on mediatek  .
>> * and etiennes mails and your reply
>>
>> sorry but looking at those numbers it is farting that you are doing.
>>
>> John
>>
>>
>> On 02/10/2014 07:01, Hanno Schupp wrote:
>> > I think this is his point, mate: You work hard (in isolation), but
>> > don't communicate.
>> > If you want to avoid emails that smell like farts to you, why not tell
>> > people what's going on?
>> >
>> > On 2 October 2014 17:51, John Crispin > > > wrote:
>> >
>> > nice rant, what happened at mignight that you got so angry that you
>> > feel you needed to vent it out on us ?
>> >
>> > i would like to point out that the BB-final binaries have been
>> > online
>> > for over a day. currently the root filesystems only hold a opkg.conf
>> > with base and luci. last night we regenerated the files so that the
>> > opkg.conf holds all feeds.
>> >
>> > while you were busy farting we were busy working. but thanks for the
>> > nice mail.
>> >
>> >
>> > On 01/10/2014 23:59, Etienne Champetier wrote:
>> > > Hi,
>> > >
>> > > OpenWRT is a wonderfull piece of open source code, and it would be
>> > > really great if the project management could be as open as the
>> > > code. BB should be out now but for an unknow reason, it's not, and
>> > > it's frustating. If some feature are missing, let people know. If
>> > > some bugs need to be killed, let the community help. If buildbots
>> > > are broken, let someone provide new ones. Open a TODO list on an
>> > > etherpad, involve people. Whatever the reasons are, i'm sure some
>> > > people can help.
>> > >
>> > > When you open the process, you get more work done (see new
>> > packages
>> > > feed).
>> > >
>> > > Please communicate!!!
>> > >
>> > > Thanks Etienne
>> > >
>> > >
>
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Bruno Randolf
Hi all,

While we all agree that the OpenWRT core developers are doing great
work, are really busy, and sometimes it's more important to fix a bug
that to send an email, I think Etienne raises a valid point here:
communication could be better and the project management could be more
open...

For example, I did not know that "BB-final binaries have been online for
over a day"... is it really too much to ask to send a short note about a
major release to the mailing list?

bruno

On 10/02/2014 05:51 AM, John Crispin wrote:
> nice rant, what happened at mignight that you got so angry that you
> feel you needed to vent it out on us ?
> 
> i would like to point out that the BB-final binaries have been online
> for over a day. currently the root filesystems only hold a opkg.conf
> with base and luci. last night we regenerated the files so that the
> opkg.conf holds all feeds.
> 
> while you were busy farting we were busy working. but thanks for the
> nice mail.
> 
> 
> 
> 
> 
> On 01/10/2014 23:59, Etienne Champetier wrote:
>> Hi,
>>
>> OpenWRT is a wonderfull piece of open source code, and it would be 
>> really great if the project management could be as open as the
>> code. BB should be out now but for an unknow reason, it's not, and
>> it's frustating. If some feature are missing, let people know. If
>> some bugs need to be killed, let the community help. If buildbots
>> are broken, let someone provide new ones. Open a TODO list on an
>> etherpad, involve people. Whatever the reasons are, i'm sure some
>> people can help.
>>
>> When you open the process, you get more work done (see new packages
>> feed).
>>
>> Please communicate!!!
>>
>> Thanks Etienne
>>
>>
>> ___ openwrt-devel
>> mailing list openwrt-devel@lists.openwrt.org 
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uqmi - Specifying Link Protocol (libqmi --device-open-net=net-802-3 option)

2014-10-02 Thread Bjørn Mork
John Crispin  writes:

> we noticed that qmi is not working properly today and are working on a fix.
>
>   John
>
> On 01/10/2014 21:12, Spam Catcher wrote:
>> I'm trying to use uqmi with a Sierra Wireless MC7354 and MC7750.  On
>> both modules I'm able to bring up a connection to the cell network, but
>> cannot send or receive anything on the wwan0 interface. After much
>> digging I found an option for libqmi that specifies using ethernet
>> headers instead of raw IP (--device-open-net=net-802-3).  When I
>> specified this option with libqmi, both modules came up with an IP
>> address immediately and allowed traffic to pass without issue. Is there
>> an equivalent parameter I can use for uqmi?  Or maybe even a compilation
>> flag to have it always requested?
>> 
>> I'll only be using LTE mode, so the firmware bug where 3G and 4G behave
>> differently shouldn't affect me (I think).

LTE or not should not make any difference wrt configuring the modem for
802.3 headers.  The qmi_wwan driver always assumes that the modem is in
802.3 mode, and since it doesn't participate in QMI at all it depends on
the userspace application putting the modem in the appropriate mode.

The problem is that this setting is persistent and can be changed by
other drivers, firmware upgrade applications, other QMI applications.
So any QMI userspace application using the qmi_wwan driver should
*always* verify and/or set 802.3 mode before doing anything else. The
persistence makes this appear unnecessary for most modems, but trusting
that is fooling yourself.

Older QMI firmwares (with no QMI_WDA support) have no way to verify
the mode, so the only option is to blindly set 802.3 using  the
QMI_CTL_SET_DATA_FORMAT request.  Newer firmwares (which means anything
running on a MC7354) will have QMI_WDA allowing you to check the current
setting.



Bjørn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uqmi - Specifying Link Protocol (libqmi --device-open-net=net-802-3 option)

2014-10-02 Thread Felix Fietkau
On 2014-10-01 21:12, Spam Catcher wrote:
> I'm trying to use uqmi with a Sierra Wireless MC7354 and MC7750.  On
> both modules I'm able to bring up a connection to the cell network, but
> cannot send or receive anything on the wwan0 interface. After much
> digging I found an option for libqmi that specifies using ethernet
> headers instead of raw IP (--device-open-net=net-802-3).  When I
> specified this option with libqmi, both modules came up with an IP
> address immediately and allowed traffic to pass without issue. Is there
> an equivalent parameter I can use for uqmi?  Or maybe even a compilation
> flag to have it always requested?
> 
> I'll only be using LTE mode, so the firmware bug where 3G and 4G behave
> differently shouldn't affect me (I think). If the functionality's not
> already in uqmi for requesting ethernet headers, then I'd gladly donate
> .25BTC (~ $100) to someone for implementing this.
Since I'm working on uqmi today already, I'll take care of this as well.
I'll let you know when the changes are available for testing.

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


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Hanno Schupp
Apparently yes, Bruno. Just asking for more communication while at the same
time even commending the devs for their hard work, as Etienne did, seems to
justify being insulted.

Personal sensibilities aside this has been a bone of contention for a long
time. Here just a couple of examples:
https://lists.openwrt.org/pipermail/openwrt-devel/2012-August/016427.html
https://forum.openwrt.org/viewtopic.php?id=27466

Sadly, immature responses like the one to Etienne's simple request puts a
sour note on this otherwise great project.



On 2 October 2014 22:06, Bruno Randolf  wrote:

> Hi all,
>
> While we all agree that the OpenWRT core developers are doing great
> work, are really busy, and sometimes it's more important to fix a bug
> that to send an email, I think Etienne raises a valid point here:
> communication could be better and the project management could be more
> open...
>
> For example, I did not know that "BB-final binaries have been online for
> over a day"... is it really too much to ask to send a short note about a
> major release to the mailing list?
>
> bruno
>
> On 10/02/2014 05:51 AM, John Crispin wrote:
> > nice rant, what happened at mignight that you got so angry that you
> > feel you needed to vent it out on us ?
> >
> > i would like to point out that the BB-final binaries have been online
> > for over a day. currently the root filesystems only hold a opkg.conf
> > with base and luci. last night we regenerated the files so that the
> > opkg.conf holds all feeds.
> >
> > while you were busy farting we were busy working. but thanks for the
> > nice mail.
> >
> >
> >
> >
> >
> > On 01/10/2014 23:59, Etienne Champetier wrote:
> >> Hi,
> >>
> >> OpenWRT is a wonderfull piece of open source code, and it would be
> >> really great if the project management could be as open as the
> >> code. BB should be out now but for an unknow reason, it's not, and
> >> it's frustating. If some feature are missing, let people know. If
> >> some bugs need to be killed, let the community help. If buildbots
> >> are broken, let someone provide new ones. Open a TODO list on an
> >> etherpad, involve people. Whatever the reasons are, i'm sure some
> >> people can help.
> >>
> >> When you open the process, you get more work done (see new packages
> >> feed).
> >>
> >> Please communicate!!!
> >>
> >> Thanks Etienne
> >>
> >>
> >> ___ openwrt-devel
> >> mailing list openwrt-devel@lists.openwrt.org
> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >>
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Hanno Schupp
Really, John?
Personal insults through direct emails?

On 2 October 2014 18:14, John Crispin  wrote:

> until now i considered you "one of the reliable crowd" and just
> reasserted to "yet another troll"
>
>
> On 02/10/2014 07:01, Hanno Schupp wrote:
> > I think this is his point, mate: You work hard (in isolation), but
> > don't communicate. If you want to avoid emails that smell like
> > farts to you, why not tell people what's going on?
> >
> > On 2 October 2014 17:51, John Crispin  > > wrote:
> >
> > nice rant, what happened at mignight that you got so angry that
> > you feel you needed to vent it out on us ?
> >
> > i would like to point out that the BB-final binaries have been
> > online for over a day. currently the root filesystems only hold a
> > opkg.conf with base and luci. last night we regenerated the files
> > so that the opkg.conf holds all feeds.
> >
> > while you were busy farting we were busy working. but thanks for
> > the nice mail.
> >
> >
> >
> >
> >
> > On 01/10/2014 23:59, Etienne Champetier wrote:
> >> Hi,
> >>
> >> OpenWRT is a wonderfull piece of open source code, and it would
> >> be really great if the project management could be as open as
> >> the code. BB should be out now but for an unknow reason, it's
> >> not, and it's frustating. If some feature are missing, let people
> >> know. If some bugs need to be killed, let the community help. If
> >> buildbots are broken, let someone provide new ones. Open a TODO
> >> list on an etherpad, involve people. Whatever the reasons are,
> >> i'm sure some people can help.
> >>
> >> When you open the process, you get more work done (see new
> >> packages feed).
> >>
> >> Please communicate!!!
> >>
> >> Thanks Etienne
> >>
> >>
> >> ___ openwrt-devel
> >> mailing list openwrt-devel@lists.openwrt.org
> > 
> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >>
> > ___ openwrt-devel
> > mailing list openwrt-devel@lists.openwrt.org
> > 
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> >
> >
> >
> > ___ openwrt-devel
> > mailing list openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread buddhay
On 02.10.2014 12:21, Hanno Schupp wrote:
> For example, I did not know that "BB-final binaries have been online for
> over a day"... is it really too much to ask to send a short note about a
> major release to the mailing list?

exactly Etiennes point, correct and valid as opposed to uncivilized comments 
comparing it to farting ..bud
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Felix Fietkau
On 2014-10-02 11:06, Bruno Randolf wrote:
> Hi all,
> 
> While we all agree that the OpenWRT core developers are doing great
> work, are really busy, and sometimes it's more important to fix a bug
> that to send an email, I think Etienne raises a valid point here:
> communication could be better and the project management could be more
> open...
> 
> For example, I did not know that "BB-final binaries have been online for
> over a day"... is it really too much to ask to send a short note about a
> major release to the mailing list?
FWIW, I also think think that the point is valid. This is something that
we need to work on.

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


Re: [OpenWrt-Devel] kernel changes on recompilation?

2014-10-02 Thread Russell Senior
> "Nishant" == Nishant Sharma  writes:

Nishant> [...] I never did a clean or dir clean but yes I enabled a
Nishant> few packages and modules with new requirements.

Nishant> Which is fine by my own thinking. And just for adding
Nishant> e.g. batman-adv to existing devices in the field, it becomes
Nishant> a pain to reflash them due to kernel hash change.

Nishant> Any more pointers please?

I'm not sure this works, but it was once suggested that building all
the otherwise unselected kernel modules as  would result in a
consistent hash.  If true, then you can add these to your image later,
or install them later without the hash clash.  

Please test and report back :-)


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt

2014-10-02 Thread David Lang

On Thu, 2 Oct 2014, Alpha Sparc wrote:


How good is the throughput on CeroWrt compared to OpenWrt ?


The focus of CeroWrt is on reducing latency, not increasing throughput. If you 
run into really badd bufferbloat problems without these scrips, then these 
scripts can result more more 'goodput' (useable data as opposed to 'throughput' 
bits on the wire) getting through, but in the usual case there will be a 
(slight) reduction in the peak throughput.


This is especially so on the inbound side of things because the router is having 
to work indirectly to throttle the senders so that they don't overload the 
router at the other end of the connection.


I beleive that on the WNDR3800, it's able to work up to about 50Mb with the 
existing configurations. A faster CPU would do better, a slower one worse. The 
re-write that Dave is talking about is hoting to improve this. From the pastebin 
link Dave listed below, they have it up to ~80Mb now


David Lang


On Oct 2, 2014 9:55 AM, "Dave Taht"  wrote:


On Wed, Oct 01, 2014 at 12:10:46PM -0400, Weedy wrote:

On 30/03/14 06:29 PM, Dave Taht wrote:

On Sun, Mar 30, 2014 at 02:24:44PM -0400, Weedy wrote:

On Sat, Mar 29, 2014 at 2:56 PM, Dave Täht 
wrote:



From: Dave Taht 

This adds support for the bufferbloat project's "Smart Queue

Management"

(SQM) system, which improves over openwrt's qos-scripts in the

following

ways

+ Uses HTB with two models for managing traffic
  a simplest one that merely uses fq_codel, and a three tier one

that does

  some basic and tunable packet prioritization.

+ Works with ipv6 and ipv4 correctly (unlike qos-scripts)
+ extensive support for fixing ADSL and PPOe framing problems
+ Partial support for key diffserv markings
+ highly tuned fq_codel implementation especially for low bandwidths
+ Tested heavily on cable modems and on dsl devices

It is a disimprovement in that:

- There are no built-in tricks for doing l7 classification,
or other forms of packet inspection.

- We haven't explored hfsc all that much, prefering to rely
on the predictable behavior of htb + fq_codel for everything

- And there is support for a few qdiscs that are not in the linux
kernel mainline that remain experimental.
---
 net/sqm-scripts/Makefile   |   48 +++
 net/sqm-scripts/files/etc/config/sqm   |   11 +
 net/sqm-scripts/files/etc/init.d/sqm   |   23 ++
 net/sqm-scripts/files/usr/lib/sqm/functions.sh |  335

 net/sqm-scripts/files/usr/lib/sqm/run.sh   |   67 
 net/sqm-scripts/files/usr/lib/sqm/simple.qos   |  187

+++

 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help  |1 +
 net/sqm-scripts/files/usr/lib/sqm/simplest.qos |   84 +
 .../files/usr/lib/sqm/simplest.qos.help|1 +
 net/sqm-scripts/files/usr/lib/sqm/stop.sh  |   22 ++
 10 files changed, 779 insertions(+)
 create mode 100644 net/sqm-scripts/Makefile
 create mode 100644 net/sqm-scripts/files/etc/config/sqm
 create mode 100755 net/sqm-scripts/files/etc/init.d/sqm
 create mode 100644 net/sqm-scripts/files/usr/lib/sqm/functions.sh
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/run.sh
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simple.qos
 create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simplest.qos
 create mode 100644

net/sqm-scripts/files/usr/lib/sqm/simplest.qos.help

 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/stop.sh

diff --git a/net/sqm-scripts/files/etc/config/sqm
b/net/sqm-scripts/files/etc/config/sqm
new file mode 100644
index 000..547d321
--- /dev/null
+++ b/net/sqm-scripts/files/etc/config/sqm
@@ -0,0 +1,11 @@
+
+config queue 'ge00'
+option enabled '0'
+option interface 'ge00'
+option download '2'
+option upload '4000'
+option qdisc 'fq_codel'
+option script 'simple.qos'
+option qdisc_advanced '0'
+option linklayer 'none'
+



How hard is this to config from the command line/vim?


There are a few more options than this (for DSL compensation, ecn
and advanced configuration), the above would work if you changed
enabled to '1' and the device from ge00 to your wan device. (not
the "wan" firewall rule, presently. )

It does help to have a sane long term and realistic measurement of your
network using something like the rrul test rather than the oft-gamed

speedtest.




http://www.bufferbloat.net/projects/cerowrt/wiki/Setting_up_SQM_for_CeroWrt_310


You are right, we should fully document all the variables in this file.
Until recently they were kind of in flux.


I've never needed or really wanted luci on my box, I just use vim.

Going by

this patch, there is either nothing to config or no examples. I would

think

shipping a roughly equivalent config to what ships in qos-scripts

would be

a good start to get people testing.


/etc/init.d/sqm start,stop etc work as expected.


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Imre Kaloz

John,

Please mind your manners and keep the discussion at a professional level. I 
doubt Etienne wanted to insult you or criticize your work, and it's true that 
we did not announce of the availability of final binaries yet.


Imre

On Thu, 02 Oct 2014 07:30:41 +0200, John Crispin  wrote:



no its certainly farting. i have you 2 and about 1 other person
complain. the other 95% sent me mails with nice and simple questions and
input and so forth.

i just had a look, yesterday i got related to BB

* 8 "thank you" mails
* 6 mails asking for various support things
* 4 pkg maintainers ask for help/logs
* 2 devs asking for root on the build server
* 2 people reminded me that now BB is out of the way that i promised to
fix NCM, hwdetect, ...
* 2 mails of people voicing wishes for CC
* 2 driver fixes for i2c on mediatek  .
* and etiennes mails and your reply

sorry but looking at those numbers it is farting that you are doing.

John








On 02/10/2014 07:01, Hanno Schupp wrote:

I think this is his point, mate: You work hard (in isolation), but
don't communicate.
If you want to avoid emails that smell like farts to you, why not tell
people what's going on?

On 2 October 2014 17:51, John Crispin mailto:blo...@openwrt.org>> wrote:

nice rant, what happened at mignight that you got so angry that you
feel you needed to vent it out on us ?

i would like to point out that the BB-final binaries have been online
for over a day. currently the root filesystems only hold a opkg.conf
with base and luci. last night we regenerated the files so that the
opkg.conf holds all feeds.

while you were busy farting we were busy working. but thanks for the
nice mail.





On 01/10/2014 23:59, Etienne Champetier wrote:
> Hi,
>
> OpenWRT is a wonderfull piece of open source code, and it would be
> really great if the project management could be as open as the
> code. BB should be out now but for an unknow reason, it's not, and
> it's frustating. If some feature are missing, let people know. If
> some bugs need to be killed, let the community help. If buildbots
> are broken, let someone provide new ones. Open a TODO list on an
> etherpad, involve people. Whatever the reasons are, i'm sure some
> people can help.
>
> When you open the process, you get more work done (see new packages
> feed).
>
> Please communicate!!!
>
> Thanks Etienne
>
>
> ___ openwrt-devel
> mailing list openwrt-devel@lists.openwrt.org

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

https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



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

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


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Adam Kuklycz
One thing I have observed is that some developers are on the TRAC system and
actively looking at tickets, while others are purely on the mailing list and
do not regularly (or at all) look at the TRAC system.

This can cause confusion and frustration for some who are wanting to report
a bug, and report it via the TRAC system only to find out a couple of weeks
later that the developer responsible for a certain bug/package only looks at
the mailing list.

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of John Crispin
Sent: Thursday, 2 October 2014 3:31 PM
To: Hanno Schupp
Cc: OpenWrt Development List
Subject: Re: [OpenWrt-Devel] Open source & open process


no its certainly farting. i have you 2 and about 1 other person
complain. the other 95% sent me mails with nice and simple questions and
input and so forth.

i just had a look, yesterday i got related to BB

* 8 "thank you" mails
* 6 mails asking for various support things
* 4 pkg maintainers ask for help/logs
* 2 devs asking for root on the build server
* 2 people reminded me that now BB is out of the way that i promised to
fix NCM, hwdetect, ...
* 2 mails of people voicing wishes for CC
* 2 driver fixes for i2c on mediatek  .
* and etiennes mails and your reply

sorry but looking at those numbers it is farting that you are doing.

John








On 02/10/2014 07:01, Hanno Schupp wrote:
> I think this is his point, mate: You work hard (in isolation), but
> don't communicate.
> If you want to avoid emails that smell like farts to you, why not tell
> people what's going on?
>
> On 2 October 2014 17:51, John Crispin  > wrote:
>
> nice rant, what happened at mignight that you got so angry that you
> feel you needed to vent it out on us ?
>
> i would like to point out that the BB-final binaries have been online
> for over a day. currently the root filesystems only hold a opkg.conf
> with base and luci. last night we regenerated the files so that the
> opkg.conf holds all feeds.
>
> while you were busy farting we were busy working. but thanks for the
> nice mail.
>
>
>
>
>
> On 01/10/2014 23:59, Etienne Champetier wrote:
> > Hi,
> >
> > OpenWRT is a wonderfull piece of open source code, and it would be
> > really great if the project management could be as open as the
> > code. BB should be out now but for an unknow reason, it's not, and
> > it's frustating. If some feature are missing, let people know. If
> > some bugs need to be killed, let the community help. If buildbots
> > are broken, let someone provide new ones. Open a TODO list on an
> > etherpad, involve people. Whatever the reasons are, i'm sure some
> > people can help.
> >
> > When you open the process, you get more work done (see new packages
> > feed).
> >
> > Please communicate!!!
> >
> > Thanks Etienne
> >
> >
> > ___ openwrt-devel
> > mailing list openwrt-devel@lists.openwrt.org
> 
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] uqmi - Specifying Link Protocol (libqmi --device-open-net=net-802-3 option)

2014-10-02 Thread Felix Fietkau
On 2014-10-02 11:22, Felix Fietkau wrote:
> On 2014-10-01 21:12, Spam Catcher wrote:
>> I'm trying to use uqmi with a Sierra Wireless MC7354 and MC7750.  On
>> both modules I'm able to bring up a connection to the cell network, but
>> cannot send or receive anything on the wwan0 interface. After much
>> digging I found an option for libqmi that specifies using ethernet
>> headers instead of raw IP (--device-open-net=net-802-3).  When I
>> specified this option with libqmi, both modules came up with an IP
>> address immediately and allowed traffic to pass without issue. Is there
>> an equivalent parameter I can use for uqmi?  Or maybe even a compilation
>> flag to have it always requested?
>> 
>> I'll only be using LTE mode, so the firmware bug where 3G and 4G behave
>> differently shouldn't affect me (I think). If the functionality's not
>> already in uqmi for requesting ethernet headers, then I'd gladly donate
>> .25BTC (~ $100) to someone for implementing this.
> Since I'm working on uqmi today already, I'll take care of this as well.
> I'll let you know when the changes are available for testing.
This feature is implemented now, as of r42724 - please test.
By the way, the script sets the mode at startup time automatically.

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


Re: [OpenWrt-Devel] Open source & open process

2014-10-02 Thread Etienne Champetier
My first email was wrong, and i don't want to criticize anybody work, don't
want to insult anybody,
and really don't want to start a war.

Apologies again

2014-10-02 13:55 GMT+02:00 Imre Kaloz :

> John,
>
> Please mind your manners and keep the discussion at a professional level.
> I doubt Etienne wanted to insult you or criticize your work, and it's true
> that we did not announce of the availability of final binaries yet.
>
>
> Imre
>
>
> On Thu, 02 Oct 2014 07:30:41 +0200, John Crispin 
> wrote:
>
>
>> no its certainly farting. i have you 2 and about 1 other person
>> complain. the other 95% sent me mails with nice and simple questions and
>> input and so forth.
>>
>> i just had a look, yesterday i got related to BB
>>
>> * 8 "thank you" mails
>> * 6 mails asking for various support things
>> * 4 pkg maintainers ask for help/logs
>> * 2 devs asking for root on the build server
>> * 2 people reminded me that now BB is out of the way that i promised to
>> fix NCM, hwdetect, ...
>> * 2 mails of people voicing wishes for CC
>> * 2 driver fixes for i2c on mediatek  .
>> * and etiennes mails and your reply
>>
>> sorry but looking at those numbers it is farting that you are doing.
>>
>> John
>>
>>
>>
>>
>>
>>
>>
>>
>> On 02/10/2014 07:01, Hanno Schupp wrote:
>>
>>> I think this is his point, mate: You work hard (in isolation), but
>>> don't communicate.
>>> If you want to avoid emails that smell like farts to you, why not tell
>>> people what's going on?
>>>
>>> On 2 October 2014 17:51, John Crispin >> > wrote:
>>>
>>> nice rant, what happened at mignight that you got so angry that you
>>> feel you needed to vent it out on us ?
>>>
>>> i would like to point out that the BB-final binaries have been online
>>> for over a day. currently the root filesystems only hold a opkg.conf
>>> with base and luci. last night we regenerated the files so that the
>>> opkg.conf holds all feeds.
>>>
>>> while you were busy farting we were busy working. but thanks for the
>>> nice mail.
>>>
>>>
>>>
>>>
>>>
>>> On 01/10/2014 23:59, Etienne Champetier wrote:
>>> > Hi,
>>> >
>>> > OpenWRT is a wonderfull piece of open source code, and it would be
>>> > really great if the project management could be as open as the
>>> > code. BB should be out now but for an unknow reason, it's not, and
>>> > it's frustating. If some feature are missing, let people know. If
>>> > some bugs need to be killed, let the community help. If buildbots
>>> > are broken, let someone provide new ones. Open a TODO list on an
>>> > etherpad, involve people. Whatever the reasons are, i'm sure some
>>> > people can help.
>>> >
>>> > When you open the process, you get more work done (see new packages
>>> > feed).
>>> >
>>> > Please communicate!!!
>>> >
>>> > Thanks Etienne
>>> >
>>> >
>>> > ___ openwrt-devel
>>> > mailing list openwrt-devel@lists.openwrt.org
>>> 
>>> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>> >
>>> ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> 
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>>
>>>  ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH netifd] proto-shell: fix for not handling switch from DHCP to static race

2014-10-02 Thread Michel Stam
When a shell script call is finished, proto_shell_task_finish( ) is
called to monitor processes, and determine the next interface state.

When the interface is brought up after a reconfiguration from dhcp
to static, it will first try to (erroneously?) reconfigure the
interface for DHCP. Upon doing this, it realises the mistake and
kills off the script by setting the state to S_SETUP_ABORT. This is
done by the proto_shell_handler. When this happens. the scripts
have 1 second to finish.
When this happens, S_SETUP_ABORT in proto_shell_task_finish( )
should issue a 'teardown' event to the shell script to deconfigure
the interface. It is here that things go wrong.

Shell scripts do not execute commands themselves, they should
finish as quick as possible. This is very race condition sensitive,
though; Instead of executing commands, they post messages to
execute commands. It is therefore possible that when the script
finishes, there's still commands to execute.

The dhcp protocol handler script, one of the scripts involved,
notifies netifd of changes by (indirectly) calling
proto_shell_update_link( ).

Once every so often, the dhcp script will not be finished in time,
and proto_shell_task_finish( ) cannot immediately continue,
because (in this case) the proto_task is still pending.

If this happens, the proto_shell_task_finish( ) will wait, but if
the proto_shell_update_link( ) notification is then received, it
will set the statemachine to idle, thus breaking the
S_SETUP_ABORT. Furthermore, an event is generated to indicate that
the network interface should be set to UP, rather than DOWN.

This confuses netifd, and the result is a stuck process that does
not respond to UCI calls anymore.

Note that a similar situation happens in the S_TEARDOWN state in
proto_shell_task_finish( ).

The fix, although a bit ugly, is to prevent the UP event from
being sent, and not to reset the state machine to idle in
proto_shell_update_link( ).

Signed-off-by: Michel Stam 
---
 proto-shell.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/proto-shell.c b/proto-shell.c
index 7c23caa..0131e19 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -506,9 +506,11 @@ proto_shell_update_link(struct proto_shell_state *state, 
struct blob_attr *data,
 
interface_update_complete(state->proto.iface);
 
-   if (!keep)
-   state->proto.proto_event(&state->proto, IFPEV_UP);
-   state->sm = S_IDLE;
+   if ((state->sm != S_SETUP_ABORT) && (state->sm != S_TEARDOWN)) {
+   if (!keep)
+   state->proto.proto_event(&state->proto, IFPEV_UP);
+   state->sm = S_IDLE;
+   }
 
return 0;
 }
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH ubox] Use different loglevels

2014-10-02 Thread Michel Stam
Ubox logs various messages during OpenWRT boot which are not
very interesting, such as the number of iterations made. This
fix implements several loglevels for debug/info/error so that
more useful messages are shown.

Signed-off-by: Michel Stam 
---
 kmodloader.c | 75 +---
 1 file changed, 41 insertions(+), 34 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 633570f..04d7c1d 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -38,10 +38,17 @@
 
 #define DEF_MOD_PATH "/lib/modules/%s/"
 
-#define LOG(fmt, ...) do { \
+#define INFO(fmt, ...) do { \
syslog(LOG_INFO, fmt, ## __VA_ARGS__); \
printf("kmod: "fmt, ## __VA_ARGS__); \
} while (0)
+#define ERROR(fmt, ...) do { \
+   syslog(LOG_ERR, fmt, ## __VA_ARGS__); \
+   fprintf(stderr,"kmod: "fmt, ## __VA_ARGS__); \
+   } while (0)
+#define DEBUG(fmt, ...) do { \
+   syslog(LOG_DEBUG, fmt, ## __VA_ARGS__); \
+   } while (0)
 
 
 enum {
@@ -165,7 +172,7 @@ static int elf_find_section(char *map, const char *section, 
unsigned int *offset
else if (clazz == ELFCLASS64)
return elf64_find_section(map, section, offset, size);
 
-   LOG("unknown elf format %d\n", clazz);
+   ERROR("unknown elf format %d\n", clazz);
 
return -1;
 }
@@ -208,7 +215,7 @@ static int scan_loaded_modules(void)
 
fp = fopen("/proc/modules", "r");
if (!fp) {
-   LOG("failed to open /proc/modules\n");
+   ERROR("failed to open /proc/modules\n");
return -1;
}
 
@@ -243,23 +250,23 @@ static struct module* get_module_info(const char *module, 
const char *name)
struct stat s;
 
if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return NULL;
}
 
if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return NULL;
}
 
map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return NULL;
}
 
if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n", module);
+   ERROR("failed to load the .modinfo section from %s\n", module);
return NULL;
}
 
@@ -329,23 +336,23 @@ static int print_modinfo(char *module)
char *map, *strings;
 
if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return -1;
}
 
if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return -1;
}
 
map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return -1;
}
 
if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n", module);
+   ERROR("failed to load the .modinfo section from %s\n", module);
return -1;
}
 
@@ -390,9 +397,9 @@ static int deps_available(struct module *m, int verbose)
m = find_module(dep);
 
if (verbose && !m)
-   LOG("missing dependency %s\n", dep);
+   ERROR("missing dependency %s\n", dep);
if (verbose && m && (m->state != LOADED))
-   LOG("dependency not loaded %s\n", dep);
+   ERROR("dependency not loaded %s\n", dep);
if (!m || (m->state != LOADED))
err++;
dep += strlen(dep) + 1;
@@ -408,13 +415,13 @@ static int insert_module(char *path, const char *options)
int fd, ret = -1;
 
if (stat(path, &s)) {
-   LOG("missing module %s\n", path);
+   ERROR("missing module %s\n", path);
return ret;
}
 
fd = open(path, O_RDONLY);
if (!fd) {
-   LOG("cannot open %s\n", path);
+   ERROR("cannot open %s\n", path);
return ret;
}
 
@@ -422,7 +429,7 @@ static int insert_module(char *path, const char *options)
if (read(fd, data, s.st_size) == s.st_size)
ret = syscall(__NR_init_module, data, (unsigned long) 
s.st_size, options);
else
-   LOG("failed to read full module %s\n", path);
+   ERROR("failed to read full module %s\n", path);
 
close(fd);
free(data);
@@ -444,7 

[OpenWrt-Devel] [PATCH libubox] Allow SIGINT to be released on request

2014-10-02 Thread Michel Stam
SIGINT is captured by uloop by default. This does not work for
procd, where SIGINT is used by the kernel to indicate that the
system must be rebooted.

Signed-off-by: Michel Stam 
---
 uloop.c | 24 +---
 uloop.h |  1 +
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/uloop.c b/uloop.c
index c3d206a..5180a80 100644
--- a/uloop.c
+++ b/uloop.c
@@ -57,6 +57,7 @@ static struct list_head timeouts = LIST_HEAD_INIT(timeouts);
 static struct list_head processes = LIST_HEAD_INIT(processes);
 
 static int poll_fd = -1;
+static bool uloop_catch_sigint = true;
 bool uloop_cancelled = false;
 bool uloop_handle_sigchld = true;
 static bool do_sigchld = false;
@@ -549,6 +550,11 @@ static void uloop_handle_processes(void)
 
 }
 
+void uloop_release_sigint(void)
+{
+   uloop_catch_sigint = false;
+}
+
 static void uloop_handle_sigint(int signo)
 {
uloop_cancelled = true;
@@ -562,18 +568,22 @@ static void uloop_sigchld(int signo)
 static void uloop_setup_signals(bool add)
 {
static struct sigaction old_sigint, old_sigchld;
+   static bool sigint_caught = false;
struct sigaction s;
 
memset(&s, 0, sizeof(struct sigaction));
 
-   if (add) {
-   s.sa_handler = uloop_handle_sigint;
-   s.sa_flags = 0;
-   } else {
-   s = old_sigint;
-   }
+   if (uloop_catch_sigint || sigint_caught) {
+   sigint_caught = true;
+   if (add) {
+   s.sa_handler = uloop_handle_sigint;
+   s.sa_flags = 0;
+   } else {
+   s = old_sigint;
+   }
 
-   sigaction(SIGINT, &s, &old_sigint);
+   sigaction(SIGINT, &s, &old_sigint);
+   }
 
if (!uloop_handle_sigchld)
return;
diff --git a/uloop.h b/uloop.h
index 7564514..b38d213 100644
--- a/uloop.h
+++ b/uloop.h
@@ -105,5 +105,6 @@ static inline void uloop_end(void)
 int uloop_init(void);
 void uloop_run(void);
 void uloop_done(void);
+void uloop_release_sigint(void);
 
 #endif
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] kernel changes on recompilation?

2014-10-02 Thread Jo-Philipp Wich
Hi Gui,

this is not supposed to happen though - you can see the magic in
include/kernel-defaults.mk - define Kernel/Configure/Default

The hash is calculated like that:

 grep '=[ym]' .../.config | sort | md5sum


Can you diff the Kernel build_dir/target-*/linux-*/linux-*/.config file
before and after make dirclean?

I'd like to know why the hash is not stable...


Regards,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd] Add ctrlaltdel handler to procd

2014-10-02 Thread Michel Stam
Procd, up until now, did not support the ctrlaltdel handler. Thus,
the system would immediately reboot upon the three-finger salute,
and no shutdown scripts would be run. This patch adds the handler
for the /etc/inittab entry, so that /sbin/reboot can be run and
in turn the shutdown scripts can be invoked.

Signed-off-by: Michel Stam 
---
 procd.c  | 1 +
 signal.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/procd.c b/procd.c
index ad80284..6ec7cd0 100644
--- a/procd.c
+++ b/procd.c
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
}
}
uloop_init();
+   uloop_release_sigint();
procd_signal();
trigger_init();
if (getpid() != 1)
diff --git a/signal.c b/signal.c
index 74cabcb..6c00fd9 100644
--- a/signal.c
+++ b/signal.c
@@ -36,6 +36,7 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, 
void *data)
char *msg = NULL;
 
switch(signal) {
+   case SIGINT:
case SIGTERM:
event = RB_AUTOBOOT;
msg = "reboot";
@@ -91,4 +92,6 @@ void procd_signal(void)
sigaction(SIGHUP, &sa_dummy, NULL);
sigaction(SIGKILL, &sa_dummy, NULL);
sigaction(SIGSTOP, &sa_dummy, NULL);
+   sigaction(SIGINT, &sa_shutdown, NULL);
+   reboot(RB_DISABLE_CAD);
 }
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 1/8] Fix procd not handling rapid reboot signals very well

2014-10-02 Thread Michel Stam
When keeping ctrl-alt-del pressed, or when running;
while true; do
/sbin/reboot
done
effectively the procd shutdown cycle gets into an undefined state,

Signed-off-by: Michel Stam 
---
 state.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/state.c b/state.c
index e5f0015..2de32e1 100644
--- a/state.c
+++ b/state.c
@@ -94,8 +94,10 @@ void procd_state_next(void)
 
 void procd_shutdown(int event)
 {
-   DEBUG(2, "Shutting down system with event %x\n", event);
-   reboot_event = event;
-   state = STATE_SHUTDOWN;
-   state_enter();
+   if (state < STATE_SHUTDOWN) {
+   DEBUG(2, "Shutting down system with event %x\n", event);
+   reboot_event = event;
+   state = STATE_SHUTDOWN;
+   state_enter();
+   }
 }
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 6/8] Reboot busybox style via procd

2014-10-02 Thread Michel Stam
It has been observed that, very rarely, the system does not reboot
when procd enters the shutdown state. Busybox seems to have an
obscure fix in its shutdown, where the parent (procd) process
is put in an infinite loop, and a special child is executed to
execute reboot(). This may very well be the cause.

Signed-off-by: Michel Stam 
---
 state.c | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/state.c b/state.c
index 05f7dc5..e6c8712 100644
--- a/state.c
+++ b/state.c
@@ -86,7 +86,20 @@ static void state_enter(void)
sync();
sleep(1);
LOG("- reboot -\n");
-   reboot(reboot_event);
+
+   /* Allow time for last message to reach serial console, etc */
+   sleep(1);
+
+   /* We have to fork here, since the kernel calls 
do_exit(EXIT_SUCCESS)
+* in linux/kernel/sys.c, which can cause the machine to panic 
when
+* the init process exits... */
+   if (!vfork( )) { /* child */
+   reboot(reboot_event);
+   _exit(EXIT_SUCCESS);
+   }
+
+   while (1)
+   sleep(1);
break;
 
default:
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 2/8] Log startup/shutdown to console

2014-10-02 Thread Michel Stam
procd has the habit of logging startup/shutdown via
rcS to syslog, which is pointless in case of a
shutdown, and unlikely to be complete on a startup
(as syslog is not running). Write to /dev/console
instead.

Signed-off-by: Michel Stam 
---
 rcS.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/rcS.c b/rcS.c
index 4545621..e01fc49 100644
--- a/rcS.c
+++ b/rcS.c
@@ -18,10 +18,11 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-
+#include 
 #include 
 #include 
 #include 
@@ -43,8 +44,9 @@ struct initd {
 static void pipe_cb(struct ustream *s, int bytes)
 {
char *newline, *str;
-   int len;
+   int len, console_fd;
 
+   console_fd = open(_PATH_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK);
do {
str = ustream_get_read_buf(s, NULL);
if (!str)
@@ -52,11 +54,11 @@ static void pipe_cb(struct ustream *s, int bytes)
newline = strchr(str, '\n');
if (!newline)
break;
-   *newline = 0;
len = newline + 1 - str;
-   syslog(0, "%s", str);
+   write(console_fd, str, len);
ustream_consume(s, len);
} while (1);
+   close(console_fd);
 }
 
 static void q_initd_run(struct runqueue *q, struct runqueue_task *t)
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 3/8] Fix curses applications to work with procd

2014-10-02 Thread Michel Stam
The problem was caused by procd not opening /dev/tty* (which ever was specified 
in
/etc/inittab), causing /proc/PID/fd to point to /console instead. /dev/console 
is a
non-controlling tty (CTTY), and cannot be used as one, which is exactly what 
curses
applications want. Since this is very likely to cause problems with other 
programs,
procd now opens /dev/tty? when the ID field of the inittab assigns one, and 
forces
this to be a CTTY.

Signed-off-by: Michel Stam 
---
 inittab.c| 64 +---
 utils/askfirst.c | 28 ++---
 2 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/inittab.c b/inittab.c
index c8540b1..344c55d 100644
--- a/inittab.c
+++ b/inittab.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include "procd.h"
 #include "rcS.h"
 
@@ -63,10 +64,49 @@ static char *ask = "/sbin/askfirst";
 
 static LIST_HEAD(actions);
 
+static int dev_open(const char *dev)
+{
+   int fd = -1;
+
+   if (dev) {
+   chdir("/dev");
+   fd = open( dev, O_RDWR);
+   chdir("/");
+   }
+
+   return fd;
+}
+
+static int dev_exist(const char *dev)
+{
+   int res;
+
+   res = dev_open(dev);
+   if (res != -1) {
+   close(res);
+   }
+   
+   return (res != -1);
+}
+
 static void fork_worker(struct init_action *a)
 {
+   int fd;
+   pid_t p;
+
a->proc.pid = fork();
if (!a->proc.pid) {
+   p = setsid( );
+   fd = dev_open(a->id);
+   if (fd != -1)
+   {
+   dup2(fd, STDIN_FILENO);
+   dup2(fd, STDOUT_FILENO);
+   dup2(fd, STDERR_FILENO);
+   tcsetpgrp(fd, p);
+   close(fd);
+   ioctl(STDIN_FILENO, TIOCSCTTY, 1);
+   }
execvp(a->argv[0], a->argv);
ERROR("Failed to execute %s\n", a->argv[0]);
exit(-1);
@@ -110,22 +150,17 @@ static void runrc(struct init_action *a)
 
 static void askfirst(struct init_action *a)
 {
-   struct stat s;
int i;
 
-   chdir("/dev");
-   i = stat(a->id, &s);
-   chdir("/");
-   if (i || (console && !strcmp(console, a->id))) {
+   if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
DEBUG(4, "Skipping %s\n", a->id);
return;
}
 
a->tout.cb = respawn;
-   for (i = MAX_ARGS - 2; i >= 2; i--)
-   a->argv[i] = a->argv[i - 2];
+   for (i = MAX_ARGS - 1; i >= 1; i--)
+   a->argv[i] = a->argv[i - 1];
a->argv[0] = ask;
-   a->argv[1] = a->id;
a->respawn = 500;
 
a->proc.cb = child_exit;
@@ -134,7 +169,6 @@ static void askfirst(struct init_action *a)
 
 static void askconsole(struct init_action *a)
 {
-   struct stat s;
char line[256], *tty;
int i, r, fd = open("/proc/cmdline", O_RDONLY);
regex_t pat_cmdline;
@@ -153,20 +187,16 @@ static void askconsole(struct init_action *a)
line[matches[1].rm_eo] = '\0';
tty = &line[matches[1].rm_so];
 
-   chdir("/dev");
-   i = stat(tty, &s);
-   chdir("/");
-   if (i) {
+   if (!dev_exist(tty)) {
DEBUG(4, "skipping %s\n", tty);
goto err_out;
}
-   console = strdup(tty);
 
a->tout.cb = respawn;
-   for (i = MAX_ARGS - 2; i >= 2; i--)
-   a->argv[i] = a->argv[i - 2];
+   for (i = MAX_ARGS - 1; i >= 1; i--)
+   a->argv[i] = a->argv[i - 1];
+   a->id = strdup(tty);
a->argv[0] = ask;
-   a->argv[1] = strdup(tty);
a->respawn = 500;
 
a->proc.cb = child_exit;
diff --git a/utils/askfirst.c b/utils/askfirst.c
index 6ad77aa..e1f757a 100644
--- a/utils/askfirst.c
+++ b/utils/askfirst.c
@@ -19,34 +19,10 @@
 #include 
 #include 
 
-static int redirect_output(const char *dev)
-{
-   pid_t p = setsid();
-   int fd;
-
-   chdir("/dev");
-   fd = open(dev, O_RDWR);
-   chdir("/");
-
-   if (fd < 0)
-   return -1;
-
-   dup2(fd, STDIN_FILENO);
-   dup2(fd, STDOUT_FILENO);
-   dup2(fd, STDERR_FILENO);
-   tcsetpgrp(fd, p);
-   close(fd);
-
-   return 0;
-}
-
 int main(int argc, char **argv)
 {
int c;
 
-   if (redirect_output(argv[1]))
-   fprintf(stderr, "%s: Failed to open %s\n", argv[0], argv[1]);
-
printf("Please press Enter to activate this console.\n");
do {
c = getchar();
@@ -55,8 +31,8 @@ int main(int argc, char **argv)
}
while (c != 0xA);
 
-   execvp(argv[2], &argv[2]);
-   printf("%s: Failed to execute %s\n", argv[0], argv[2]);
+   execvp(argv[1], &argv[1]);
+   printf("%s: Failed to execute %s\n", argv[0], argv[1]);
 
return -1;
 }
-- 
1.7.12.1

[OpenWrt-Devel] [PATCH procd 4/8] Fix scroll lock blocking procd

2014-10-02 Thread Michel Stam
On x86, pressing the scrolllock button may effectively prevent procd from 
rebooting
the system. This happens because procd tries to write to /dev/console, which in 
that
situation is blocked, effectively blocking procd from rebooting the system.

This patch puts procd's stderr access into non-blocking, which will prevent the
boot from being stuck.

Signed-off-by: Michel Stam 
---
 procd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/procd.c b/procd.c
index 6ec7cd0..32febd6 100644
--- a/procd.c
+++ b/procd.c
@@ -16,6 +16,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -61,6 +62,7 @@ int main(int argc, char **argv)
return usage(argv[0]);
}
}
+   fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) | 
O_NONBLOCK);
uloop_init();
uloop_release_sigint();
procd_signal();
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 5/8] Kill processes on shutdown

2014-10-02 Thread Michel Stam
Procd as it currently is does not kill the running processes during shutdown.
As this might cause undesired behaviour, this should be implemented.
Implementation was taken from busybox 1.19.4

Signed-off-by: Michel Stam 
---
 state.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/state.c b/state.c
index 2de32e1..05f7dc5 100644
--- a/state.c
+++ b/state.c
@@ -15,6 +15,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include "procd.h"
 #include "syslog.h"
@@ -75,6 +77,14 @@ static void state_enter(void)
break;
 
case STATE_HALT:
+   LOG("- SIGTERM processes -\n");
+   kill(-1, SIGTERM);
+   sync();
+   sleep(1);
+   LOG("- SIGKILL processes -\n");
+   kill(-1, SIGKILL);
+   sync();
+   sleep(1);
LOG("- reboot -\n");
reboot(reboot_event);
break;
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 8/8] Fix 'reboot' message when the system is powering down

2014-10-02 Thread Michel Stam
While executing a system halt (via the powerbutton or otherwise),
the system displays rebooting, whereas it should display that
it is going to turn off.

Signed-off-by: Michel Stam 
---
 state.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/state.c b/state.c
index 2268de3..c31f6a8 100644
--- a/state.c
+++ b/state.c
@@ -98,7 +98,10 @@ static void state_enter(void)
kill(-1, SIGKILL);
sync();
sleep(1);
-   LOG("- reboot -\n");
+   if (reboot_event == RB_POWER_OFF)
+   LOG("- power down -\n");
+   else
+   LOG("- reboot -\n");
 
/* Allow time for last message to reach serial console, etc */
sleep(1);
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Barrier Breaker 14.07 Final

2014-10-02 Thread Steven Barth

The OpenWrt developers are proud to announce the final release
of OpenWrt Barrier Breaker.

  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 BARRIER BREAKER (14.07)
 -
  * 1/2 oz Galliano Pour all ingredients into
  * 4 oz cold Coffeean irish coffee mug filled
  * 1 1/2 oz Dark Rum   with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -

http://downloads.openwrt.org/barrier_breaker/14.07/

Important changes since RC3
* various ath9k related fixes
* a few board related fixes
* fixes for packages depdending on curl
* per feed download folders

Important changes since RC2
* NAT & firewall throughput improvements
* Security updates for OpenSSL & PolarSSL
* Minor fixes in DHCP & DHCPv6 handling
* Configuration support for GRE tunnels
* Various other fixes

Important changes since RC1
* fix a long standing ath9k deadlock bug
* all feeds are now built
* image builder now works and RC2 contains all board specific images
* various board/stability fixes

** Highlights since Attitude Adjustment **
Default configuration and images

* Linux kernel updated to version 3.10
* Procd: new preinit, init, hotplug and event system written in C
* Native IPv6-support
- RA & DHCPv6+PD client and server
- Local prefix allocation & source-restricted routes
  (multihoming)
* Filesystem improvements
- Added support for sysupgrade on NAND-flash
- Added support for filesystem snapshot and rollback
- Rewritten mounting system in C for rootfs and block devices
* UCI configuration improvements
- Support for testing configuration and rollback to working
  last working state
- Unified change trigger system to restart services on-demand
- Added a data validation layer
* Networking improvements
- Netifd now handles setup and configuration reload of
  wireless interfaces
- Added reworked event support to allow obsoleting network
  hotplug-scripts
- Added support for dynamic firewall rules and zones
- Added support for transparent multicast to unicast
  translation for bridges
- Various other fixes and improvements

Additional highlights selectable in the package feeds or SDK
* Extended IPv6-support
- Added DS-Lite support and improved 6to4, 6in4 and 6rd-support
- Experimental support for Lightweight 4over6, MAP-E and MAP-T
- Draft-support for self-managing home networks (HNCP)
* rpcd: new JSONRPC over HTTP-frontend for remote access to ubus
* mdns: new lightweight mdns daemon (work in progress)
* Initial support for the musl C standard library
* Support for QMI-based 3g/4g modems
* Support for DNSSEC validation
* Added architecture for package signing and SHA256 hashing
* ... and many more cool things

Package feed reorganization
For quite a while already we are not very satisfied with the quality
of the packages-feed. To address this, we decided to do a fresh start
on GitHub. The new feed https://github.com/openwrt/packages should be
used from now on and package maintainers are asked to move their
packages there. For the final release we will still build the old
packages feed but it will be necessary to enable it manually in the
opkg package list to be usable.
Additionally we would like to give a big thank you to all of our 
package

maintainers working on our various feeds.

New build servers
We would like to express our gratitude to Imagination Technology for
funding the 2 build servers that we used for the release.

Whats next ?
We aim at releasing Chaos Calmer (CC) before the end of the year. The
CC release will use 3.14 or a newer LTS kernel as baseline.


Have fun!
The OpenWrt developer team
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH procd 7/8] Show the shutdown sequence on the active virtual terminal

2014-10-02 Thread Michel Stam
procd by default writes to /dev/console. When rebooting, this means that the
terminal on which the reboot sequence was started will not see what is going
on. This patch fixes that by reopening stdin, stdout and stderr to /dev/tty0
upon reboot.

Also, due to (probably) pivot-root, /proc/1/fd shows 1-3 pointing to
/console. This patch also fixes that.

Signed-off-by: Michel Stam 
---
 state.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/state.c b/state.c
index e6c8712..2268de3 100644
--- a/state.c
+++ b/state.c
@@ -12,7 +12,9 @@
  * GNU General Public License for more details.
  */
 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,6 +39,14 @@ enum {
 static int state = STATE_NONE;
 static int reboot_event;
 
+static void set_stdio( const char* tty )
+{
+   freopen( tty, "r", stdin );
+   freopen( tty, "w", stdout );
+   freopen( tty, "w", stderr );
+   fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) | 
O_NONBLOCK);
+}
+
 static void state_enter(void)
 {
char ubus_cmd[] = "/sbin/ubusd";
@@ -55,6 +65,7 @@ static void state_enter(void)
LOG("- ubus -\n");
procd_connect_ubus();
 
+   set_stdio( "/dev/console" );
LOG("- init -\n");
service_init();
service_start_early("ubus", ubus_cmd);
@@ -71,6 +82,8 @@ static void state_enter(void)
break;
 
case STATE_SHUTDOWN:
+   /* Redirect output to the current virtual terminal for the 
users' benefit */
+   set_stdio( "/dev/tty0" );
LOG("- shutdown -\n");
procd_inittab_run("shutdown");
sync();
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] toolchain: Fix libthreaddb not being installed

2014-10-02 Thread Michel Stam
Signed-off-by: Michel Stam 
---
 package/libs/toolchain/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 36cf8c4..72ce6b9 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -508,7 +508,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(INSTALL_DIR) $(1)/lib
$(CP) \
$(TOOLCHAIN_DIR)/lib/libthread_db.so.* $(1)/lib
-  ifeq ($(USE_UCLIBC),y)
+  ifeq ($(CONFIG_USE_UCLIBC),y)
$(CP) \
$(TOOLCHAIN_DIR)/lib/libthread_db-$(LIBC_SO_VERSION).so \
$(1)/lib/
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] busybox: remove validation message from bootup

2014-10-02 Thread Michel Stam
A message:
uinteger - 9 = true
is displayed during boot. This is the result of the validate_data
command checking the cron log level. As the output is not
interesting, only the result, filter...

Signed-off-by: Michel Stam 
---
 package/utils/busybox/files/cron | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/utils/busybox/files/cron b/package/utils/busybox/files/cron
index 8f54527..19ecc43 100755
--- a/package/utils/busybox/files/cron
+++ b/package/utils/busybox/files/cron
@@ -17,7 +17,7 @@ start_service () {
loglevel=$(uci_get "system.@system[0].cronloglevel")
 
[ -z "${loglevel}" ] || {
-   /sbin/validate_data uinteger "${loglevel}"
+   /sbin/validate_data uinteger "${loglevel}" 2>/dev/null
[ "$?" -eq 0 ] || {
echo "validation failed"
return 1
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] tp-link mr12u !

2014-10-02 Thread Daniel Petre

Hello,
just got this mini router and it's so small and neat!
Unfortunately it seems i cannot generate images with it using BB but 
people on the forum say it's similar to the tp-link mr3040:

https://forum.openwrt.org/viewtopic.php?id=45167

I tried to patch my BB toolchain with the modifications of:
target/linux/ar71xx/generic/profiles/tp-link.mk
target/linux/ar71xx/image/Makefile
tools/firmware-utils/src/mktplinkfw.c

and make clean and i can see the mr12u profile but no image will be 
generated after make..


Anyone would like to help a little? I don't have warranty on this router 
bought from DX so i hope i don't break it with a bad image :)


Thanks!
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] base-files: remove the deluge of driver messages during bootup

2014-10-02 Thread Michel Stam
Early during bootup, kmodloader is started which loads the drivers
in /etc/modules.d. Unfortunately at this time the system script has
not run yet, which is supposed to set the console log level.
Having the S10system script moved to an earlier time is not an
option, as this in turn will not work because the system script
will try to register itself with ubusd, which is not running
either. This only happens after S12log is run.

As a quick fix, temporarily show only errors and more severe
messages. S10system will quickly fix that shortly after,
at least the bootup is more sane (and readable).

Signed-off-by: Michel Stam 
---
 package/base-files/files/etc/init.d/boot | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/base-files/files/etc/init.d/boot 
b/package/base-files/files/etc/init.d/boot
index f10db13..9223807 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -35,6 +35,9 @@ boot() {
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs 
debugfs /sys/kernel/debug
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
 
+   # Prevent module load messages from flooding the boot process; 'system' 
service will fix this
+   /bin/dmesg -n 3
+
/sbin/kmodloader
 
# allow wifi modules time to settle
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] base-files: remove a 'not found' error message during system boot

2014-10-02 Thread Michel Stam
During boot, a not found message is displayed for systems which do
not have uci 'network.globals.ula_prefix' defined in
/etc/config/network. The error message itself is not used and can
be ignored.

Signed-off-by: Michel Stam 
---
 package/base-files/files/etc/uci-defaults/12_network-generate-ula | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula 
b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
index 56b7eb3..fb4e3eb 100644
--- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula
+++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ "$(uci get network.globals.ula_prefix)" != "auto" ] && exit 0
+[ "$(uci get network.globals.ula_prefix 2>/dev/null)" != "auto" ] && exit 0
 
 r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
 r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] netifd: fix an error message during network shutdown

2014-10-02 Thread Michel Stam
When 'wifi down' is called by /etc/init.d/network, it is run from
stop_service( ). This function is in turn invoked from stop( ).
stop( ) messes up the order by first procd_kill-ing the network
settings, then calling wifi to down the wifi networking
interfaces. By redefining stop( ) instead, the proper order is
restored.

Signed-off-by: Michel Stam 
---
 package/network/config/netifd/files/etc/init.d/network | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/etc/init.d/network 
b/package/network/config/netifd/files/etc/init.d/network
index 1d8a5b3..fbba9ec 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -32,8 +32,9 @@ reload_service() {
/sbin/wifi reload_legacy
 }
 
-stop_service() {
+stop() {
/sbin/wifi down
+   procd_kill network ''
 }
 
 service_running() {
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Barrier Breaker 14.07 Final

2014-10-02 Thread Nishant Sharma


A big thank and many congratulations!

Cheers,
Nishant


On 2 October 2014 18:29:08 GMT+05:30, Steven Barth  wrote:
>The OpenWrt developers are proud to announce the final release
>of OpenWrt Barrier Breaker.
>
>   ___ __
>  |   |.-.-.-.|  |  |  |..|  |_
>  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
>  |___||   __|_|__|__||||__|  ||
>   |__| W I R E L E S S   F R E E D O M
>  -
>  BARRIER BREAKER (14.07)
>  -
>   * 1/2 oz Galliano Pour all ingredients into
>   * 4 oz cold Coffeean irish coffee mug filled
>   * 1 1/2 oz Dark Rum   with crushed ice. Stir.
>   * 2 tsp. Creme de Cacao
>  -
>
>http://downloads.openwrt.org/barrier_breaker/14.07/
>
>Important changes since RC3
>* various ath9k related fixes
>* a few board related fixes
>* fixes for packages depdending on curl
>* per feed download folders
>
>Important changes since RC2
>* NAT & firewall throughput improvements
>* Security updates for OpenSSL & PolarSSL
>* Minor fixes in DHCP & DHCPv6 handling
>* Configuration support for GRE tunnels
>* Various other fixes
>
>Important changes since RC1
>* fix a long standing ath9k deadlock bug
>* all feeds are now built
>* image builder now works and RC2 contains all board specific images
>* various board/stability fixes
>
>** Highlights since Attitude Adjustment **
>Default configuration and images
>
>* Linux kernel updated to version 3.10
>* Procd: new preinit, init, hotplug and event system written in C
>* Native IPv6-support
> - RA & DHCPv6+PD client and server
> - Local prefix allocation & source-restricted routes
>   (multihoming)
>* Filesystem improvements
> - Added support for sysupgrade on NAND-flash
> - Added support for filesystem snapshot and rollback
> - Rewritten mounting system in C for rootfs and block devices
>* UCI configuration improvements
> - Support for testing configuration and rollback to working
>   last working state
> - Unified change trigger system to restart services on-demand
> - Added a data validation layer
>* Networking improvements
> - Netifd now handles setup and configuration reload of
>   wireless interfaces
> - Added reworked event support to allow obsoleting network
>   hotplug-scripts
> - Added support for dynamic firewall rules and zones
> - Added support for transparent multicast to unicast
>   translation for bridges
> - Various other fixes and improvements
>
>Additional highlights selectable in the package feeds or SDK
>* Extended IPv6-support
> - Added DS-Lite support and improved 6to4, 6in4 and 6rd-support
> - Experimental support for Lightweight 4over6, MAP-E and MAP-T
> - Draft-support for self-managing home networks (HNCP)
>* rpcd: new JSONRPC over HTTP-frontend for remote access to ubus
>* mdns: new lightweight mdns daemon (work in progress)
>* Initial support for the musl C standard library
>* Support for QMI-based 3g/4g modems
>* Support for DNSSEC validation
>* Added architecture for package signing and SHA256 hashing
>* ... and many more cool things
>
>Package feed reorganization
>For quite a while already we are not very satisfied with the quality
>of the packages-feed. To address this, we decided to do a fresh start
>on GitHub. The new feed https://github.com/openwrt/packages should be
>used from now on and package maintainers are asked to move their
>packages there. For the final release we will still build the old
>packages feed but it will be necessary to enable it manually in the
>opkg package list to be usable.
>Additionally we would like to give a big thank you to all of our 
>package
>maintainers working on our various feeds.
>
>New build servers
>We would like to express our gratitude to Imagination Technology for
>funding the 2 build servers that we used for the release.
>
>Whats next ?
>We aim at releasing Chaos Calmer (CC) before the end of the year. The
>CC release will use 3.14 or a newer LTS kernel as baseline.
>
>
>Have fun!
> The OpenWrt developer team
>___
>openwrt-devel mailing list
>openwrt-devel@lists.openwrt.org
>https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mac80211: remove error from detect script

2014-10-02 Thread Michel Stam
Signed-off-by: Michel Stam 
---
 package/kernel/mac80211/files/lib/wifi/mac80211.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh 
b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index a3b2199..2af4dc5 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -65,7 +65,7 @@ detect_mac80211() {
[ -n "$type" ] || break
devidx=$(($devidx + 1))
done
-   for dev in $(ls /sys/class/ieee80211); do
+   for dev in $(ls /sys/class/ieee80211 2>/dev/null); do
found=0
config_foreach check_mac80211_device wifi-device
[ "$found" -gt 0 ] && continue
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] libiconv: do not replace untranslatable characters with * or ?

2014-10-02 Thread Michel Stam
From: Tjalling Hattink 

Instead throw an -EILSEQ error.

Signed-off-by: Tjalling Hattink 
---
 package/libs/libiconv/src/iconv.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/libs/libiconv/src/iconv.c 
b/package/libs/libiconv/src/iconv.c
index cb4e947..d2e19e3 100644
--- a/package/libs/libiconv/src/iconv.c
+++ b/package/libs/libiconv/src/iconv.c
@@ -244,7 +244,7 @@ static inline int utf8dec_wchar(wchar_t *c, unsigned char 
*in, size_t inb)
return -1;
 }
 
-static inline char latin9_translit(wchar_t c)
+static inline wchar_t latin9_translit(wchar_t c)
 {
/* a number of trivial iso-8859-15 <> utf-8 transliterations */
switch (c) {
@@ -256,7 +256,7 @@ static inline char latin9_translit(wchar_t c)
case 0x0152: return 0xBC; /* OE */
case 0x0153: return 0xBD; /* oe */
case 0x0178: return 0xBE; /* Y diaeresis */
-   default: return '?';
+   default: return 0xFFFD; /* cannot translate */
}
 }
 
@@ -394,9 +394,9 @@ charok:
c = latin9_translit(c);
/* fall through */
case LATIN_1:
+   if (c > 0xff) goto ilseq;
if (!*outb) goto toobig;
-   if (c < 0x100) **out = c;
-   else x++, **out = '*'; //FIXME: translit?
+   **out = c;
++*out;
--*outb;
break;
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] include: make sure modules are modposted after initramfs image is built

2014-10-02 Thread Michel Stam
From: Tjalling Hattink 

Otherwise the modpost steps for individual modules that are compiled manually
(using make package//install) will give warning of missing
symbols when that module depends other modules.

This is caused by the Module.symvers file not containing any symbols anymore
of external modules when the initramfs image is built without specifically
giving the modules target.

Signed-off-by: Tjalling Hattink 
---
 include/kernel-defaults.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index da06abd..2f2e564 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -151,6 +151,7 @@ endef
 define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
+$(MAKE) $(KERNEL_MAKEOPTS) $(subst ",,$(KERNELNAME))
+   +$(MAKE) $(KERNEL_MAKEOPTS) modules
#")
$(call Kernel/CopyImage)
 endef
@@ -161,6 +162,7 @@ define Kernel/CompileImage/Initramfs
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/init $(TARGET_DIR)/init
rm -rf 
$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
+$(MAKE) $(KERNEL_MAKEOPTS) $(subst ",,$(KERNELNAME))
+   +$(MAKE) $(KERNEL_MAKEOPTS) modules
#")
#")
$(call Kernel/CopyImage,-initramfs)
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] lldpd: update to version 0.7.10

2014-10-02 Thread Michel Stam
Allow discovery protocols to be disabled from menuconfig

Signed-off-by: Michel Stam 
---
 package/network/services/lldpd/Config.in   | 28 +
 package/network/services/lldpd/Makefile| 47 --
 .../lldpd/patches/002-no-stack-protector.patch |  5 ++-
 3 files changed, 74 insertions(+), 6 deletions(-)
 create mode 100644 package/network/services/lldpd/Config.in

diff --git a/package/network/services/lldpd/Config.in 
b/package/network/services/lldpd/Config.in
new file mode 100644
index 000..c7d4795
--- /dev/null
+++ b/package/network/services/lldpd/Config.in
@@ -0,0 +1,28 @@
+menu "Configuration"
+   depends on PACKAGE_lldpd
+
+config LLDPD_WITH_CDP
+   bool
+   default y
+   prompt "Enable support for the Cisco Discovery Protocol (CDP) version 1 
and 2"
+
+config LLDPD_WITH_FDP
+   bool
+   default y
+   prompt "Enable support for the Foundry Discovery Protocol (FDP)"
+
+config LLDPD_WITH_EDP
+   bool
+   default y
+   prompt "Enable support for the Extreme Discovery Protocol (EDP)"
+
+config LLDPD_WITH_SONMP
+   bool
+   default y
+   prompt "Enable support for the SynOptics Network Management Protocol"
+
+config LLDPD_WITH_JSON
+   bool
+   prompt "Enable JSON output for the LLDP Command-Line Interface"
+   default n
+endmenu
diff --git a/package/network/services/lldpd/Makefile 
b/package/network/services/lldpd/Makefile
index 0b85848..bd95d4e 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
-PKG_VERSION:=0.7.7
+PKG_VERSION:=0.7.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
-PKG_MD5SUM:=9031734c69940dd79a0a175123275f83
+PKG_MD5SUM:=508f2e76703abf8420d9223aae3db548
 
 PKG_MAINTAINER:=Jo-Philipp Wich 
 
@@ -30,8 +30,13 @@ define Package/lldpd
   SUBMENU:=Routing and Redirection
   TITLE:=Link Layer Discovery Protocol daemon
   URL:=https://github.com/vincentbernat/lldpd/wiki
-  DEPENDS:=+libevent2 +USE_EGLIBC:libbsd
+  DEPENDS:=+libevent2 +USE_EGLIBC:libbsd +LLDPD_WITH_JSON:libjson-c
   USERID:=lldp:lldp
+  MENU:=1
+endef
+
+define Package/lldpd/config
+source "$(SOURCE)/Config.in"
 endef
 
 define Package/lldpd/description
@@ -45,12 +50,25 @@ endef
 
 define Package/lldpd/install
$(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DIR) $(1)/etc/lldpd.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/lldp{cli,ctl,d} $(1)/usr/sbin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/
$(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
$(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd
+ifneq ($(CONFIG_LLDPD_WITH_CDP),y)
+   sed -i -e '/cdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
+endif
+ifneq ($(CONFIG_LLDPD_WITH_FDP),y)
+   sed -i -e '/fdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
+endif
+ifneq ($(CONFIG_LLDPD_WITH_EDP),y)
+   sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
+endif
+ifneq ($(CONFIG_LLDPD_WITH_SONMP),y)
+   sed -i -e '/sonmp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
+endif
 endef
 
 define Package/lldpd/conffiles
@@ -61,6 +79,27 @@ CONFIGURE_ARGS += \
--with-privsep-user=lldp \
--with-privsep-group=lldp \
--with-privsep-chroot=/var/run/lldp \
-   --with-readline=no
+   --with-readline=no \
+   --with-embedded-libevent=no
+
+ifneq ($(CONFIG_LLDPD_WITH_CDP),y)
+CONFIGURE_ARGS += --disable-cdp
+endif
+
+ifneq ($(CONFIG_LLDPD_WITH_FDP),y)
+CONFIGURE_ARGS += --disable-fdp
+endif
+
+ifneq ($(CONFIG_LLDPD_WITH_EDP),y)
+CONFIGURE_ARGS += --disable-edp
+endif
+
+ifneq ($(CONFIG_LLDPD_WITH_SONMP),y)
+CONFIGURE_ARGS += --disable-sonmp
+endif
+
+ifeq ($(CONFIG_LLDPD_WITH_JSON),y)
+CONFIGURE_ARGS += --with-json=json-c
+endif
 
 $(eval $(call BuildPackage,lldpd))
diff --git 
a/package/network/services/lldpd/patches/002-no-stack-protector.patch 
b/package/network/services/lldpd/patches/002-no-stack-protector.patch
index dc861ba..8a49d2d 100644
--- a/package/network/services/lldpd/patches/002-no-stack-protector.patch
+++ b/package/network/services/lldpd/patches/002-no-stack-protector.patch
@@ -1,10 +1,11 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -62,7 +62,6 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
+@@ -62,7 +62,5 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
  AX_CFLAGS_GCC_OPTION([-Wformat-security])
  AX_CFLAGS_GCC_OPTION([-Wcast-align])
  AX_CFLAGS_GCC_OPTION([-Winline])
 -AX_CFLAGS_GCC_OPTION([-fstack-protector])
+-AX_CFLAGS_GCC_OPTION([-fstack-protector-strong])
+ AX_CFLAGS_GCC_OPTION([-fno-omit-frame-pointer])
  AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2])
- AX_CFLAGS_GCC_OPTION([-Wdeclaration-after-statement])
  AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter])
-- 
1.7.12.1
_

[OpenWrt-Devel] [PATCH] authsae: update to latest version

2014-10-02 Thread Michel Stam
Send a netlink call to leave the mesh when meshd exits
Make hunting-and-pecking loop (more) resistant to side channel attack

Signed-off-by: Michel Stam 
---
 package/network/services/authsae/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/authsae/Makefile 
b/package/network/services/authsae/Makefile
index 2d3ff1d..e7f786f 100644
--- a/package/network/services/authsae/Makefile
+++ b/package/network/services/authsae/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=authsae
-PKG_VERSION:=2014-04-19
+PKG_VERSION:=2014-06-09
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/cozybit/authsae.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=295164a83717ce59ca280468fc2f7edcea6b3cbf
+PKG_SOURCE_VERSION:=8531ab158910a525d4bcbb3ad02c08342f6987f2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_BUILD_PARALLEL:=1
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] busybox: add option for tweaking arpping to udhcpd

2014-10-02 Thread Michel Stam
Some clients have a very short timeout for sending the DHCP
DISCOVER, shorter than the arpping timeout of 2000 milliseconds
that udhcpd uses by default.

This patch allows tweaking the timeout, or disabling of arpping
altogether, at the risk of handing out addresses which are
already in use.

Signed-off-by: Michel Stam 
---
 package/utils/busybox/Config-defaults.in   |  6 ++
 .../busybox/config/networking/udhcp/Config.in  | 20 ++
 .../utils/busybox/patches/245-udhcp_arpping.patch  | 73 ++
 3 files changed, 99 insertions(+)
 create mode 100644 package/utils/busybox/patches/245-udhcp_arpping.patch

diff --git a/package/utils/busybox/Config-defaults.in 
b/package/utils/busybox/Config-defaults.in
index 5f5bdd0..dfed895 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -2221,6 +2221,9 @@ config BUSYBOX_DEFAULT_FEATURE_UDHCPD_WRITE_LEASES_EARLY
 config BUSYBOX_DEFAULT_FEATURE_UDHCPD_BASE_IP_ON_MAC
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_UDHCPD_ARPPING
+   bool
+   default y
 config BUSYBOX_DEFAULT_DHCPD_LEASES_FILE
string
default ""
@@ -2236,6 +2239,9 @@ config BUSYBOX_DEFAULT_FEATURE_UDHCP_PORT
 config BUSYBOX_DEFAULT_UDHCP_DEBUG
int
default 0
+config BUSYBOX_DEFAULT_UDHCP_ARPPING_TIMEOUT
+   int
+   default 2000
 config BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397
bool
default y
diff --git a/package/utils/busybox/config/networking/udhcp/Config.in 
b/package/utils/busybox/config/networking/udhcp/Config.in
index 576a01a..b6f84d1 100644
--- a/package/utils/busybox/config/networking/udhcp/Config.in
+++ b/package/utils/busybox/config/networking/udhcp/Config.in
@@ -61,6 +61,16 @@ config BUSYBOX_CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC
  for the same client to (almost always) contain the same
  IP address.
 
+config BUSYBOX_CONFIG_FEATURE_UDHCPD_ARPPING
+   bool "arpping addresses before offering"
+   default BUSYBOX_DEFAULT_FEATURE_UDHCPD_ARPPING
+   depends on BUSYBOX_CONFIG_UDHCPD
+   help
+ If selected, udhcpd will perform an arpping before offering an
+ address for a lease.
+
+ This increases server response time.
+
 config BUSYBOX_CONFIG_DHCPD_LEASES_FILE
string "Absolute path to lease file"
default BUSYBOX_DEFAULT_DHCPD_LEASES_FILE
@@ -110,6 +120,16 @@ config BUSYBOX_CONFIG_UDHCP_DEBUG
  Bigger values result in bigger code. Levels above 1
  are very verbose and useful for debugging only.
 
+config BUSYBOX_CONFIG_UDHCP_ARPPING_TIMEOUT
+   int "Timeout in msec for arppings sent"
+   default BUSYBOX_DEFAULT_UDHCP_ARPPING_TIMEOUT
+   depends on BUSYBOX_CONFIG_FEATURE_UDHCPC_ARPING || 
BUSYBOX_CONFIG_FEATURE_UDHCPD_ARPPING
+   help
+ Set the number of milliseconds to wait for arppings
+ to timeout.
+
+ Bigger values result in an increase in response time.
+
 config BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397
bool "Support for RFC3397 domain search (experimental)"
default BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397
diff --git a/package/utils/busybox/patches/245-udhcp_arpping.patch 
b/package/utils/busybox/patches/245-udhcp_arpping.patch
new file mode 100644
index 000..91f86ee
--- /dev/null
+++ b/package/utils/busybox/patches/245-udhcp_arpping.patch
@@ -0,0 +1,73 @@
+diff -r -U 3 -p busybox-1.19.4/networking/udhcp/Config.src 
busybox-1.19.4/networking/udhcp/Config.src
+--- busybox-1.19.4/networking/udhcp/Config.src 2012-02-04 20:24:55.0 
+0100
 busybox-1.19.4/networking/udhcp/Config.src 2014-05-02 14:22:49.389127249 
+0200
+@@ -55,6 +55,16 @@ config FEATURE_UDHCPD_BASE_IP_ON_MAC
+ for the same client to (almost always) contain the same
+ IP address.
+ 
++config FEATURE_UDHCPD_ARPPING
++  bool "arpping addresses before offering"
++  default y
++  depends on UDHCPD
++  help
++If selected, udhcpd will perform an arpping before offering an
++address for a lease.
++
++This increases server response time.
++
+ config DHCPD_LEASES_FILE
+   string "Absolute path to lease file"
+   default "/var/lib/misc/udhcpd.leases"
+@@ -104,6 +114,16 @@ config UDHCP_DEBUG
+ Bigger values result in bigger code. Levels above 1
+ are very verbose and useful for debugging only.
+ 
++config UDHCP_ARPPING_TIMEOUT
++  int "Timeout in msec for arppings sent"
++  default 2000
++  depends on FEATURE_UDHCPC_ARPPING || FEATURE_UDHCPD_ARPPING
++  help
++Set the number of milliseconds to wait for arppings
++to timeout.
++
++Bigger values result in an increase in response time.
++
+ config FEATURE_UDHCP_RFC3397
+   bool "Support for RFC3397 domain search (experimental)"
+   default y
+diff -r -U 3 -p busybox-1.19.4/networking/udhcp/arpping.c 
busybox-1.19.4/networking/udhcp/arpping.c
+--- busybox-1.19.4/networking/udhcp/

[OpenWrt-Devel] [PATCH 1/3] netifd: implement zeroconf

2014-10-02 Thread Michel Stam
The scripts were based on the netifd dhcp scripts,
and should add zeroconf support to /etc/config/network
Example:
config interface 'lan'
option ifname 'eth0'
option auto '0'
option proto 'zeroconf'

Optionally, the desired IP address can be added by:
option ipaddr '169.254.200.100'

any extra commandline arguments can be added by:
option cmdline '-v'

Note that zcip in Busybox must be enabled for this to
work.

Signed-off-by: Michel Stam 
---
 .../netifd/files/lib/netifd/proto/zeroconf.sh  | 33 ++
 .../config/netifd/files/lib/netifd/zeroconf.script | 29 +++
 2 files changed, 62 insertions(+)
 create mode 100755 
package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
 create mode 100755 
package/network/config/netifd/files/lib/netifd/zeroconf.script

diff --git a/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh 
b/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
new file mode 100755
index 000..cec7605
--- /dev/null
+++ b/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. ../netifd-proto.sh
+init_proto "$@"
+
+proto_zeroconf_init_config() {
+   proto_config_add_string 'ipaddr:ipaddr'
+   proto_config_add_string cmdline
+}
+
+proto_zeroconf_setup() {
+   local config="$1"
+   local iface="$2"
+
+   local ipaddr
+   json_get_vars ipaddr cmdline
+
+   proto_export "INTERFACE=$config"
+   proto_run_command "$config" zcip \
+   ${ipaddr:+-r $ipaddr} \
+   ${cmdline} \
+   -f "$iface" \
+   /lib/netifd/zeroconf.script
+}
+
+proto_zeroconf_teardown() {
+   local interface="$1"
+   proto_kill_command "$INTERFACE"
+}
+
+add_protocol zeroconf
+
diff --git a/package/network/config/netifd/files/lib/netifd/zeroconf.script 
b/package/network/config/netifd/files/lib/netifd/zeroconf.script
new file mode 100755
index 000..8d34a67
--- /dev/null
+++ b/package/network/config/netifd/files/lib/netifd/zeroconf.script
@@ -0,0 +1,29 @@
+#!/bin/sh
+[ -z "$1" ] && echo "Error: should be run by zcip" && exit 1
+
+. /lib/functions.sh
+. /lib/netifd/netifd-proto.sh
+
+setup_interface () {
+   proto_init_update "*" 1
+   proto_add_ipv4_address "$ip" '255.255.0.0'
+   proto_send_update "$INTERFACE"
+}
+
+deconfig_interface() {
+   proto_init_update "*" 0
+   proto_send_update "$INTERFACE"
+}
+
+case "$1" in
+   deconfig)
+   deconfig_interface
+   ;;
+   config)
+   setup_interface
+   ;;
+   *|init)
+   ;;
+esac
+
+exit 0
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] busybox/netifd: make zcip log to syslog (always)

2014-10-02 Thread Michel Stam
zcip is not the most talkative beast at the best of times. It
would be nice to see -something- in syslog when an IP address
is acquired.

Signed-off-by: Michel Stam 
---
 .../netifd/files/lib/netifd/proto/zeroconf.sh  |  2 +-
 .../busybox/patches/460-zcip-always-syslog.patch   | 44 ++
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 package/utils/busybox/patches/460-zcip-always-syslog.patch

diff --git a/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh 
b/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
index cec7605..a1214e3 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/zeroconf.sh
@@ -20,7 +20,7 @@ proto_zeroconf_setup() {
proto_run_command "$config" zcip \
${ipaddr:+-r $ipaddr} \
${cmdline} \
-   -f "$iface" \
+   -f -s -v "$iface" \
/lib/netifd/zeroconf.script
 }
 
diff --git a/package/utils/busybox/patches/460-zcip-always-syslog.patch 
b/package/utils/busybox/patches/460-zcip-always-syslog.patch
new file mode 100644
index 000..7519aa0
--- /dev/null
+++ b/package/utils/busybox/patches/460-zcip-always-syslog.patch
@@ -0,0 +1,44 @@
+From 297563d4d859643de249d180f3bf308f9536de18 Mon Sep 17 00:00:00 2001
+From: Michel Stam 
+Date: Thu, 25 Sep 2014 14:06:39 +0200
+Subject: [PATCH] zcip: add an option to force logging to syslog even if
+ running -f
+
+Signed-off-by: Michel Stam 
+---
+ networking/zcip.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/networking/zcip.c b/networking/zcip.c
+index 2a57543..2997503 100644
+--- a/networking/zcip.c
 b/networking/zcip.c
+@@ -32,6 +32,7 @@
+ //usage: "\n  -r 169.254.x.x  Request this address first"
+ //usage: "\n  -l w.x.0.0  Use this class B range instead of 
169.254"
+ //usage: "\n  -v  Verbose"
++//usage: "\n  -s  Log to syslog (even in foreground)"
+ //usage: "\n"
+ //usage: "\nWith no -q, runs continuously monitoring for ARP conflicts,"
+ //usage: "\nexits only on I/O errors (link down etc)"
+@@ -238,7 +239,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+   // parse commandline: prog [options] ifname script
+   // exactly 2 args; -v accumulates and implies -f
+   opt_complementary = "=2:vv:vf";
+-  opts = getopt32(argv, "fqr:l:v", &r_opt, &l_opt, &verbose);
++  opts = getopt32(argv, "fqr:l:vs", &r_opt, &l_opt, &verbose);
+ #if !BB_MMU
+   // on NOMMU reexec early (or else we will rerun things twice)
+   if (!FOREGROUND)
+@@ -248,7 +249,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+   // (need to do it before openlog to prevent openlog from taking
+   // fd 3 (sock_fd==3))
+   xmove_fd(xsocket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)), sock_fd);
+-  if (!FOREGROUND) {
++  if (!FOREGROUND || (opts & 16)) {
+   // do it before all bb_xx_msg calls
+   openlog(applet_name, 0, LOG_DAEMON);
+   logmode |= LOGMODE_SYSLOG;
+-- 
+1.7.12.1
+
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] busybox: allow own class B range to be used for zeroconf

2014-10-02 Thread Michel Stam
169.254 may be used by local networks. This patch allows specifying
your own IP range.

Signed-off-by: Michel Stam 
---
 .../busybox/patches/450-zcip-own-ip-range.patch| 110 +
 1 file changed, 110 insertions(+)
 create mode 100644 package/utils/busybox/patches/450-zcip-own-ip-range.patch

diff --git a/package/utils/busybox/patches/450-zcip-own-ip-range.patch 
b/package/utils/busybox/patches/450-zcip-own-ip-range.patch
new file mode 100644
index 000..7193402
--- /dev/null
+++ b/package/utils/busybox/patches/450-zcip-own-ip-range.patch
@@ -0,0 +1,110 @@
+From bddeb00a36df927c8372fc40b96e6e8dd13e6609 Mon Sep 17 00:00:00 2001
+From: Michel Stam 
+Date: Thu, 25 Sep 2014 13:43:33 +0200
+Subject: [PATCH] zcip: allow our own class B range to be used for ZeroConf
+
+169.254 may already be used by a local network. This patch allows
+specifying your own IP range.
+
+Signed-off-by: Michel Stam 
+---
+ networking/zcip.c | 21 ++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/networking/zcip.c b/networking/zcip.c
+index 45d1f7c..2a57543 100644
+--- a/networking/zcip.c
 b/networking/zcip.c
+@@ -30,6 +30,7 @@
+ //usage: "\n  -f  Run in foreground"
+ //usage: "\n  -q  Quit after obtaining address"
+ //usage: "\n  -r 169.254.x.x  Request this address first"
++//usage: "\n  -l w.x.0.0  Use this class B range instead of 
169.254"
+ //usage: "\n  -v  Verbose"
+ //usage: "\n"
+ //usage: "\nWith no -q, runs continuously monitoring for ARP conflicts,"
+@@ -87,10 +88,12 @@ enum {
+ struct globals {
+   struct sockaddr saddr;
+   struct ether_addr eth_addr;
++  uint32_t localnet_addr;
+ } FIX_ALIASING;
+ #define G (*(struct globals*)&bb_common_bufsiz1)
+ #define saddr(G.saddr   )
+ #define eth_addr (G.eth_addr)
++#define localnet_addr (G.localnet_addr)
+ #define INIT_G() do { } while (0)
+ 
+ 
+@@ -105,7 +108,7 @@ static uint32_t pick(void)
+   do {
+   tmp = rand() & IN_CLASSB_HOST;
+   } while (tmp > (IN_CLASSB_HOST - 0x0200));
+-  return htonl((LINKLOCAL_ADDR + 0x0100) + tmp);
++  return htonl((localnet_addr + 0x0100) + tmp);
+ }
+ 
+ /**
+@@ -197,6 +200,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+ {
+   int state;
+   char *r_opt;
++  char *l_opt;
+   unsigned opts;
+ 
+   // ugly trick, but I want these zeroed in one go
+@@ -204,6 +208,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+   const struct in_addr null_ip;
+   const struct ether_addr null_addr;
+   struct in_addr ip;
++  struct in_addr net;
+   struct ifreq ifr;
+   int timeout_ms; /* must be signed */
+   unsigned conflicts;
+@@ -215,6 +220,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+ #define null_ip(L.null_ip   )
+ #define null_addr  (L.null_addr )
+ #define ip (L.ip)
++#define net(L.net   )
+ #define ifr(L.ifr   )
+ #define timeout_ms (L.timeout_ms)
+ #define conflicts  (L.conflicts )
+@@ -224,6 +230,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+ #define verbose(L.verbose   )
+ 
+   memset(&L, 0, sizeof(L));
++  localnet_addr = LINKLOCAL_ADDR; // Assume default 169.254.x.x
+   INIT_G();
+ 
+ #define FOREGROUND (opts & 1)
+@@ -231,7 +238,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+   // parse commandline: prog [options] ifname script
+   // exactly 2 args; -v accumulates and implies -f
+   opt_complementary = "=2:vv:vf";
+-  opts = getopt32(argv, "fqr:v", &r_opt, &verbose);
++  opts = getopt32(argv, "fqr:l:v", &r_opt, &l_opt, &verbose);
+ #if !BB_MMU
+   // on NOMMU reexec early (or else we will rerun things twice)
+   if (!FOREGROUND)
+@@ -246,9 +253,17 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
+   openlog(applet_name, 0, LOG_DAEMON);
+   logmode |= LOGMODE_SYSLOG;
+   }
++  if (opts & 8) { // -l n.n.n.n
++  if (inet_aton(l_opt, &net) == 0
++   || (net.s_addr & htonl(IN_CLASSB_NET)) != net.s_addr
++  ) {
++  bb_error_msg_and_die("invalid network address");
++  }
++  localnet_addr = ntohl(net.s_addr);
++  }
+   if (opts & 4) { // -r n.n.n.n
+   if (inet_aton(r_opt, &ip) == 0
+-   || (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR
++   || (ntohl(ip.s_addr) & IN_CLASSB_NET) != localnet_addr
+   ) {
+   bb_error_msg_and_die("invalid link address");
+   }
+-- 
+1.7.12.1
+
-- 
1.7.12.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Set which antenna to be used

2014-10-02 Thread Fernando Frediani

Hi all,

I have just tested BB Final on a 1043ND-v1 to observe a possible issue 
I've seen a while ago.
This device has 3 antennae but I want to use only one port (a Sector 
antenna) so I set the following on my /etc/config/wireless which means 
only the first antenna port (4 = 100 in binary).


option rxantenna '0x4'
option txantenna '0x4'

However when doing a: iw phy phy0 info | grep -i ant
I get the following output:
Available Antennas: TX 0x7 RX 0x7
Configured Antennas: TX 0x7 RX 0x7

Would it be something to do with ath9k or anywhere else to look at?
Thanks
Regards,

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


Re: [OpenWrt-Devel] [PATCH ubox] Use different loglevels

2014-10-02 Thread Karl P

Just one minor inline,

Cheers,
Karl P


On 10/02/2014 12:42 PM, Michel Stam wrote:

Ubox logs various messages during OpenWRT boot which are not
very interesting, such as the number of iterations made. This
fix implements several loglevels for debug/info/error so that
more useful messages are shown.

Signed-off-by: Michel Stam 
---
  kmodloader.c | 75 +---
  1 file changed, 41 insertions(+), 34 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 633570f..04d7c1d 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -38,10 +38,17 @@

  #define DEF_MOD_PATH "/lib/modules/%s/"

-#define LOG(fmt, ...) do { \
+#define INFO(fmt, ...) do { \
syslog(LOG_INFO, fmt, ## __VA_ARGS__); \
printf("kmod: "fmt, ## __VA_ARGS__); \
} while (0)
+#define ERROR(fmt, ...) do { \
+   syslog(LOG_ERR, fmt, ## __VA_ARGS__); \
+   fprintf(stderr,"kmod: "fmt, ## __VA_ARGS__); \
+   } while (0)
+#define DEBUG(fmt, ...) do { \
+   syslog(LOG_DEBUG, fmt, ## __VA_ARGS__); \
+   } while (0)


  enum {
@@ -165,7 +172,7 @@ static int elf_find_section(char *map, const char *section, 
unsigned int *offset
else if (clazz == ELFCLASS64)
return elf64_find_section(map, section, offset, size);

-   LOG("unknown elf format %d\n", clazz);
+   ERROR("unknown elf format %d\n", clazz);

return -1;
  }
@@ -208,7 +215,7 @@ static int scan_loaded_modules(void)

fp = fopen("/proc/modules", "r");
if (!fp) {
-   LOG("failed to open /proc/modules\n");
+   ERROR("failed to open /proc/modules\n");
return -1;
}

@@ -243,23 +250,23 @@ static struct module* get_module_info(const char *module, 
const char *name)
struct stat s;

if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return NULL;
}

if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return NULL;
}

map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return NULL;
}

if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n", module);
+   ERROR("failed to load the .modinfo section from %s\n", module);
return NULL;
}

@@ -329,23 +336,23 @@ static int print_modinfo(char *module)
char *map, *strings;

if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return -1;
}

if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return -1;
}

map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return -1;
}

if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n", module);
+   ERROR("failed to load the .modinfo section from %s\n", module);
return -1;
}

@@ -390,9 +397,9 @@ static int deps_available(struct module *m, int verbose)
m = find_module(dep);

if (verbose && !m)
-   LOG("missing dependency %s\n", dep);
+   ERROR("missing dependency %s\n", dep);
if (verbose && m && (m->state != LOADED))
-   LOG("dependency not loaded %s\n", dep);
+   ERROR("dependency not loaded %s\n", dep);
if (!m || (m->state != LOADED))
err++;


Would it make sense to maybe move the verbose checks into the log levels 
themselves?



dep += strlen(dep) + 1;
@@ -408,13 +415,13 @@ static int insert_module(char *path, const char *options)
int fd, ret = -1;

if (stat(path, &s)) {
-   LOG("missing module %s\n", path);
+   ERROR("missing module %s\n", path);
return ret;
}

fd = open(path, O_RDONLY);
if (!fd) {
-   LOG("cannot open %s\n", path);
+   ERROR("cannot open %s\n", path);
return ret;
}

@@ -422,7 +429,7 @@ static int insert_module(char *path, const char *options)
if (read(fd, data, s.st_size) == s.st_size)
ret = syscall(__NR_init_module, data, (unsigned long) 
s.st_size, options);
else
-   L

Re: [OpenWrt-Devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt

2014-10-02 Thread Sebastian Moeller
Hi Weedy,

On Oct 2, 2014, at 05:46 , Alpha Sparc  wrote:

> How good is the throughput on CeroWrt compared to OpenWrt ?

I assume you are talking about the pure routing performance with no 
firewall/NAT and traffic-shaping involved? I think they pretty much are equal 
(pretty much the same kernel and most of the cerowrt guts are from openwrt bb 
trunk). But I have not tested that (I have only one cerowrt/openwrt capable 
router and that pretty much is my main router).
If you are talking about comparing QOS-scripts with SQM-scripts, they 
also seem to top out at roughly 50-60 Mbps (down- and uplink combined), it 
seems hfsc (qos-scripts) and HTB (sam-scripts) are equally expensive on MIPS.
Now if you are setup to do tests yourself I would love to hear the 
results. I would be happy to help you getting SQM-scripts to work (so far all 
people interested disappeared before or just after sharing initial test 
results).

Best Regards
Sebastian


> 
> On Oct 2, 2014 9:55 AM, "Dave Taht"  wrote:
> On Wed, Oct 01, 2014 at 12:10:46PM -0400, Weedy wrote:
> > On 30/03/14 06:29 PM, Dave Taht wrote:
> > > On Sun, Mar 30, 2014 at 02:24:44PM -0400, Weedy wrote:
> > >> On Sat, Mar 29, 2014 at 2:56 PM, Dave Täht 
> > >> wrote:
> > >>
> > >>> From: Dave Taht 
> > >>>
> > >>> This adds support for the bufferbloat project's "Smart Queue Management"
> > >>> (SQM) system, which improves over openwrt's qos-scripts in the following
> > >>> ways
> > >>>
> > >>> + Uses HTB with two models for managing traffic
> > >>>   a simplest one that merely uses fq_codel, and a three tier one that 
> > >>> does
> > >>>   some basic and tunable packet prioritization.
> > >>>
> > >>> + Works with ipv6 and ipv4 correctly (unlike qos-scripts)
> > >>> + extensive support for fixing ADSL and PPOe framing problems
> > >>> + Partial support for key diffserv markings
> > >>> + highly tuned fq_codel implementation especially for low bandwidths
> > >>> + Tested heavily on cable modems and on dsl devices
> > >>>
> > >>> It is a disimprovement in that:
> > >>>
> > >>> - There are no built-in tricks for doing l7 classification,
> > >>> or other forms of packet inspection.
> > >>>
> > >>> - We haven't explored hfsc all that much, prefering to rely
> > >>> on the predictable behavior of htb + fq_codel for everything
> > >>>
> > >>> - And there is support for a few qdiscs that are not in the linux
> > >>> kernel mainline that remain experimental.
> > >>> ---
> > >>>  net/sqm-scripts/Makefile   |   48 +++
> > >>>  net/sqm-scripts/files/etc/config/sqm   |   11 +
> > >>>  net/sqm-scripts/files/etc/init.d/sqm   |   23 ++
> > >>>  net/sqm-scripts/files/usr/lib/sqm/functions.sh |  335
> > >>> 
> > >>>  net/sqm-scripts/files/usr/lib/sqm/run.sh   |   67 
> > >>>  net/sqm-scripts/files/usr/lib/sqm/simple.qos   |  187 +++
> > >>>  net/sqm-scripts/files/usr/lib/sqm/simple.qos.help  |1 +
> > >>>  net/sqm-scripts/files/usr/lib/sqm/simplest.qos |   84 +
> > >>>  .../files/usr/lib/sqm/simplest.qos.help|1 +
> > >>>  net/sqm-scripts/files/usr/lib/sqm/stop.sh  |   22 ++
> > >>>  10 files changed, 779 insertions(+)
> > >>>  create mode 100644 net/sqm-scripts/Makefile
> > >>>  create mode 100644 net/sqm-scripts/files/etc/config/sqm
> > >>>  create mode 100755 net/sqm-scripts/files/etc/init.d/sqm
> > >>>  create mode 100644 net/sqm-scripts/files/usr/lib/sqm/functions.sh
> > >>>  create mode 100755 net/sqm-scripts/files/usr/lib/sqm/run.sh
> > >>>  create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simple.qos
> > >>>  create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help
> > >>>  create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simplest.qos
> > >>>  create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simplest.qos.help
> > >>>  create mode 100755 net/sqm-scripts/files/usr/lib/sqm/stop.sh
> > >>>
> > >>> diff --git a/net/sqm-scripts/files/etc/config/sqm
> > >>> b/net/sqm-scripts/files/etc/config/sqm
> > >>> new file mode 100644
> > >>> index 000..547d321
> > >>> --- /dev/null
> > >>> +++ b/net/sqm-scripts/files/etc/config/sqm
> > >>> @@ -0,0 +1,11 @@
> > >>> +
> > >>> +config queue 'ge00'
> > >>> +option enabled '0'
> > >>> +option interface 'ge00'
> > >>> +option download '2'
> > >>> +option upload '4000'
> > >>> +option qdisc 'fq_codel'
> > >>> +option script 'simple.qos'
> > >>> +option qdisc_advanced '0'
> > >>> +option linklayer 'none'
> > >>> +
> > >>>
> > >>
> > >> How hard is this to config from the command line/vim?
> > >
> > > There are a few more options than this (for DSL compensation, ecn
> > > and advanced configuration), the above would work if you changed
> > > enabled to '1' and the device from ge00 to your wan device. (not
> > > the "wan" firewall rule, presently. )
> > >
> > > It does help to have a sane long ter

Re: [OpenWrt-Devel] [PATCH ubox] Use different loglevels

2014-10-02 Thread Stam, Michel [FINT]
Hey Karl,

I agree that verbose in the macro would be an option, although by then
you're re-implementing the syslog priorities in macros.

Also, currently the verbose argument is only used in deps_available( ),
which would mean implementing the verbose parameter throughout the
kmodloader.c source. As said, not the most difficult to do, but what
would it gain?

Let me know.

Regards,

Michel Stam

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Karl P
Sent: Thursday, October 02, 2014 16:03 PM
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH ubox] Use different loglevels

Just one minor inline,

Cheers,
Karl P


On 10/02/2014 12:42 PM, Michel Stam wrote:
> Ubox logs various messages during OpenWRT boot which are not very 
> interesting, such as the number of iterations made. This fix 
> implements several loglevels for debug/info/error so that more useful 
> messages are shown.
>
> Signed-off-by: Michel Stam 
> ---
>   kmodloader.c | 75
+---
>   1 file changed, 41 insertions(+), 34 deletions(-)
>
> diff --git a/kmodloader.c b/kmodloader.c index 633570f..04d7c1d 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -38,10 +38,17 @@
>
>   #define DEF_MOD_PATH "/lib/modules/%s/"
>
> -#define LOG(fmt, ...) do { \
> +#define INFO(fmt, ...) do { \
>   syslog(LOG_INFO, fmt, ## __VA_ARGS__); \
>   printf("kmod: "fmt, ## __VA_ARGS__); \
>   } while (0)
> +#define ERROR(fmt, ...) do { \
> + syslog(LOG_ERR, fmt, ## __VA_ARGS__); \
> + fprintf(stderr,"kmod: "fmt, ## __VA_ARGS__); \
> + } while (0)
> +#define DEBUG(fmt, ...) do { \
> + syslog(LOG_DEBUG, fmt, ## __VA_ARGS__); \
> + } while (0)
>
>
>   enum {
> @@ -165,7 +172,7 @@ static int elf_find_section(char *map, const char
*section, unsigned int *offset
>   else if (clazz == ELFCLASS64)
>   return elf64_find_section(map, section, offset, size);
>
> - LOG("unknown elf format %d\n", clazz);
> + ERROR("unknown elf format %d\n", clazz);
>
>   return -1;
>   }
> @@ -208,7 +215,7 @@ static int scan_loaded_modules(void)
>
>   fp = fopen("/proc/modules", "r");
>   if (!fp) {
> - LOG("failed to open /proc/modules\n");
> + ERROR("failed to open /proc/modules\n");
>   return -1;
>   }
>
> @@ -243,23 +250,23 @@ static struct module* get_module_info(const char
*module, const char *name)
>   struct stat s;
>
>   if (!fd) {
> - LOG("failed to open %s\n", module);
> + ERROR("failed to open %s\n", module);
>   return NULL;
>   }
>
>   if (fstat(fd, &s) == -1) {
> - LOG("failed to stat %s\n", module);
> + ERROR("failed to stat %s\n", module);
>   return NULL;
>   }
>
>   map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
>   if (map == MAP_FAILED) {
> - LOG("failed to mmap %s\n", module);
> + ERROR("failed to mmap %s\n", module);
>   return NULL;
>   }
>
>   if (elf_find_section(map, ".modinfo", &offset, &size)) {
> - LOG("failed to load the .modinfo section from %s\n",
module);
> + ERROR("failed to load the .modinfo section from %s\n",
module);
>   return NULL;
>   }
>
> @@ -329,23 +336,23 @@ static int print_modinfo(char *module)
>   char *map, *strings;
>
>   if (!fd) {
> - LOG("failed to open %s\n", module);
> + ERROR("failed to open %s\n", module);
>   return -1;
>   }
>
>   if (fstat(fd, &s) == -1) {
> - LOG("failed to stat %s\n", module);
> + ERROR("failed to stat %s\n", module);
>   return -1;
>   }
>
>   map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
>   if (map == MAP_FAILED) {
> - LOG("failed to mmap %s\n", module);
> + ERROR("failed to mmap %s\n", module);
>   return -1;
>   }
>
>   if (elf_find_section(map, ".modinfo", &offset, &size)) {
> - LOG("failed to load the .modinfo section from %s\n",
module);
> + ERROR("failed to load the .modinfo section from %s\n",
module);
>   return -1;
>   }
>
> @@ -390,9 +397,9 @@ static int deps_available(struct module *m, int
verbose)
>   m = find_module(dep);
>
>   if (verbose && !m)
> - LOG("missing dependency %s\n", dep);
> + ERROR("missing dependency %s\n", dep);
>   if (verbose && m && (m->state != LOADED))
> - LOG("dependency not loaded %s\n", dep);
> + ERROR("dependency not loaded %s\n", dep);
>   if (!m || (m->state != LOADED))
>   err++;

Would it make sense to maybe move the verbose checks into the log levels
themselves?


>   dep += strlen(dep

[OpenWrt-Devel] [PATCH][RESEND] netifd: IPIP tunnel support

2014-10-02 Thread Hans Dedecker
Adds IPIP tunnel support to netifd.
Following IPIP tunnel parameters can be configured :
   -peeraddr (IPv4 remote address)
   -ipaddr (IPv4 local address)
   -mtu (IPIP tunnel mtu)
   -ttl (time to live of encapsulting packets)
   -tos (type of service either inherit (outer header inherits the value of the 
inner header) or hex value)
   -df (don't fragment flag of encapsulating packets)
   -tunlink (bind tunnel to this interface)

Signed-off-by: Hans Dedecker 
---
 system-linux.c | 111 ++---
 1 file changed, 82 insertions(+), 29 deletions(-)

diff --git a/system-linux.c b/system-linux.c
index aca30ca..7955cec 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -204,6 +204,18 @@ system_rtn_aton(const char *src, unsigned int *dst)
return true;
 }
 
+static bool
+system_tos_aton(const char *src, unsigned *dst)
+{
+   char *e;
+
+   *dst = strtoul(src, &e, 16);
+   if (e == src || *e || *dst > 255)
+   return false;
+
+   return true;
+}
+
 int system_init(void)
 {
static struct event_socket rtnl_event;
@@ -1709,13 +1721,12 @@ static int system_add_gre_tunnel(const char *name, 
const char *kind,
char *str = blobmsg_get_string(cur);
if (strcmp(str, "inherit")) {
unsigned uval;
-   char *e;
 
-   uval = strtoul(str, &e, 16);
-   if (e == str || *e || uval > 255) {
+   if (!system_tos_aton(str, &uval)) {
ret = -EINVAL;
goto failure;
}
+
if (v6)
flowinfo |= htonl(uval << 20) & 
IP6_FLOWINFO_TCLASS;
else
@@ -1814,6 +1825,12 @@ static int system_add_gre_tunnel(const char *name, const 
char *kind,
if ((cur = tb[TUNNEL_ATTR_DF]))
set_df = blobmsg_get_bool(cur);
 
+   /* ttl !=0 and nopmtudisc are incompatible */
+   if (ttl && !set_df) {
+   ret = -EINVAL;
+   goto failure;
+   }
+
nla_put_u8(nlm, IFLA_GRE_PMTUDISC, set_df ? 1 : 0);
 
nla_put_u8(nlm, IFLA_GRE_TOS, tos);
@@ -1842,6 +1859,64 @@ failure:
 }
 #endif
 
+static int system_add_proto_tunnel(const char *name, const uint8_t proto, 
const unsigned int link, struct blob_attr **tb)
+{
+   struct blob_attr *cur;
+   bool set_df = true;
+   struct ip_tunnel_parm p  = {
+   .link = link,
+   .iph = {
+   .version = 4,
+   .ihl = 5,
+   .protocol = proto,
+   }
+   };
+
+   if ((cur = tb[TUNNEL_ATTR_LOCAL]) &&
+   inet_pton(AF_INET, blobmsg_data(cur), &p.iph.saddr) < 1)
+   return -EINVAL;
+
+   if ((cur = tb[TUNNEL_ATTR_REMOTE]) &&
+   inet_pton(AF_INET, blobmsg_data(cur), &p.iph.daddr) < 1)
+   return -EINVAL;
+
+   if ((cur = tb[TUNNEL_ATTR_DF]))
+   set_df = blobmsg_get_bool(cur);
+
+   if ((cur = tb[TUNNEL_ATTR_TTL]))
+   p.iph.ttl = blobmsg_get_u32(cur);
+
+   if ((cur = tb[TUNNEL_ATTR_TOS])) {
+   char *str = blobmsg_get_string(cur);
+   if (strcmp(str, "inherit")) {
+   unsigned uval;
+
+   if (!system_tos_aton(str, &uval))
+   return -EINVAL;
+
+   p.iph.tos = uval;
+   } else
+   p.iph.tos = 1;
+   }
+
+   p.iph.frag_off = set_df ? htons(IP_DF) : 0;
+   /* ttl !=0 and nopmtudisc are incompatible */
+   if (p.iph.ttl && p.iph.frag_off == 0)
+   return -EINVAL;
+
+   strncpy(p.name, name, sizeof(p.name));
+
+   switch (p.iph.protocol) {
+   case IPPROTO_IPIP:
+   return tunnel_ioctl("tunl0", SIOCADDTUNNEL, &p);
+   case IPPROTO_IPV6:
+   return tunnel_ioctl("sit0", SIOCADDTUNNEL, &p);
+   default:
+   break;
+   }
+   return -1;
+}
+
 static int __system_del_ip_tunnel(const char *name, struct blob_attr **tb)
 {
struct blob_attr *cur;
@@ -1899,7 +1974,6 @@ int system_add_ip_tunnel(const char *name, struct 
blob_attr *attr)
 {
struct blob_attr *tb[__TUNNEL_ATTR_MAX];
struct blob_attr *cur;
-   bool set_df = true;
const char *str;
 
blobmsg_parse(tunnel_attr_list.params, __TUNNEL_ATTR_MAX, tb,
@@ -1911,13 +1985,10 @@ int system_add_ip_tunnel(const char *name, struct 
blob_attr *attr)
return -EINVAL;
str = blobmsg_data(cur);
 
-   if ((cur = tb[TUNNEL_ATTR_DF]))
-   set_df = blobmsg_get_bool(cur);
-
unsigned int ttl = 0;
if ((cur = tb[TUNNEL_ATTR_TTL])) {
ttl = bl

[OpenWrt-Devel] [PATCH][RESEND] IPIP: IP in IP package support

2014-10-02 Thread Hans Dedecker
The package supports IP in IP by registering the ipip protocol handler

Following options are configurable
-peeraddr (IPv4 remote address)
-ipaddr (IPv4 local address)
-ttl (time to live of encapsulating packet)
-tos (type of service of encapsulating packet either inherit (outer header 
inherits the value of the inner header) or hex value)
-df (don't fragment flag of encapsulating packet)
-mtu (IPIP tunnel mtu)
-tunlink (bind tunnel to this interface)
-zone (firewall zone to which the IPIP tunnel will be added)

Signed-off-by: Hans Dedecker 
---
 package/network/config/ipip/Makefile  | 39 +++
 package/network/config/ipip/files/ipip.sh | 80 +++
 2 files changed, 119 insertions(+)
 create mode 100644 package/network/config/ipip/Makefile
 create mode 100755 package/network/config/ipip/files/ipip.sh

diff --git a/package/network/config/ipip/Makefile 
b/package/network/config/ipip/Makefile
new file mode 100644
index 000..98f7b78
--- /dev/null
+++ b/package/network/config/ipip/Makefile
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ipip
+PKG_VERSION:=1
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ipip
+  SECTION:=net
+  CATEGORY:=Network
+  MAINTAINER:=Hans Dedecker 
+  TITLE:=IP in IP Tunnel config support
+  DEPENDS:= +kmod-ipip
+endef
+
+define Package/ipip/description
+ IP in IP Tunnel config support in /etc/config/network.
+endef
+
+define Build/Compile
+endef
+
+define Build/Configure
+endef
+
+define Package/ipip/install
+   $(INSTALL_DIR) $(1)/lib/netifd/proto
+   $(INSTALL_BIN) ./files/ipip.sh $(1)/lib/netifd/proto/ipip.sh
+endef
+
+$(eval $(call BuildPackage,ipip))
diff --git a/package/network/config/ipip/files/ipip.sh 
b/package/network/config/ipip/files/ipip.sh
new file mode 100755
index 000..51c503f
--- /dev/null
+++ b/package/network/config/ipip/files/ipip.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+[ -n "$INCLUDE_ONLY" ] || {
+   . /lib/functions.sh
+   . /lib/functions/network.sh
+   . ../netifd-proto.sh
+   init_proto "$@"
+}
+
+proto_ipip_setup() {
+   local cfg="$1"
+
+   local df ipaddr peeraddr tunlink ttl tos zone mtu
+   json_get_vars df ipaddr peeraddr tunlink ttl tos zone mtu
+
+   [ -z "$peeraddr" ] && {
+   proto_notify_error "$cfg" "MISSING_ADDRESS"
+   proto_block_restart "$cfg"
+   return
+   }
+
+   ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
+
+   [ -z "$ipaddr" ] && {
+   local wanif="$tunlink"
+   if [ -z $wanif ] && ! network_find_wan wanif; then
+   proto_notify_error "$cfg" "NO_WAN_LINK"
+   return
+   fi
+
+   if ! network_get_ipaddr ipaddr "$wanif"; then
+   proto_notify_error "$cfg" "NO_WAN_LINK"
+   return
+   fi
+   }
+
+   [ -z "$zone" ] && zone="wan"
+
+   proto_init_update "ipip-$cfg" 1
+
+   proto_add_tunnel
+   json_add_string mode "ipip"
+   json_add_int mtu "${mtu:-1280}"
+   json_add_int ttl "${ttl:-64}"
+   [ -n "$tos" ] && json_add_string tos "$tos"
+   json_add_string local "$ipaddr"
+   json_add_string remote "$peeraddr"
+   [ -n "$tunlink" ] && json_add_string link "$tunlink"
+   json_add_boolean df "${df:-1}"
+
+   proto_close_tunnel
+
+   proto_add_data
+   [ -n "$zone" ] && json_add_string zone "$zone"
+   proto_close_data
+
+   proto_send_update "$cfg"
+}
+
+proto_ipip_teardown() {
+   local cfg="$1"
+}
+
+proto_ipip_init_config() {
+   no_device=1
+   available=1
+
+   proto_config_add_int "mtu"
+   proto_config_add_int "ttl"
+   proto_config_add_string "tos"
+   proto_config_add_string "tunlink"
+   proto_config_add_string "zone"
+   proto_config_add_string "ipaddr"
+   proto_config_add_string "peeraddr"
+   proto_config_add_boolean "df"
+}
+
+[ -n "$INCLUDE_ONLY" ] || {
+   add_protocol ipip
+}
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] base-files: remove a 'not found' error message during system boot

2014-10-02 Thread Jo-Philipp Wich
Hi Michel,

On 02.10.2014 15:24, Michel Stam wrote:
> During boot, a not found message is displayed for systems which do
> not have uci 'network.globals.ula_prefix' defined in
> /etc/config/network. The error message itself is not used and can
> be ignored.
> 
> Signed-off-by: Michel Stam 
> ---
>  package/base-files/files/etc/uci-defaults/12_network-generate-ula | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/package/base-files/files/etc/uci-defaults/12_network-generate-ula 
> b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> index 56b7eb3..fb4e3eb 100644
> --- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> +++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  
> -[ "$(uci get network.globals.ula_prefix)" != "auto" ] && exit 0
> +[ "$(uci get network.globals.ula_prefix 2>/dev/null)" != "auto" ] && exit 0

I think it is cleaner to use "uci -q ..." here.

>  r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
>  r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
> 

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


Re: [OpenWrt-Devel] [PATCH ubox] Use different loglevels

2014-10-02 Thread Karl P


Just an idea when I saw that deps_available line.  I've not looked at the code 
in any detail.


Cheers,
Karl P

On 10/02/2014 02:24 PM, Stam, Michel [FINT] wrote:

Hey Karl,

I agree that verbose in the macro would be an option, although by then
you're re-implementing the syslog priorities in macros.

Also, currently the verbose argument is only used in deps_available( ),
which would mean implementing the verbose parameter throughout the
kmodloader.c source. As said, not the most difficult to do, but what
would it gain?

Let me know.

Regards,

Michel Stam

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Karl P
Sent: Thursday, October 02, 2014 16:03 PM
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH ubox] Use different loglevels

Just one minor inline,

Cheers,
Karl P


On 10/02/2014 12:42 PM, Michel Stam wrote:

Ubox logs various messages during OpenWRT boot which are not very
interesting, such as the number of iterations made. This fix
implements several loglevels for debug/info/error so that more useful
messages are shown.

Signed-off-by: Michel Stam 
---
   kmodloader.c | 75

+---

   1 file changed, 41 insertions(+), 34 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c index 633570f..04d7c1d 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -38,10 +38,17 @@

   #define DEF_MOD_PATH "/lib/modules/%s/"

-#define LOG(fmt, ...) do { \
+#define INFO(fmt, ...) do { \
syslog(LOG_INFO, fmt, ## __VA_ARGS__); \
printf("kmod: "fmt, ## __VA_ARGS__); \
} while (0)
+#define ERROR(fmt, ...) do { \
+   syslog(LOG_ERR, fmt, ## __VA_ARGS__); \
+   fprintf(stderr,"kmod: "fmt, ## __VA_ARGS__); \
+   } while (0)
+#define DEBUG(fmt, ...) do { \
+   syslog(LOG_DEBUG, fmt, ## __VA_ARGS__); \
+   } while (0)


   enum {
@@ -165,7 +172,7 @@ static int elf_find_section(char *map, const char

*section, unsigned int *offset

else if (clazz == ELFCLASS64)
return elf64_find_section(map, section, offset, size);

-   LOG("unknown elf format %d\n", clazz);
+   ERROR("unknown elf format %d\n", clazz);

return -1;
   }
@@ -208,7 +215,7 @@ static int scan_loaded_modules(void)

fp = fopen("/proc/modules", "r");
if (!fp) {
-   LOG("failed to open /proc/modules\n");
+   ERROR("failed to open /proc/modules\n");
return -1;
}

@@ -243,23 +250,23 @@ static struct module* get_module_info(const char

*module, const char *name)

struct stat s;

if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return NULL;
}

if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return NULL;
}

map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return NULL;
}

if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n",

module);

+   ERROR("failed to load the .modinfo section from %s\n",

module);

return NULL;
}

@@ -329,23 +336,23 @@ static int print_modinfo(char *module)
char *map, *strings;

if (!fd) {
-   LOG("failed to open %s\n", module);
+   ERROR("failed to open %s\n", module);
return -1;
}

if (fstat(fd, &s) == -1) {
-   LOG("failed to stat %s\n", module);
+   ERROR("failed to stat %s\n", module);
return -1;
}

map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
-   LOG("failed to mmap %s\n", module);
+   ERROR("failed to mmap %s\n", module);
return -1;
}

if (elf_find_section(map, ".modinfo", &offset, &size)) {
-   LOG("failed to load the .modinfo section from %s\n",

module);

+   ERROR("failed to load the .modinfo section from %s\n",

module);

return -1;
}

@@ -390,9 +397,9 @@ static int deps_available(struct module *m, int

verbose)

m = find_module(dep);

if (verbose && !m)
-   LOG("missing dependency %s\n", dep);
+   ERROR("missing dependency %s\n", dep);
if (verbose && m && (m->state != LOADED))
-   LOG("dependency not loaded %s\n", dep);
+   ERROR("dependency not loaded %s\n", dep);
if (!m || (m->state != LOADED))
err++;


Wo

[OpenWrt-Devel] [PATCH 1/3] 6rd: Tos support

2014-10-02 Thread Hans Dedecker
Tos support is added as a string parameter which can have the following values :
 -inherit (outer header inherits the tos value of the inner header)
 -hex value

Signed-off-by: Hans Dedecker 
---
 package/network/ipv6/6rd/files/6rd.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/network/ipv6/6rd/files/6rd.sh 
b/package/network/ipv6/6rd/files/6rd.sh
index db70b5a..042d985 100644
--- a/package/network/ipv6/6rd/files/6rd.sh
+++ b/package/network/ipv6/6rd/files/6rd.sh
@@ -14,8 +14,8 @@ proto_6rd_setup() {
local iface="$2"
local link="6rd-$cfg"
 
-   local mtu df ttl ipaddr peeraddr ip6prefix ip6prefixlen ip4prefixlen 
tunlink sourcerouting zone
-   json_get_vars mtu df ttl ipaddr peeraddr ip6prefix ip6prefixlen 
ip4prefixlen tunlink sourcerouting zone
+   local mtu df ttl tos ipaddr peeraddr ip6prefix ip6prefixlen 
ip4prefixlen tunlink sourcerouting zone
+   json_get_vars mtu df ttl tos ipaddr peeraddr ip6prefix ip6prefixlen 
ip4prefixlen tunlink sourcerouting zone
 
[ -z "$ip6prefix" -o -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_ADDRESS"
@@ -67,6 +67,7 @@ proto_6rd_setup() {
json_add_int mtu "${mtu:-1280}"
json_add_boolean df "${df:-1}"
json_add_int ttl "${ttl:-64}"
+   [ -n "$tos" ] && json_add_string tos "$tos"
json_add_string local "$ipaddr"
json_add_string 6rd-prefix "$ip6prefix/$ip6prefixlen"
json_add_string 6rd-relay-prefix "$ip4prefix/$ip4prefixlen"
@@ -91,6 +92,7 @@ proto_6rd_init_config() {
proto_config_add_int "mtu"
proto_config_add_boolean "df"
proto_config_add_int "ttl"
+   proto_config_add_string "tos"
proto_config_add_string "ipaddr"
proto_config_add_string "peeraddr"
proto_config_add_string "ip6prefix"
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] 6in4: Tos support

2014-10-02 Thread Hans Dedecker
Tos support is added as a string parameter which can have the following values :
   -inherit (outer header inherits the tos value of the inner header)
   -hex value

Signed-off-by: Hans Dedecker 
---
 package/network/ipv6/6in4/files/6in4.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/network/ipv6/6in4/files/6in4.sh 
b/package/network/ipv6/6in4/files/6in4.sh
index 5309cc4..714d629 100755
--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -14,8 +14,8 @@ proto_6in4_setup() {
local iface="$2"
local link="6in4-$cfg"
 
-   local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username 
password updatekey sourcerouting
-   json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid 
username password updatekey sourcerouting
+   local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix tunnelid username 
password updatekey sourcerouting
+   json_get_vars mtu ttl tos ipaddr peeraddr ip6addr ip6prefix tunnelid 
username password updatekey sourcerouting
 
[ -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_ADDRESS"
@@ -56,6 +56,7 @@ proto_6in4_setup() {
json_add_string mode sit
json_add_int mtu "${mtu:-1280}"
json_add_int ttl "${ttl:-64}"
+   [ -n "$tos" ] && json_add_string tos "$tos"
json_add_string local "$ipaddr"
json_add_string remote "$peeraddr"
proto_close_tunnel
@@ -96,6 +97,7 @@ proto_6in4_init_config() {
proto_config_add_string "updatekey"
proto_config_add_int "mtu"
proto_config_add_int "ttl"
+   proto_config_add_string "tos"
proto_config_add_boolean "sourcerouting"
 }
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] 6to4: Tos support

2014-10-02 Thread Hans Dedecker
Tos support is added as a string parameter which can have the following values :
   -inherit (outer header inherits the tos value of the inner header)
   -hex value

Signed-off-by: Hans Dedecker 
---
 package/network/ipv6/6to4/files/6to4.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/network/ipv6/6to4/files/6to4.sh 
b/package/network/ipv6/6to4/files/6to4.sh
index 2a9b262..ce1de53 100755
--- a/package/network/ipv6/6to4/files/6to4.sh
+++ b/package/network/ipv6/6to4/files/6to4.sh
@@ -34,8 +34,8 @@ proto_6to4_setup() {
local iface="$2"
local link="6to4-$cfg"
 
-   local mtu ttl ipaddr sourcerouting
-   json_get_vars mtu ttl ipaddr sourcerouting
+   local mtu ttl tos ipaddr sourcerouting
+   json_get_vars mtu ttl tos ipaddr sourcerouting
 
( proto_add_host_dependency "$cfg" 0.0.0.0 )
 
@@ -77,6 +77,7 @@ proto_6to4_setup() {
json_add_string mode sit
json_add_int mtu "${mtu:-1280}"
json_add_int ttl "${ttl:-64}"
+   [ -n "$tos" ] && json_add_string tos "$tos"
json_add_string local "$ipaddr"
proto_close_tunnel
 
@@ -94,6 +95,7 @@ proto_6to4_init_config() {
proto_config_add_string "ipaddr"
proto_config_add_int "mtu"
proto_config_add_int "ttl"
+   proto_config_add_string "tos"
proto_config_add_boolean "sourcerouting"
 }
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] MTD mounting problem on ar71xx and kernel 3.14.x.

2014-10-02 Thread Paul Blazejowski
Hello all,

A while back i have created a ticket
(https://dev.openwrt.org/ticket/17609) detailing kernel 3.14.x failure
to boot on ar71xx (wndr3700v4 router) platform. Today i have
successfully used serial console attached to the router and got a boot
log which shows a wrong checksum of kernel image when trying to attach
it from UBI to MTD, please see output below ... i hope this helps in
identifying and narrows the issue for a possible fix.

Cheers!
-paul

U-Boot 1.1.4 (Jun 21 2012 - 11:09:33)

DNI HW ID: 29763948 flash 128MB RAM 128MB U-boot dni29 V1.8


DRAM:  128 MB
Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010
Atheros Communications, Ltd.
Ath Nand ID[87ff0178]: 2c:f1:80:95:02
ONFI MICRON  MT29F1G08ABADAWP
Micron NAND 128MiB 3,3V 8-bit [128MB]
== NAND Parameters ==
sc = 0x87ff0158 bbt = 0x87f68008 bbt_size = 0x100 nf_ctrl = 0x344
page = 0x800 block = 0x2 oob = 0x40
size = 128MB
Setting 0xb8116290 to 0x4a942d0f
Using default environment

In:serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
 4096 bytes read: OK
Fetching MAC Address from 0x87fe7928
 wasp  reset mask:c02300
WASP  > S17 PHY *
: cfg1 0x8000 cfg2 0x7114
eth0: 44:94:fc:73:9a:fc
athrs17_reg_init: complete
eth0 up
eth0
Hit any key to stop autoboot:  0
dup 1 speed 1000

 Client starts...[Listening] for ADVERTISE...checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
Tchecksum bad
checksum bad
TT
Retry count exceeded; boot the image as usual

 nmrp server is stopped or failed !

Loading from device 0: ath-nand (offset 0x6c)

** check kernel image **
   Verifying Checksum ... OK

** check rootfs image **
   Verifying Checksum ... OK
## Booting image at 8100 ...
   Image Name:   MIPS OpenWrt Linux-3.10.55
   Created:  2014-09-30  15:48:31 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:1965951 Bytes =  1.9 MB
   Load Address: 8006
   Entry Point:  8006
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[0.00] Linux version 3.10.55 (diffie@blaze) (gcc version 4.8.3
(OpenWrt/Linaro GCC 4.8-2014.04 r42682) ) #1 Tue Sep 30 11:48:14 EDT
2014
[0.00] bootconsole [early0] enabled
[0.00] CPU revision is: 0001974c (MIPS 74Kc)
[0.00] SoC: Atheros AR9344 rev 2
[0.00] Clocks: CPU:560.000MHz, DDR:400.000MHz, AHB:200.000MHz,
Ref:40.000MHz
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32
bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases,
linesize 32 bytes
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 32512
[0.00] Kernel command line:  board=WNDR3700_V4
console=ttyS0,115200
mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c(firmware),256k(caldata_backup),-(reserved)
 rootfstype=squashfs noinitrd
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536
bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768
bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 125868k/131072k available (2570k kernel code,
5204k reserved, 653k data, 228k init, 0k highmem)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1,
Nodes=1
[0.00] NR_IRQS:51
[0.00] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[0.07] pid_max: default: 32768 minimum: 301
[0.07] Mount-cache hash table entries: 512
[0.08] NET: Registered protocol family 16
[0.08] MIPS: machine is NETGEAR WNDR3700v4
[0.30] bio: create slab  at 0
[0.31] Switching to clocksource MIPS
[0.31] NET: Registered protocol family 2
[0.32] TCP established hash table entries: 1024 (order: 1, 8192
bytes)
[0.32] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.33] TCP: Hash tables configured (established 1024 bind 1024)
[0.33] TCP: reno registered
[0.34] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.34] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.35] NET: Registered protocol family 1
[0.37] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.37] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.38] msgmni has been set to 245
[0

Re: [OpenWrt-Devel] MTD mounting problem on ar71xx and kernel 3.14.x.

2014-10-02 Thread Paul Blazejowski
My bad, sorry i have pasted wrong file (like an imbecile) :D, here is
the correct output:

U-Boot 1.1.4 (Jun 21 2012 - 11:09:33)

DNI HW ID: 29763948 flash 128MB RAM 128MB U-boot dni29 V1.8


DRAM:  128 MB
Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010
Atheros Communications, Ltd.
Ath Nand ID[87ff0178]: 2c:f1:80:95:02
ONFI MICRON  MT29F1G08ABADAWP
Micron NAND 128MiB 3,3V 8-bit [128MB]
== NAND Parameters ==
sc = 0x87ff0158 bbt = 0x87f68008 bbt_size = 0x100 nf_ctrl = 0x344
page = 0x800 block = 0x2 oob = 0x40
size = 128MB
Setting 0xb8116290 to 0x4a942d0f
Using default environment

In:serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
 4096 bytes read: OK
Fetching MAC Address from 0x87fe7928
 wasp  reset mask:c02300
WASP  > S17 PHY *
: cfg1 0x8000 cfg2 0x7114
eth0: 44:94:fc:73:9a:fc
athrs17_reg_init: complete
eth0 up
eth0
Hit any key to stop autoboot:  0
dup 1 speed 1000

 Client starts...[Listening] for ADVERTISE...checksum bad
Tchecksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
TT
Retry count exceeded; boot the image as usual

 nmrp server is stopped or failed !

Loading from device 0: ath-nand (offset 0x6c)

** check kernel image **
   Verifying Checksum ... OK

** check rootfs image **
   Verifying Checksum ... OK
## Booting image at 8100 ...
   Image Name:   MIPS OpenWrt Linux-3.14.19
   Created:  2014-10-02  15:34:27 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:1965951 Bytes =  1.9 MB
   Load Address: 8006
   Entry Point:  8006
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[0.00] Linux version 3.14.19 (diffie@blaze) (gcc version 4.8.3
(OpenWrt/Linaro GCC 4.8-2014.04 r42707) ) #2 Thu Oct 2 11:34:10 EDT
2014
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 0001974c (MIPS 74Kc)
[0.00] SoC: Atheros AR9344 rev 2
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32
bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases,
linesize 32 bytes
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 32512
[0.00] Kernel command line:  board=WNDR3700_V4
console=ttyS0,115200
mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c(firmware),256k(caldata_backup),-(reserved)
 rootfstype=squashfs noinitrd
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536
bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768
bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 125732K/131072K available (2696K kernel code,
122K rwdata, 552K rodata, 204K init, 185K bss, 5340K reserved)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1,
Nodes=1
[0.00] NR_IRQS:51
[0.00] Clocks: CPU:560.000MHz, DDR:400.000MHz, AHB:200.000MHz,
Ref:40.000MHz
[0.00] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[0.07] pid_max: default: 32768 minimum: 301
[0.07] Mount-cache hash table entries: 1024 (order: 0, 4096
bytes)
[0.08] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
bytes)
[0.08] NET: Registered protocol family 16
[0.09] MIPS: machine is NETGEAR WNDR3700v4
[0.31] bio: create slab  at 0
[0.31] Switched to clocksource MIPS
[0.32] NET: Registered protocol family 2
[0.32] TCP established hash table entries: 1024 (order: 0, 4096
bytes)
[0.32] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.33] TCP: Hash tables configured (established 1024 bind 1024)
[0.34] TCP: reno registered
[0.34] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.35] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.35] NET: Registered protocol family 1
[0.36] futex hash table entries: 256 (order: -1, 3072 bytes)
[0.38] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.38] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.40] msgmni has been set to 245
[0.40] io scheduler noop registered
[0.40] io scheduler deadline registered (default)
[0.41] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
«r¢¢êserial8250.0:

Re: [OpenWrt-Devel] [PATCH 2/3] busybox: allow own class B range to be used for zeroconf

2014-10-02 Thread Felix Fietkau
On 2014-10-02 15:41, Michel Stam wrote:
> 169.254 may be used by local networks. This patch allows specifying
> your own IP range.
> 
> Signed-off-by: Michel Stam 
Could you please also submit this and the other patch to busybox upstream?

Thanks,

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