[OpenWrt-Devel] No rule to make target `package/prereq'. Stop.

2016-10-28 Thread Brian J. Murrell
I've followed

https://forum.openwrt.org/viewtopic.php?pid=262674#p262674

to create (resurrect in fact) a package and when I run the make I get:

make[3]: *** No rule to make target `package/prereq'.  Stop.
make[2]: *** 
[/net/server/src/OpenWrt-SDK-15.05.1-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_prereq]
 Error 2
make[1]: *** [prereq] Error 2
make: *** [world] Error 2

Prior to that (i.e. after unpacking the SDK) I did:

# cat feeds.conf.default | sed 's/#src-git oldpackages/src-git oldpackages/' > 
feeds.conf
# ./scripts/feeds update oldpackages
# ./scripts/feeds install shorewall-lite

Wonder what I did wrong or might have missed.

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] odhcp sending RAs to wrong interface

2016-10-28 Thread Brian J. Murrell
On Fri, 2016-10-28 at 09:50 +, Karl Palsson wrote:
> 
> Note that odhcpd doesn't actually observe that "ignore" setting.

Ahh.  Thanks for letting me know, but TBCH, that is the absolute least
of my worries at this moment.

Not getting RAs on the interface they are supposed to be happening on
is much much more catastrophic.  The entire LAN collapses without the
RAs to keep addresses and routes configured.

Cheers,
b.

signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] was the move to github complete/1:1?

2016-10-28 Thread Brian J. Murrell
On Fri, 2016-10-28 at 09:54 +0300, Hannu Nyman wrote:
> 
> The feed is correctly referenced as "oldpackages" in the BB feeds 
> definitions: 
> https://github.com/openwrt/openwrt/blob/barrier_breaker/feeds.conf.de
> fault

Yeah, I did notice that.

> In CC that "oldpackages" feed is commented out by default, in order
> to avoid 
> the non-maintained packages being visible by default: 
> https://github.com/openwrt/openwrt/blob/chaos_calmer/feeds.conf.defau
> lt
> 
> You can uncomment oldpackages to get access to those packages in
> menuconfig, 
> but nodoby knows if they still compile ok with the current CC.

But more (most) importantly, that feed, even though it was being built
for BB and available to opkg, is not being built for CC, right?  I
can't seem to find a built repo anywhere.

I guess I can use the OpenWrt-SDK to build one-off packages such as
this?  Currently I'm using the ImageBuilder to build my images.  I am
really hoping to avoid getting back on the build-from-source treadmill
again.

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] was the move to github complete/1:1?

2016-10-27 Thread Brian J. Murrell
I don't follow the day-to-day development of OpenWRT very closely so I
am just becoming aware of the switch to GitHub.  Yay on that.

But I wonder, when the switch was made, was the entire source that is
at dev.openwrt.org imported to GitHub?  I ask because trying to build a
CC image I am finding packages that were in BB missing.  But they even
appear to be missing from the "for-14.07" branch on GitHub.

As just one example, packages/net/shorewall-{lite,core} is on the old
dev.openwrt.org SCM for 14.07 but does not appear at all on the GitHub
"for-14.07".  So did packages get dropped on the switch?

Ultimately, I am looking for a number of packages for CC that I have on
my BB router and just trying to figure out where they went to in CC.

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] odhcp sending RAs to wrong interface

2016-10-26 Thread Brian J. Murrell
I have an OpenWRT router that has been running stably for many many
(many!) months if not years on BB (r42625).

When I reboot it, it sends a couple of initial RAs to the br-lan
interface but subsequently switches to sending them out of (one of) the
WAN interfaces.

To be clear, it is sending the RAs that should be going to br-lan to
wan0 which is eth0.2.

Restarting odhcpd doesn't even fix it.  It continues to send the RAs to
the WAN interface.

Some configuration files:

# cat /etc/config/network

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd31:aeb1:48df::/48'

config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option type 'bridge'
option proto 'static'
list ipaddr '10.75.22.253'
list ipaddr '10.75.22.254'
option netmask '255.255.255.0'
option ip6assign '60'
option defaultroute '0'
option peerdns '0'
option dns '10.75.22.3'
list dns_search 'interlinx.bc.ca ilinx'

config interface 'wan0'
option ifname 'eth0.2'
option proto 'dhcp'
option peerdns '0'

config interface 'wan1'
option ifname 'eth0.3'
option proto 'pppoe'
option username 'xxx
option password 'xxx'
option ppp_redial 'persist'
option peerdns '0'
option defaultroute '0'
option ipv6 '1'

config interface 'wan6'
option ifname '@wan1'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option defaultroute '0'
option peerdns '0'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
option enable_vlan4k '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '0t 1t 2 3 4 5'

config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '0t 1t'

config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '0t 1t'

config switch_vlan
option device 'switch0'
option vlan '100'
option vid '100'
option ports '0t 1t'

config interface 'pppoe_ether'
option ifname 'eth0.3'
option proto 'static'
option ipaddr '10.0.0.1'
option netmask '255.255.255.0'
option defaultroute '0'
option peerdns '0'

config interface 'henet'
option proto '6in4'
option peeraddr '216.66.38.58'
option ip6addr '2001:xxx:xx:xxx::2/64'
option ip6prefix '2001:xxx:xx:xxx::/64'
option tunnelid 'xxx'
option username 'xxx'
option password 'xxx'
option updatekey 'xxx'

config interface 'cableco'
option proto '6to4'
option adv_subnet '1'
option adv_interface 'lan'
option ip6prefix '2002::::1/60'

config interface 'guest'
option proto 'static'
list ipaddr '192.168.101.253'
list ipaddr '192.168.101.254'
option netmask '255.255.255.0'
option type 'bridge'
option _orig_ifname 'eth0.100 radio0.network2'
option _orig_bridge 'true'
option ifname 'eth0.100'

#  cat /etc/config/dhcp

config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'ilinx'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'

config dhcp 'lan'
option interface 'lan'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
option start '100'
option limit '150'
option leasetime '12h'
list dns 'fd31:aeb1:48df:0:214:d1ff:fe13:45ac'

config dhcp 'wan0'
option interface 'wan0'
option ignore '1'

config dhcp 'wan1'
option ignore '1'
option interface 'wan1'
option dynamicdhcp '0'

config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'

I'm at a loss to understand why odhcpd would suddenly start doing this.

Any ideas?

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ubus call: Command failed: Not found with odhcp6c

2015-09-25 Thread Brian J. Murrell
On BB I'm trying to configure an ISP provided IPv6 (over PPPoE). 
 odhcp6c seems to work but the script it calls does not.  I get a bunch
of "Command failed: Not found" from ubus calls:

+ ubus call network.interface notify_proto { "action": 0, "link-up": false, 
"keep": false, "interface": "" }
Command failed: Not found

and

+ ubus call network.interface notify_proto { "action": 0, "link-up": true, 
"data": { "passthru": 
"001700202607f2c111c2" }, 
"keep": false, "ip6addr": [ { "ipaddr": "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", 
"mask": "64", "preferred": 604796, "valid": 2591996, "offlink": true } ], 
"routes6": [ { "target": "::", "netmask": "0", "gateway": 
"fe80::90:1a00:2a4:fee4", "metric": 1024, "valid": 1796 }, { "target": 
"2007:e2b0:a000:13d::", "netmask": "64", "metric": 256, "valid": 2591996 } ], 
"ip6prefix": [ "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ 
"2007:e2b0::1", "2007:e2b0::2" ], "interface": "" }
Command failed: Not found

No idea why though.  My network configuration for this new IPv6
connection looks like:

config interface 'wan1'
option ifname 'eth0.3'
option proto 'pppoe'
option username 'xxx'
option password 'xxx'
option ppp_redial 'persist'
option peerdns '0'
option defaultroute '0'
option ipv6 '1'

config interface 'wan6'
option ifname 'pppoe-wan1'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option defaultroute '0'
option peerdns '0'

Note that the "wan1" interface ends up being called "pppoe-wan1" when
it is plumbed.  I have tried both pppoe-wan1 and wan1 in the ifname for
wan6.

If I hardcode a:

INTERFACE="wan1"

into /lib/netifd/dhcpv6.script:setup_interface() I don't get the secondof the 
above errors and the ubus calls end up being:

+ ubus call network.interface notify_proto { "action": 0, "link-up": false, 
"keep": false, "interface": "" }
Command failed: Not found
+ ubus call network.interface notify_proto { "action": 0, "link-up": true, 
"data": { "passthru": 
"001700202607f2c11c2" }, 
"keep": false, "ip6addr": [ { "ipaddr": "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", 
"mask": "64", "preferred": 604797, "valid": 2591997, "offlink": true } ], 
"routes6": [ { "target": "::", "netmask": "0", "gateway": 
"fe80::90:1a00:2a4:fee4", "metric": 1024, "valid": 1797 }, { "target": 
"2007:e2b0:a000:13d::", "netmask": "64", "metric": 256, "valid": 2591997 } ], 
"ip6prefix": [ "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ 
"2007:e2b0::1", "2007:e2b0::2" ], "interface": "wan1" }

Notice that the second call above differs from the first one in that
the interface value has "wan1" in it.

It's worth noting that I have a number of other IPv6 interfaces already
on this router, up and functioning perfectly so basic IPv6 is
functional here and this is specific to this interface.

So any ideas why this is all failing?

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] firewall instead of routing rules to keep ULAs from escaping

2015-06-16 Thread Brian J. Murrell
On Tue, 2015-06-16 at 08:47 +0200, Steven Barth wrote:
 That commit got reverted 4 months later

Oh good.  It was the wrong way to solve that, IMHO.

 Source-Destination routing has been used to replace it for egress
 traffic, i.e. there are simply no external (e.g. default) routes that
 have a matching source-restriction.

I'm not sure exactly what all of that meant but egress is my concern
here so let's expand here.

Ultimately, I don't see anything in the IPv6 routing table on my 14.07
router that prevents the LAN side of the 14.07 router from trying to
access a ULA (or any other bogon) that is on the WAN side of the router
(i.e. through the default route), because somebody incorrectly lists a
ULA on their Internet facing DNS zone for example.

I would have expected to see something along the lines of a:

unreachable fc00::/7 dev lo  metric 1024  error -128

but I don't.  So what mechanism is (or should be) being used to
accomplish that?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] firewall instead of routing rules to keep ULAs from escaping

2015-06-16 Thread Brian J. Murrell
On Tue, 2015-06-16 at 18:56 +0200, Steven Barth wrote:
 Source-Destination matching is done in the regular routing table.
 E.g. for my he.net connection the v6 routing table looks like this:
 
 default from 2001:470:xx:yyy::/64 dev 6in4-henet  proto static  metric 1024
 default from 2001:470:::/48 dev 6in4-henet  proto static  metric 1024

A.  I see what you are saying now.

 if you try to send with a ULA there is no matching route since there is
 no unspecific default route.

Unfortunately I do have such a route (that is not Source matching in
addition to the destination):

default via 2001:470:aa:bbb::1 dev 6in4-henet  metric 1024 

This is likely due to Shorewall and LSM managing a default route in a
multi-isp configuration.

 Also I disagree about the general usefulness of a fc00::/7 block. I can
 imagine e.g. a VPN-scenario where (on top of tunneling internet access)
 you access certain local services which have ULAs. This would
 essentially be broken by your generic rule for not much added gain.

But (and yes) if you had an fc00::/7 unreachable route, any ULAs you
need to reach need to have more specific routes, but one should have
those because one should be getting those through a routing protocol.

It just seems to make sense to me that on a router that would otherwise
route ULAs out to a network where ULAs have not been announced should
prevent them from going there.  I guess that's a point we might just
have to agree to disagree on.

But you are right about the Source-Destination matching should take care
of net letting ULAs out.  I just have something in my configuration that
is defeating that at the moment.  :-(

Thanks very much for your patience on this.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] firewall instead of routing rules to keep ULAs from escaping

2015-06-15 Thread Brian J. Murrell
I wonder why in https://dev.openwrt.org/changeset/35012 the choice was
made to use the firewall to prevent ULA destination addresses from
trying to be reached on the WAN vs. using routing rules and
unreachable routes.  Something like:

unreachable fc00::/7 dev lo  metric 1024  error -128

in the routing table for example.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] will AA ever get out of RC status?

2013-03-28 Thread Brian J. Murrell
On 13-03-28 09:15 AM, David Woodhouse wrote:
 
 Does it still have the horribly broken OpenSSL 1.0.1d release? That was
 *very* quickly superseded by 1.0.1e, and then some fixes on top of that.
 It would be a shame to ship 1.0.1d; better to have stuck with 1.0.1c
 than that!

The very last commit even:

https://dev.openwrt.org/changeset/36088/branches/attitude_adjustment

Message: AA: backport openssl update from r35600

where r35600 is:

Message: openssl: update OpenSSL to 1.0.1e, fix Cisco DTLS.

 1.0.1d had a rushed fix for CVE-2013-0169 which broke in certain
 circumstances. 1.0.1e has the fix for TLS.

 Also include a further patch from the 1.0.1 branch which fixes the
 breakage this introduced for Cisco's outdated pre-standard version of
 DTLS, as used by OpenConnect.

 Update mirror URLs to reflect current reality.

 Signed-off-by: David Woodhouse David.Woodhouse@…
 Signed-off-by: Florian Fainelli florian@…

Cheers,
b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] should syslog-ng[3] terminate build-in syslog?

2012-12-31 Thread Brian J. Murrell
On 12-12-31 09:12 AM, Bastian Bittorf wrote:
 
 the best way to solve this problem is IMHO to
 write an startup-script for both and delete it from /etc/init.d/boot
 so the busybox-logger simply gets overwritten when you install
 syslog-ng3.

So are you proposing that the syslog-ng3 post-install script edit
/etc/init.d/boot?  IMHO, that's a no-no.  One given package should not
touch another package's files.

Surely it would be better to simply have a switch in the
/etc/init.d/boot script that would check for the presence of a superior
syslogd and packages like syslog-ng3 would set the switch to announce
that a superior syslogd is installed so the syslogd that
/etc/init.d/boot starts won't be started.

 I'm unsure if the call in /etc/init.d/rcS it tooo hardcoded:
 
 # [ -x /usr/bin/logger ]  LOGGER=logger -s -p 6 -t sysinit

Yeah, that should be more along the lines of:

[ -x /usr/bin/logger ]  [ ! -f /etc/superior_syslogger ]  \
  LOGGER=logger -s -p 6 -t sysinit

Where syslog-ng3 (and any other syslogger package) has the file
/etc/superior_logger in it's manifest.

Cheers,
b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] should syslog-ng[3] terminate build-in syslog?

2012-12-31 Thread Brian J. Murrell
On 12-12-31 10:44 AM, Bastian Bittorf wrote:
 
 oops, you misunderstood me:
 like Jonathan i propose to move the logger call to
 an rc-file /etc/init.d/logger (or syslog?) which both packages
 (base-files + syslogd-ng3) have to supply.

I think I get your meaning.  However you cannot have a supplemental
package, like syslog-ng3 provide the same file as a base package.  If
that happens the supplemental package will refuse to install due to
overwriting an file provided by a different package and you wouldn't
want to remove the base package to get the supplemental package installed.

Therefore each package has to install it's own /etc/init.d/ file, with
the supplemental package possibly/probably disabling the
/etc/init.d/base-logger startup script.

The thing about such an approach though is that the naive user, seeing a
startup script has been disabled might think he should enable it.

 what about klogd?

Indeed.

b.





signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] should syslog-ng[3] terminate build-in syslog?

2012-12-30 Thread Brian J. Murrell
On 12-12-29 05:23 AM, Daniel A. Nagy wrote:
 Hi Brian,

Hi Daniel!

 The builtin syslogd logs to a circular buffer in RAM. It is fairly
 failsafe and does not take up many resources. I think that the current
 behavior of leaving it running upon installation of more heavyweight
 syslog services is correct behavior.

Interesting perspective.  The reason it seemed so important here to shut
it down was because I had configured it to forward to a syslog server
here and then also configured syslog-ng3 to do the same.  Of course that
was not a good situation.

But indeed, simply reverting the configuration of having the built-in
syslogd log to the syslog server serves my purposes as well.

But what about slurping up the kernel messages, (i.e. /proc/kmesg)?  Can
the built-in syslogd/klogd and syslog-ng3 both read from those or will
it be racy with the first reader consuming them and the second reader
not getting any?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] should syslog-ng[3] terminate build-in syslog?

2012-12-28 Thread Brian J. Murrell
I have installed syslog-ng3, configured it and started it.  I notice
that while it does seem to be doing the work of logging to my syslog
server, the old syslogd still seems to be running.

Should the installation and/or startup of syslog-ng[3] either prevent
the standard syslogd from running or at least kill it once syslog-ng[3]
starts taking over?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenVPN with netifd

2012-12-17 Thread Brian J. Murrell
On 12-12-17 11:48 AM, Joachim Schlipper wrote:
 
 I don't remember at what stage the .tgz was but I'm sure I have improved
 the scripts meanwhile. Since I see you're interrested, I'm going to fuddle
 my current files together into a new tgz.

Awesome.  Thanks!

 The current implementation is thought in this way: when the (virtual)
 interface
 is brought up, then try to establish the tunnel until the interface is
 brought down.
 If no real path to the OpenVPN server is available, it will try again
 until there is one.
 This way I didn't require a dependency for a real interface up to now.

 For multiple internet interfaces, the default route or - if set -
 specific multiwan rules

Hrm.  I'm not familiar with these.  Do you have a pointer handy?  If not
I can start with Google.

 I'm planning on publishing my files to svn, but was away for a while and
 didn't
 find the time.

T'would be good if you could given that netifd is the way now.  :-)

 Great that it is useful for you, I'm looking forward for your feedback.

Cheers and much thanks for all of the work!

b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenVPN with netifd

2012-12-14 Thread Brian J. Murrell
Nice work on netifdizing OpenVPN!  I'm really looking forward to
patching all of your scripts from
http://pariah-angels.de/openwrt/openvpn-interface.tgz into my AA-rc1
installation I have here.  Any chance you might want to publish an AA
ipk for it?  :-)

I wonder what your thoughts are on the applicability of your existing
work to a router with  1 external (i.e. Internet) interfaces (and
therefore more than one external IP address).  In such a case, (AFAIU,
anyway) one typically chooses one of the interfaces and tells OpenVPN to
bind to it.

Also, being totally new to this netifd stuff, I am just trying to figure
out the facilities available to proto scripts, so I could totally be
missing it here, but does your proto script have a dependency on an
Internet interface being up?  That is, will ifup for an OpenVPN
interface only succeed if a real interface, providing connectivity
upstream, is already plumbed?

In a message thread on the -users lists where I was trying to get an HE
IPv6 tunnel up, Jow showed me where the 6in4 proto fails unless there is
a route to 0.0.0.0 present using:

  ( proto_add_host_dependency $cfg 0.0.0.0 )

I wonder if that is applicable here.  But more importantly, for  1
external interface systems, having a dependency on interface OpenVPN
intends to bind to would be even more important.

Looking forward to your thoughts.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] network_get_gateway doesn't seem to work

2012-12-09 Thread Brian J. Murrell
On 12-12-09 12:00 PM, Jo-Philipp Wich wrote:
 I fail to see how that requires changes to shorewall, it would continue
 doing whatever it does (routes added without explicit metric get
 automatically metric 0).

Because shorewall builds a routing system that looks like this:

root@OpenWrt:~# ip rule ls
0:  from all lookup local
...
32766:  from all lookup main
32767:  from all lookup default

root@OpenWrt:~# ip route ls table main
default via gw_primary_isp dev eth0.1
...
10.75.22.0/24 dev br-lan  proto kernel  scope link  src 10.75.22.195

root@OpenWrt:~# ip route ls table default
default via {gw_fallback_isp dev pppoe-wan1  src 1.5.3.5  metric 2

So that when the primary ISP goes AWOL it's default route disappears
from the main routing table and default routing falls through to the
default table.

If I were to add both ISP's gateways into the main routing table,
albeit with lower metrics, they would still be used in preference to
falling through to the default routing table.

Cheers,
b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] network_get_gateway doesn't seem to work

2012-12-08 Thread Brian J. Murrell
On 12-12-08 04:32 PM, Jo-Philipp Wich wrote:
 Did you consider to set option metric on the two interfaces, e.g.
 metric 10 and 11 and thne just install oyur own preferred defualt
 route with metric 0?

That's just not how the software (shorewall) that manages the routing
does things.  I'd rather not get into have to re-architect that software
(which works on every other platform so they will be less than thrilled
with deviations just for OpenWRT) but just be able to ask OpenWRT what
was the default route the ISP provided like I could in Backfire.

As you know, in Backfire one could easily get this information with:

/sbin/uci -p /var/state get network.wan1.gateway

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Status of Attitude Adjustement

2012-12-02 Thread Brian J. Murrell
On 12-12-02 03:04 PM, Jiri Slachta wrote:

 Hello Brian,

Hi Jiri,

 I am just following those recommendations in AA beta announcement:

Ahhh.  I thought you were making a more authoritative recommendation.

 The kernel 2.4 support has been dropped from Attitude Adjustment.

I never used the kernel 2.4 support anyway, even on brcm devices.  :-)

 Also I saw some users complaining about lack of memory on current trunk or AA 
 on older devices.

I wonder why though.

 I think it's a rule that new functionality also raises minimal memory 
 requirements.

Sure, but everything after the kernel is gravy.  That is, by default AA
may run more services than Backfire, thus consuming more memory, but if
you compare apples to apples, and AA and Backfire running the same
services, is AA really consuming that much more memory?  If so, why?

 It's a recommendation for older devices to stick with backfire, but you can 
 build an image on your own without services you do not need to fit in a small 
 amount of memory. :-)

Or just turn them off after installing the default images.  :-)

b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] shorewall-lite: update to 4.5.6.2

2012-08-15 Thread Brian J. Murrell
On 12-08-15 01:28 AM, Edy Corak wrote:
 Index: files/lsm_script
 ===
 --- files/lsm_script  (Revision 33177)
 +++ files/lsm_script  (Arbeitskopie)
...
 +cat EOM | ssmtp ${WARN_EMAIL}

What if I don't have ssmtp on my router and/or I don't have a mail
server to point it at to send mail and/or I am not interested in being
nagged every time a link state changes?

 +Subject: LSM: ${NAME} ${STATE}, DEV ${DEVICE}
 +
 +Hi,
 +
 +Your connection ${NAME} has changed it's state to ${STATE} at ${DATE}.
...

 +Your LSM Daemon
 +
 +EOM
 +
...
 +
 +#EOF

Why is this commented-out #EOF needed here?

 Index: patches/110-MODULESDIR.patch
 ===
 --- patches/110-MODULESDIR.patch  (Revision 33177)
 +++ patches/110-MODULESDIR.patch  (Arbeitskopie)
 @@ -1,20 +0,0 @@
  a/lib.common 2012-01-21 14:21:50.0 +0100
 -+++ b/lib.common 2012-06-03 11:52:35.115967105 +0200
 -@@ -328,7 +328,7 @@
 - 
 - [ -z $MODULESDIR ]  \
 - uname=$(uname -r)  \
 --
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
 -+
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
 - 
 - [ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
 - 
 -@@ -367,7 +367,7 @@
 - 
 - [ -z $MODULESDIR ]  \
 - uname=$(uname -r)  \
 --
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
 -+
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
 - 
 - for directory in $(split $MODULESDIR); do
 - [ -d $directory ]  moduledirectories=$moduledirectories $directory

Why can this patch be removed?  i.e. does Shorewall now include
/lib/modules/$uname in it's MODULESDIR or has the kernel modules
location been updated to conform to one of the paths already in
MODULESDIR?  Or something else?

Cheers,
b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] shorewall-lite: update to 4.5.6.2

2012-08-15 Thread Brian J. Murrell
On 12-08-15 06:50 AM, Brian J. Murrell wrote:
 On 12-08-15 01:28 AM, Edy Corak wrote:

 Index: patches/110-MODULESDIR.patch
 ===
 --- patches/110-MODULESDIR.patch (Revision 33177)
 +++ patches/110-MODULESDIR.patch (Arbeitskopie)
 @@ -1,20 +0,0 @@
  a/lib.common2012-01-21 14:21:50.0 +0100
 -+++ b/lib.common2012-06-03 11:52:35.115967105 +0200
 -@@ -328,7 +328,7 @@
 - 
 - [ -z $MODULESDIR ]  \
 -uname=$(uname -r)  \
 --   
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
 -+   
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
 - 
 - [ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
 - 
 -@@ -367,7 +367,7 @@
 - 
 - [ -z $MODULESDIR ]  \
 -uname=$(uname -r)  \
 --   
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
 -+   
 MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
 - 
 - for directory in $(split $MODULESDIR); do
 -[ -d $directory ]  moduledirectories=$moduledirectories $directory
 
 Why can this patch be removed?  i.e. does Shorewall now include
 /lib/modules/$uname in it's MODULESDIR or has the kernel modules
 location been updated to conform to one of the paths already in
 MODULESDIR?  Or something else?

Never mind.  I saw your patch for shorewall-core, which now includes
this patch.

Cheers,
b.






signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] anyone have a working recipe for kexec-booting from USB storage?

2012-05-19 Thread Brian J. Murrell
I really want to start testing some new/different firmwares but I don't
really have an experimental router to do it on.  Thus, I'd like to get
my router (DIR-825) into a state where I can change what I boot and run
with simply by swapping USB storage devices.

That way I can have a working production USB stick that I can just pop
in and am working in a known good configuration.  When I want to
experiment/upgrade test I build a new USB stick, pop it in and reboot.
Disaster?  No worries, just pop the working production stick back in
and everything is back to where it was before experimenting.

To do this though, I need a kexec-ing image I can flash to my router to
become my boot loader.

Anyone got one for an ar71xx?

Somewhat related, Quentin Armitage proposed a block-extroot-kexec to do
just this at
https://lists.openwrt.org/pipermail/openwrt-devel/2010-April/006671.html.
I wonder why it didn't even get a comment, nevermind not getting
committed.  Was there objection to it?

I would really love to see the openwrt project itself producing
bootloader flash images in addition to the traditional images they
currently produce so that people wanting this feature didn't have to
roll their own.

Any chance of that happening?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] Comprehensive ipv4 and ipv6 unaligned access patch for ar71xx

2012-04-24 Thread Brian J. Murrell
On 12-04-23 06:51 PM, Michael Markstaller wrote:
 
 Agreed but lets get realisitic, my objectives (home, office 
 customers) are:
 1) security
 2) it works
 3) technically perfect

You forgot:

4) sustainable

Do you have children?  I suspect you don't.  Your lack of forward/future
thinking indicates that.  It's amazing how one's perspective of the
future changes when one starts thinking about the future of their
children rather than just their own present day happiness.

Likely you don't think we should be exploring alternative energies
either, right?  I mean why bother?  Gasoline is still flowing out of the
pumps today right?

 v6 only meets #3..

and #4, whereas IPv4 doesn't meet #4.

 a) It's a big security risk at first as noone really knows whats going
 on with IPv6 (at least on customer/user-side!)

It's no more of a security risk that IPv4 is.  Both are network
protocols that carry traffic to one's front-door so one ought to make
sure they have a good door lock.

b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] puzzling over hostapd behavior

2012-04-03 Thread Brian J. Murrell
On 12-04-03 04:52 AM, Dave Taht wrote:
 I was wondering why hostapd (on cerowrt 3.3) ate so much cpu, even when
 idle, nothing connected, no crypto enabled...
 
 I'm curious as to if this is correct behavior, and what's the point of
 writing 000s to /dev/random,

Is it supposed to be feeding the entropy pool (i.e. perhaps from RF
noise for example) for the kernel's random number generator?  I'm really
not sure if writing into /dev/random does feed the entropy pool or not,
but just guessing here.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Let's fix the OpenWrt patch acceptance problem!

2012-01-24 Thread Brian J. Murrell
On 12-01-24 08:06 AM, Jonathan McCrohan wrote:
 
 I also see svn as part of the problem. I think a move towards the
 linux-kernel development model would be a great benefit.

I hate sending simple me too posts, but to help demonstrate that there
is demand for this, I too would welcome a move to git from SVN.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] multiwan -- allocation of a port (i.e. vlan) for wan2

2011-10-21 Thread Brian J. Murrell
On 11-10-20 04:17 PM, Daniel A. Nagy wrote:
 
 Hi Brian,

Hello once again my friend.

 No, unfortunately there isn't one yet.

I didn't think so.

 But we need it too,

Ahhh.  You are doing multi-WAN in your project also?

 so if nobody
 implements it before us, we will contribute one before the end of the year.

Very sweet.  Looking forward to it.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] multiwan -- allocation of a port (i.e. vlan) for wan2

2011-10-21 Thread Brian J. Murrell
On 11-10-21 11:08 AM, Manuel Munz wrote:
 
 There is support for switch/vlan config in luci [1], but it is only
 shown when your switch is configurable. So the problem is not with luci
 but with openwrt-support on your device i think.

Is that the Switch tab under the Network tab that has Enable VLAN
functionality checkbox?  If so, I have that.  But that requires I
understand way too much about VLANning.

I was referring to a much more simple, add WAN port dedicated UI that
basically went along the lines of Add WAN port-LAN port to become a
WAN port. type of process.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] WDS dropping some multicast traffic

2011-07-10 Thread Brian J. Murrell
I put a WDS link on my network, replacing a previously working perfectly
hard-wired link.

The WDS link is composed of a D-Link DIR-825 rev. B1 running
10.03.1-RC5, r27015 and a Linksys WRT54G/GS/GL running 10.03.1-RC5,
r27015 also.

The link seems to work just fine but for one problem.

The symptom of the problem I am having is that the routing table on the
machine across the WDS link is losing it's OSPF (quagga) supplied routes
for a period of time, after which they will restore and then disappear
again, rinse repeat.  A.k.a. flapping.

When I look at the OSPF traffic across the link it's quite clear that
some traffic is being dropped.  For example, the originator of the OSPF
routing data (the DIR-825) sends the following traffic out to it's br-lan:

01:49:19.119032 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 52
01:49:29.119909 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 52
01:49:39.120775 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 52
01:49:49.121616 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 52
01:49:49.156963 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:49:49.163503 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:49:49.176246 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 672
01:49:49.383876 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Ack, length 144
01:49:54.141959 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:49:54.386636 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Ack, length 64
01:49:59.122387 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 56
01:49:59.141458 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:04.391427 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Ack, length 44
01:50:09.123166 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 56
01:50:10.273924 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:12.877861 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 100
01:50:12.883817 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 392
01:50:15.261924 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:15.859647 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:17.853734 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:19.123934 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 56

However the receiver, a machine on the other side of the WDS link (i.e.
plugged into the WRT54GS) only receives on it's br-lan:

01:49:49.165441 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 52
01:49:49.201450 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:49:49.209237 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:49:49.227617 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 672
01:49:49.427871 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Ack, length 144
01:50:04.435092 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Ack, length 44
01:50:09.166864 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 56
01:50:10.318296 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:12.922271 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 100
01:50:12.929242 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 392
01:50:15.305692 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:15.903668 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:17.897930 IP 10.75.22.196  224.0.0.5: OSPFv2, LS-Update, length 64
01:50:19.167041 IP 10.75.22.196  224.0.0.5: OSPFv2, Hello, length 56

Clearly some of the sender's traffic did not make it to the receiving
WDS router's br-lan.

Any thoughts on why this is happening?

Any tips on how to further debug or a mailing list to take the issue to
if it's not OpenWRT specific?  Would the the netdev list be reasonable,
or is there a wireless specific netdev list somewhere that would be more
appropriate?

Cheers,
b.




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] whole_filesystem extroot not working with backfire-rc5-testing

2011-06-27 Thread Brian J. Murrell
I've created a whole_filesystem style extroot with the following commands:

# mkfs.ext3 /dev/sda1
# mount /dev/sda1 /mnt
# mkdir -p /tmp/cproot
# mount --bind / /tmp/cproot
# tar -C /tmp/cproot -cvf - . | tar -C /mnt -xf -
# umount /tmp/cproot
# umount /mnt

I've installed kmod-usb-storage kmod-fs-ext3 block-mount block-extroot
block-hotplug e2fsprogs and created an /etc/config/fstab:

config global automount
option from_fstab 1
option anon_mount 1

config global autoswap
option from_fstab 1
option anon_swap 0

config mount
option target   /mnt
option device   /dev/sda1
option fstype   ext3
option options  rw,sync
option enabled  1
option enabled_fsck 1
option is_rootfs 1

and yet the extroot is not being mounted at /, but rather /mnt (this was
the syntax prior to my upgrading to RC5).  If I change the target to
/, the mount table says it is mounted, but when I use df I see the
same usage values as the
/dev/root 2.1M  2.1M 0 100% /rom
mini_fo:/overlay  2.1M  2.1M 0 100% /

pair and files in / are from prior to the mount, not what is on /dev/sda1

Is this known to be broken or working in RC5?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] extroot not using overlay? (was Re : [OpenWrt] #8542: various hangs with extr oot (mini_fo) using ext4)

2011-01-03 Thread Brian J . Murrell
Stefan Monnier monnier at iro.umontreal.ca writes:
 
 I'm not sure there's a way to tell the difference: the overlay
 filesystem always uses a standard filesystem (e.g. can be ext3),

Understood.

 tho you
 could try and detect the presence of the special meta-files that the
 overlay system uses.

Indeed.

 I'm not sure it's worth the trouble: just like the
 previous poster, I've never seen a real reason why would this be
 better for extroot.

Well, for me the difference is whether the extroot device has the ability to 
stand-alone and not require anything of the flashed image('s root filesystem) 
or whether it's really supposed to be a union of what's on the flashed image 
and 
what changes have been made and as such, is dependent on the particular flashed 
image it was made to work on.

I want the flexibility of the former.  I want my extroot device to be the 
entire 
root filesystem of my system and not require a particular flashed image because 
it relies on files in the flashed image's root filesystem.

b.


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


[OpenWrt-Devel] [PATCH] udhcpc should honour the peerdns setting

2011-01-03 Thread Brian J. Murrell
If the configuration for a DHCP interface specifies to not use the
peer's DNS resolvers, this should be honoured by the udhcpc script.
This patch fixes this.

Signed-off-by: Brian J. Murrell brian at interlinx.bc.ca

Cheers,
b.

From 23ff12b2ef562c544c2d320cdb7cb93ce71c6c97 Mon Sep 17 00:00:00 2001
From: Brian J. Murrell br...@interlinx.bc.ca
Date: Mon, 3 Jan 2011 15:50:37 -0500
Subject: [PATCH] udhcpc should honour the peerdns setting

---
 .../files/usr/share/udhcpc/default.script  |   30 ++-
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/package/base-files/files/usr/share/udhcpc/default.script 
b/package/base-files/files/usr/share/udhcpc/default.script
index b614c45..e7e635f 100755
--- a/package/base-files/files/usr/share/udhcpc/default.script
+++ b/package/base-files/files/usr/share/udhcpc/default.script
@@ -82,20 +82,22 @@ setup_interface () {
[ -n $msstaticroutes ]  set_classless_routes $msstaticroutes
 
# DNS
-   old_dns=$(uci_get_state network $ifc dns)
-   old_domain=$(uci_get_state network $ifc dnsdomain)
-   user_dns=$(uci_get network.$ifc.dns)
-   [ -n $user_dns ]  dns=$user_dns
-
-   [ -n $dns ]  [ $dns != $old_dns -o -n $user_dns ]  {
-   echo udhcpc: setting dns servers: $dns
-   add_dns $ifc $dns
-
-   [ -n $domain ]  [ $domain != $old_domain ]  {
-   echo udhcpc: setting dns domain: $domain
-   sed -i -e ${old_domain:+/^search $old_domain$/d; 
}/^search $domain$/d ${RESOLV_CONF}
-   echo search $domain  ${RESOLV_CONF}
-   change_state network $ifc dnsdomain $domain
+   [ $peerdns -eq 1 ]  {
+   old_dns=$(uci_get_state network $ifc dns)
+   old_domain=$(uci_get_state network $ifc dnsdomain)
+   user_dns=$(uci_get network.$ifc.dns)
+   [ -n $user_dns ]  dns=$user_dns
+
+   [ -n $dns ]  [ $dns != $old_dns -o -n $user_dns ]  {
+   echo udhcpc: setting dns servers: $dns
+   add_dns $ifc $dns
+
+   [ -n $domain ]  [ $domain != $old_domain ]  {
+   echo udhcpc: setting dns domain: $domain
+   sed -i -e ${old_domain:+/^search 
$old_domain$/d; }/^search $domain$/d ${RESOLV_CONF}
+   echo search $domain  ${RESOLV_CONF}
+   change_state network $ifc dnsdomain $domain
+   }
}
}
 
-- 
1.7.1




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] add missing lsm script to shorewall-lite package

2011-01-01 Thread Brian J. Murrell
Per http://article.gmane.org/gmane.comp.embedded.openwrt.devel/7339
please find attached the referenced missing lsm_script.

Signed-off-by: Brian J. Murrell brian at interlinx.bc.ca

Cheers,
b.

From 3659aacef6ffcdf1e76685dd2c0403306e423296 Mon Sep 17 00:00:00 2001
From: Brian J. Murrell br...@interlinx.bc.ca
Date: Sat, 1 Jan 2011 12:26:43 -0500
Subject: [PATCH] add shorewall-lite lsm script

---
 net/shorewall-lite/Makefile |1 +
 net/shorewall-lite/files/lsm_script |   33 +
 2 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 net/shorewall-lite/files/lsm_script

diff --git a/net/shorewall-lite/Makefile b/net/shorewall-lite/Makefile
index 4e874ba..bc1ac86 100644
--- a/net/shorewall-lite/Makefile
+++ b/net/shorewall-lite/Makefile
@@ -58,6 +58,7 @@ define Package/shorewall-lite/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/shorewall-lite $(1)/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-lite $(1)/usr/share
$(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall-lite
+   $(INSTALL_BIN) ./files/lsm_script 
$(1)/etc/lsm/script.d/45_shorewall-lite
$(CP) $(PKG_INSTALL_DIR)/etc/shorewall-lite $(1)/etc
$(CP) ./files/vardir $(1)/etc/shorewall-lite
 endef
diff --git a/net/shorewall-lite/files/lsm_script 
b/net/shorewall-lite/files/lsm_script
new file mode 100644
index 000..f0ccb34
--- /dev/null
+++ b/net/shorewall-lite/files/lsm_script
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+STATE=${1}
+NAME=${2}
+CHECKIP=${3}
+DEVICE=${4}
+WARN_EMAIL=${5}
+REPLIED=${6}
+WAITING=${7}
+TIMEOUT=${8}
+REPLY_LATE=${9}
+CONS_RCVD=${10}
+CONS_WAIT=${11}
+CONS_MISS=${12}
+AVG_RTT=${13}
+
+if [ -f /usr/share/shorewall-lite/lib.base ]; then
+VARDIR=/var/lib/shorewall-lite
+STATEDIR=/etc/shorewall-lite
+else
+VARDIR=/var/lib/shorewall
+STATEDIR=/etc/shorewall
+fi
+
+[ -f ${STATEDIR}/vardir ]  . ${STATEDIR}/vardir
+
+[ ${STATE} = up ]  state=0 || state=1
+
+echo $state  ${VARDIR}/${DEVICE}.status
+
+/sbin/shorewall-lite restart -f  /var/log/lsm 21
+
+/sbin/shorewall-lite show routing  /var/log/lsm
-- 
1.7.1




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] extroot not using overlay? (was Re : [OpenWrt] #8542: various hangs with extroo t (mini_fo) using ext4)

2011-01-01 Thread Brian J . Murrell
Stefan Monnier monnier at iro.umontreal.ca writes: 
 
 As someone who uses an external root (tho using a hand-made patch
 rather than your extroot, mostly because your extroot came later),
 I don't want an overlay, but I indeed want a pivot_root rather than
 a chroot.

I have to echo Stefan's sentiments exactly.  I also use an extroot device, also 
with some hand-made patches (like Stefan, my patches pre-date the mainline 
extroot support), although I'd be more than happy to put them aside and use the 
mainline support -- if it supported real/stand-alone filesystems.  I currently 
use ext3 for example.

It also seems to me that extroot support should not be an either/or situation.  
I
have not looked at the extroot implementation as it currently exists, but I 
would
propose that the extroot feature should support both (overlay and stand-alone) 
and figure out which one to use on it's own.

Why not have the implementation look at what's on the extroot device and if 
it's 
an overlay filesystem format then execute the overlay codepath(s) and otherwise 
assume it's a standalone filesystem and mount it and pivot_root to it.

Cheers,
b.


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


[OpenWrt-Devel] [PATCH] add lsm package

2010-10-10 Thread Brian J. Murrell
This updates the lsm package in feeds/packages to 0.60.

It includes a shorewall-lite hook so that if one has lsm and
shorewall-lite installed, lsm will cycle shorewall-lite on a link
transition.

Signed-off-by: Brian J. Murrell brian at interlinx.bc.ca

From 30de624404fcf83e211b3d21bd891d3dd03e8e3e Mon Sep 17 00:00:00 2001
From: Brian J. Murrell br...@interlinx.bc.ca
Date: Sun, 10 Oct 2010 09:49:01 -0400
Subject: [PATCH 2/2] upgrade to 0.60

Upgrade to new upstream version 0.60.
Better handle the tarball extraction and target relocation.
New initscript using start-stop-daemon.
Enable the reopen reopen_on_enodev feature so that restarted PPP
interfaces are better tracked.
---
net/lsm/Makefile   |   12 
net/lsm/files/lsm.conf |1 +
net/lsm/files/lsm.init |   40 
3 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/net/lsm/Makefile b/net/lsm/Makefile
index 1aa3d2d..7fd0faa 100644
--- a/net/lsm/Makefile
+++ b/net/lsm/Makefile
@@ -8,15 +8,17 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=lsm
-PKG_VERSION:=0.53
+PKG_VERSION:=0.60
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://lsm.foobar.fi/download
-PKG_MD5SUM:=983911b434a3c649fcefdc99e6ea2f37
+PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116

include $(INCLUDE_DIR)/package.mk

+PKG_UNPACK +=  rmdir $(PKG_BUILD_DIR)  mv $(BUILD_DIR)/lsm
$(PKG_BUILD_DIR)
+
define Package/lsm
   SECTION:=net
   CATEGORY:=Network
@@ -34,12 +36,6 @@ define Package/lsm/conffiles
/etc/lsm/lsm.conf
endef

-define Build/Prepare
- $(call Build/Prepare/Default)
- rmdir $(PKG_BUILD_DIR)
- mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
-endef
-
define Build/Compile
echo sed -ie 's/\(CC)/mipsel-openwrt-linux-uclibc-gcc/g'
$(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf
index ce54cea..16f9d04 100644
--- a/net/lsm/files/lsm.conf
+++ b/net/lsm/files/lsm.conf
@@ -12,6 +12,7 @@
#debug=10
#debug=9
debug=8
+reopen_on_enodev=1

#
# Defaults for the connection entries
diff --git a/net/lsm/files/lsm.init b/net/lsm/files/lsm.init
index e9d3162..d1ca4ff 100644
--- a/net/lsm/files/lsm.init
+++ b/net/lsm/files/lsm.init
@@ -1,12 +1,44 @@
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
-START=50
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=lsm
+PROG=/usr/sbin/$NAME
+DESC=Link State Monitor
+PIDFILE=/var/run/lsm.pid
+START=45
+
+test -x $PROG || exit 0
+set -e

start() {
- lsm /etc/lsm/lsm.conf
+ echo -n Starting $DESC: $NAME
+ start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+
+ echo .
}

stop() {
- killall lsm
+ echo -n Stopping $DESC: $NAME
+ start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ echo .
}

+restart() {
+ echo -n Restarting $DESC: $NAME... 
+ start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ sleep 1
+ start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ echo done.
+}
+
+reload() {
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ echo -n Reloading $DESC configuration... 
+ start-stop-daemon -q -K -s HUP -p $PIDFILE -x $PROG
-- /etc/lsm/lsm.conf $PIDFILE
+ echo done.
+}
-- 
1.7.0.4




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] update shorewall-lite to 4.4.12.2

2010-10-10 Thread Brian J. Murrell
This simply updates shorewall-lite to the (at least near) current
4.4.12.2

Signed-off-by: Brian J. Murrell brian at interlinx.bc.ca

From ac83d42571620e02b8d4b55c550e34b05aea0f21 Mon Sep 17 00:00:00 2001
From: Brian J. Murrell br...@interlinx.bc.ca
Date: Tue, 14 Sep 2010 11:17:32 -0400
Subject: [PATCH 1/2] update shorewall-lite to 4.4.12.2

Include support for calling shorewall-lite from LSM to shorewall-lite
package.
---
 net/shorewall-lite/Makefile  |8 +---
 net/shorewall-lite/patches/100-hostname.patch|   11 ---
 net/shorewall-lite/patches/110-MODULESDIR.patch  |4 ++--
 net/shorewall-lite/patches/130-portability.patch |   20 
 4 files changed, 7 insertions(+), 36 deletions(-)
 delete mode 100644 net/shorewall-lite/patches/100-hostname.patch
 delete mode 100644 net/shorewall-lite/patches/130-portability.patch

diff --git a/net/shorewall-lite/Makefile b/net/shorewall-lite/Makefile
index c0be483..bc1ac86 100644
--- a/net/shorewall-lite/Makefile
+++ b/net/shorewall-lite/Makefile
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-lite
-PKG_VERSION:=4.4.5.4
-PKG_DIRECTORY:=4.4.5
+PKG_VERSION:=4.4.12.2
+PKG_DIRECTORY:=4.4.12
 PKG_RELEASE:=1
 
 
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/
 \
@@ -20,7 +20,7 @@ 
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIREC

http://shorewall.infohiiway.com/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \

http://www.shorewall.com.ar/pub/shorewall/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=3e8fb21ccff0f2c7503d8c3bf8607dd7
+PKG_MD5SUM:=b030e988c36fc1ef8c0e27447faef2a6
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,6 +49,7 @@ endef
 define Package/shorewall-lite/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DIR) $(1)/etc/lsm/script.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/etc/shorewall-lite
$(INSTALL_DIR) $(1)/usr/share
@@ -57,6 +58,7 @@ define Package/shorewall-lite/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/shorewall-lite $(1)/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-lite $(1)/usr/share
$(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall-lite
+   $(INSTALL_BIN) ./files/lsm_script 
$(1)/etc/lsm/script.d/45_shorewall-lite
$(CP) $(PKG_INSTALL_DIR)/etc/shorewall-lite $(1)/etc
$(CP) ./files/vardir $(1)/etc/shorewall-lite
 endef
diff --git a/net/shorewall-lite/patches/100-hostname.patch 
b/net/shorewall-lite/patches/100-hostname.patch
deleted file mode 100644
index 97907fe..000
--- a/net/shorewall-lite/patches/100-hostname.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/shorewall-lite
-+++ b/shorewall-lite
-@@ -153,7 +153,7 @@
- 
- export VERBOSE
- 
--[ -n ${HOSTNAME:=$(hostname)} ]
-+[ -n ${HOSTNAME:=$(${SHAREDIR}/hostname)} ]
- 
- }
- 
diff --git a/net/shorewall-lite/patches/110-MODULESDIR.patch 
b/net/shorewall-lite/patches/110-MODULESDIR.patch
index 08afb67..a947709 100644
--- a/net/shorewall-lite/patches/110-MODULESDIR.patch
+++ b/net/shorewall-lite/patches/110-MODULESDIR.patch
@@ -1,5 +1,5 @@
 a/lib.base
-+++ b/lib.base
+--- a/lib.common
 b/lib.common
 @@ -220,7 +220,7 @@ reload_kernel_modules() {
  
  [ -z $MODULESDIR ]  \
diff --git a/net/shorewall-lite/patches/130-portability.patch 
b/net/shorewall-lite/patches/130-portability.patch
deleted file mode 100644
index 3bf7de2..000
--- a/net/shorewall-lite/patches/130-portability.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/install.sh
-+++ b/install.sh
-@@ -295,13 +295,15 @@ cd manpages
- 
- for f in *.5; do
- gzip -c $f  $f.gz
--run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
-+run_install -d ${PREFIX}/usr/share/man/man5
-+run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
- echo Man page $f.gz installed to ${PREFIX}/usr/share/man/man5/$f.gz
- done
- 
- for f in *.8; do
- gzip -c $f  $f.gz
--run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
-+run_install -d ${PREFIX}/usr/share/man/man8
-+run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
- echo Man page $f.gz installed to ${PREFIX}/usr/share/man/man8/$f.gz
- done
- 
-- 
1.7.0.4




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] add lsm package

2010-10-10 Thread Brian J. Murrell
On Sun, 2010-10-10 at 10:10 -0400, Brian J. Murrell wrote: 
 This updates the lsm package in feeds/packages to 0.60.

This copy doesn't have lines wrapped as the previous copy did,
unfortunately.

 It includes a shorewall-lite hook so that if one has lsm and
 shorewall-lite installed, lsm will cycle shorewall-lite on a link
 transition.
 
 Signed-off-by: Brian J. Murrell brian at interlinx.bc.ca

From 30de624404fcf83e211b3d21bd891d3dd03e8e3e Mon Sep 17 00:00:00 2001
From: Brian J. Murrell br...@interlinx.bc.ca
Date: Sun, 10 Oct 2010 09:49:01 -0400
Subject: [PATCH 2/2] upgrade to 0.60

Upgrade to new upstream version 0.60.
Better handle the tarball extraction and target relocation.
New initscript using start-stop-daemon.
Enable the reopen reopen_on_enodev feature so that restarted PPP
interfaces are better tracked.
---
 net/lsm/Makefile   |   12 
 net/lsm/files/lsm.conf |1 +
 net/lsm/files/lsm.init |   40 
 3 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/net/lsm/Makefile b/net/lsm/Makefile
index 1aa3d2d..7fd0faa 100644
--- a/net/lsm/Makefile
+++ b/net/lsm/Makefile
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lsm
-PKG_VERSION:=0.53
+PKG_VERSION:=0.60
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://lsm.foobar.fi/download
-PKG_MD5SUM:=983911b434a3c649fcefdc99e6ea2f37
+PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116
 
 include $(INCLUDE_DIR)/package.mk
 
+PKG_UNPACK +=  rmdir $(PKG_BUILD_DIR)  mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
+
 define Package/lsm
   SECTION:=net
   CATEGORY:=Network
@@ -34,12 +36,6 @@ define Package/lsm/conffiles
 /etc/lsm/lsm.conf
 endef
 
-define Build/Prepare
-   $(call Build/Prepare/Default)
-   rmdir $(PKG_BUILD_DIR)
-   mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
-endef
-
 define Build/Compile
echo sed -ie 's/\(CC)/mipsel-openwrt-linux-uclibc-gcc/g' 
$(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf
index ce54cea..16f9d04 100644
--- a/net/lsm/files/lsm.conf
+++ b/net/lsm/files/lsm.conf
@@ -12,6 +12,7 @@
 #debug=10
 #debug=9
 debug=8
+reopen_on_enodev=1
 
 #
 # Defaults for the connection entries
diff --git a/net/lsm/files/lsm.init b/net/lsm/files/lsm.init
index e9d3162..d1ca4ff 100644
--- a/net/lsm/files/lsm.init
+++ b/net/lsm/files/lsm.init
@@ -1,12 +1,44 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
-START=50
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=lsm
+PROG=/usr/sbin/$NAME
+DESC=Link State Monitor
+PIDFILE=/var/run/lsm.pid
+START=45
+
+test -x $PROG || exit 0
+set -e
 
 start() {
-   lsm /etc/lsm/lsm.conf
+   echo -n Starting $DESC: $NAME
+   start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf 
$PIDFILE
+
+   echo .
 }
 
 stop() {
-   killall lsm
+   echo -n Stopping $DESC: $NAME
+   start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf 
$PIDFILE
+   echo .
 }
 
+restart() {
+   echo -n Restarting $DESC: $NAME... 
+   start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf 
$PIDFILE
+   sleep 1
+   start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf 
$PIDFILE
+   echo done.
+}
+
+reload() {
+   #
+   #   If the daemon can reload its config files on the fly
+   #   for example by sending it SIGHUP, do it here.
+   #
+   #   If the daemon responds to changes in its config file
+   #   directly anyway, make this a do-nothing entry.
+   #
+   echo -n Reloading $DESC configuration... 
+   start-stop-daemon -q -K -s HUP -p $PIDFILE -x $PROG -- 
/etc/lsm/lsm.conf $PIDFILE
+   echo done.
+}
-- 
1.7.0.4




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] add lsm package

2010-10-08 Thread Brian J . Murrell
Brian J. Murrell brian at interlinx.bc.ca writes:
 
 This adds the lsm package to feeds/packages.

I saw neither an ACK nor a NAK, nor do I see any sign that this was committed.

Was there a problem with the submission or the patch itself?

It's really quite discouraging to go to all the effort to simply have your 
submission ignored.

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


Re: [OpenWrt-Devel] [PATCH] update shorewall-lite to 4.4.12.2

2010-10-08 Thread Brian J . Murrell
Brian J. Murrell brian at interlinx.bc.ca writes:
 
 This simply updates shorewall-lite to the current 4.4.12.2

I saw neither an ACK nor a NAK, nor do I see any sign that this was committed.

Was there a problem with the submission or the patch itself?

It's really quite discouraging to go to all the effort to simply have your 
submission ignored.

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


[OpenWrt-Devel] strace doesn't follow children

2010-10-08 Thread Brian J . Murrell
I'm back on openwrt r18617 (kernel 2.6.30.9 and yes, I know, old, but if it 
ain't broke...) but I have noticed on all previous kernels too, that strace 
doesn't follow child processes, even with -f specified.

i.e.:

fcntl(5, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK)= 0
connect(5, {sa_family=AF_FILE, path=/dev/log...}, 16) = 0
time([0])   = 1286540362
open(/etc/TZ, O_RDONLY)   = 6
read(6, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 68) = 23
read(6, ..., 45)  = 0
close(6)= 0
getpid()= 1232
write(5, 
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 53) = 
53
rt_sigaction(SIGPIPE, {SIG_DFL, ~[HUP INT QUIT EMT FPE SYS PIPE URG STOP CONT 
TTOU PROF XFSZ RT_0 RT_1 RT_2 RT_3 RT_4 RT_5 RT_6 RT_7 RT_8 RT_9 RT_10 RT_11 
RT_12 RT_13 RT_14 RT_15 RT_16 RT_17 RT_18 RT_19 RT_20 RT_21 RT_22 RT_23 RT_24 
RT_25 RT_26 RT_27 RT_28 RT_29 RT_30 RT_31 RT_32 RT_33 RT_34 RT_35 RT_39 RT_40 
RT_44 RT_45 RT_53 RT_55 RT_57 RT_59 RT_61 RT_63 RT_64 RT_65 RT_66 RT_67 RT_68 
RT_69 RT_70 RT_71 RT_72 RT_73 RT_74 RT_75 RT_76 RT_77 RT_78 RT_79 RT_80 RT_81 
RT_82 RT_83 RT_84 RT_85 RT_86 RT_87 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93 RT_94], 
0}, NULL, 16) = 0
stat(/etc/lsm/script, {st_mode=0, st_size=2145856280, ...}) = 0
fork(Process 1267 attached
)  = 1267
[pid  1232] wait4(-1, Process 1232 suspended

and that's it.  Nothing from process 1267.

Is this known and/or fixed in more recent releases?

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


[OpenWrt-Devel] [PATCH] update shorewall-lite to 4.4.12.2

2010-09-14 Thread Brian J. Murrell
This simply updates shorewall-lite to the current 4.4.12.2

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca


commit e7981dff0dfe18ed56d7b6a394b580cea36e2841
Author: Brian J. Murrell br...@interlinx.bc.ca
Date:   Tue Sep 14 11:17:32 2010 -0400

update shorewall-lite to 4.4.12.2

diff --git a/net/shorewall-lite/Makefile b/net/shorewall-lite/Makefile
index c0be483..8c4ed05 100644
--- a/net/shorewall-lite/Makefile
+++ b/net/shorewall-lite/Makefile
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-lite
-PKG_VERSION:=4.4.5.4
-PKG_DIRECTORY:=4.4.5
+PKG_VERSION:=4.4.12.2
+PKG_DIRECTORY:=4.4.12
 PKG_RELEASE:=1
 
 
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/
 \
@@ -20,7 +20,7 @@ 
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIREC

http://shorewall.infohiiway.com/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \

http://www.shorewall.com.ar/pub/shorewall/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=3e8fb21ccff0f2c7503d8c3bf8607dd7
+PKG_MD5SUM:=b030e988c36fc1ef8c0e27447faef2a6
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/shorewall-lite/patches/100-hostname.patch 
b/net/shorewall-lite/patches/100-hostname.patch
deleted file mode 100644
index 97907fe..000
--- a/net/shorewall-lite/patches/100-hostname.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/shorewall-lite
-+++ b/shorewall-lite
-@@ -153,7 +153,7 @@
- 
- export VERBOSE
- 
--[ -n ${HOSTNAME:=$(hostname)} ]
-+[ -n ${HOSTNAME:=$(${SHAREDIR}/hostname)} ]
- 
- }
- 
diff --git a/net/shorewall-lite/patches/110-MODULESDIR.patch 
b/net/shorewall-lite/patches/110-MODULESDIR.patch
index 08afb67..a947709 100644
--- a/net/shorewall-lite/patches/110-MODULESDIR.patch
+++ b/net/shorewall-lite/patches/110-MODULESDIR.patch
@@ -1,5 +1,5 @@
 a/lib.base
-+++ b/lib.base
+--- a/lib.common
 b/lib.common
 @@ -220,7 +220,7 @@ reload_kernel_modules() {
  
  [ -z $MODULESDIR ]  \
diff --git a/net/shorewall-lite/patches/130-portability.patch 
b/net/shorewall-lite/patches/130-portability.patch
deleted file mode 100644
index 3bf7de2..000
--- a/net/shorewall-lite/patches/130-portability.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/install.sh
-+++ b/install.sh
-@@ -295,13 +295,15 @@ cd manpages
- 
- for f in *.5; do
- gzip -c $f  $f.gz
--run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
-+run_install -d ${PREFIX}/usr/share/man/man5
-+run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
- echo Man page $f.gz installed to ${PREFIX}/usr/share/man/man5/$f.gz
- done
- 
- for f in *.8; do
- gzip -c $f  $f.gz
--run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
-+run_install -d ${PREFIX}/usr/share/man/man8
-+run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
- echo Man page $f.gz installed to ${PREFIX}/usr/share/man/man8/$f.gz
- done
- 



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] add lsm package

2010-09-14 Thread Brian J. Murrell
This adds the lsm package to feeds/packages.

It includes a shorewall-lite hook so that if one has lsm and
shorewall-lite installed, lsm will cycle shorewall-lite on a link
transition.

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca


commit ead559262149c4d2d625fda0bb100ea6bd8a7871
Author: Brian J. Murrell br...@interlinx.bc.ca
Date:   Tue Sep 14 11:18:09 2010 -0400

add lsm 0.53 to feeds/packages

include support for calling shorewall-lite from LSM to shorewall-lite
package

diff --git a/net/lsm/Makefile b/net/lsm/Makefile
new file mode 100644
index 000..c970fc3
--- /dev/null
+++ b/net/lsm/Makefile
@@ -0,0 +1,58 @@
+# 
+# Copyright (C) 2006 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:=lsm
+PKG_VERSION:=0.53
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://lsm.foobar.fi/download
+PKG_MD5SUM:=983911b434a3c649fcefdc99e6ea2f37
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lsm
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=A link state monitor
+  URL:=http://lsm.foobar.fi/
+endef
+
+define Package/lsm/description
+   lsm is a link state monitor for carrying out actions when a link 
+   transistions from the up to down state or vice versa.
+endef
+
+define Package/lsm/conffiles
+/etc/lsm/lsm.conf
+endef
+
+define Build/Prepare
+   $(call Build/Prepare/Default)
+   rmdir $(PKG_BUILD_DIR)
+   mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+   echo sed -ie 's/\(CC)/mipsel-openwrt-linux-uclibc-gcc/g' 
$(PKG_BUILD_DIR)/Makefile
+   $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
+endef
+
+define Package/lsm/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsm $(1)/usr/sbin/
+   $(INSTALL_DIR) $(1)/etc/lsm
+   $(INSTALL_DIR) $(1)/etc/lsm/script.d
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DATA) ./files/lsm.conf $(1)/etc/lsm/lsm.conf
+   $(INSTALL_BIN) ./files/lsm_script $(1)/etc/lsm/script
+   $(INSTALL_BIN) ./files/lsm.init $(1)/etc/init.d/lsm
+endef
+
+$(eval $(call BuildPackage,lsm))
diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf
new file mode 100644
index 000..74ab7ad
--- /dev/null
+++ b/net/lsm/files/lsm.conf
@@ -0,0 +1,42 @@
+
+#
+# (C) 2009 Mika Ilmaranta il...@nullnet.fi
+#
+# License: GPLv2
+#
+
+#
+# Debug level: 0 .. 8 are normal, 9 gives lots of stuff and 100 doesn't
+# bother to detach
+#
+#debug=10
+#debug=9
+debug=8
+
+#
+# Defaults for the connection entries
+#
+defaults {
+  name=defaults
+  checkip=127.0.0.1
+  eventscript=/etc/lsm/script
+  max_packet_loss=15
+  max_successive_pkts_lost=7
+  min_packet_loss=5
+  min_successive_pkts_rcvd=10
+  interval_ms=2000
+  timeout_ms=2000
+  warn_email=root
+  check_arp=0
+  sourceip=
+# if using ping probes for monitoring only then defaults should
+# not define a default device for packets to autodiscover their path
+# to destination
+#  device=eth0
+# use system default ttl
+  ttl=0
+}
+
+include /etc/lsm/connections.conf
+
+#EOF
diff --git a/net/lsm/files/lsm.init b/net/lsm/files/lsm.init
new file mode 100644
index 000..e9d3162
--- /dev/null
+++ b/net/lsm/files/lsm.init
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=50
+
+start() {
+   lsm /etc/lsm/lsm.conf
+}
+
+stop() {
+   killall lsm
+}
+
diff --git a/net/lsm/files/lsm_script b/net/lsm/files/lsm_script
new file mode 100644
index 000..b701c34
--- /dev/null
+++ b/net/lsm/files/lsm_script
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+# (C) 2009 Mika Ilmaranta il...@nullnet.fi
+#
+# License: GPLv2
+#
+
+#
+# default event handling script
+#
+
+DATE=$(/bin/date)
+
+STATE=${1}
+NAME=${2}
+CHECKIP=${3}
+DEVICE=${4}
+WARN_EMAIL=${5}
+REPLIED=${6}
+WAITING=${7}
+TIMEOUT=${8}
+REPLY_LATE=${9}
+CONS_RCVD=${10}
+CONS_WAIT=${11}
+CONS_MISS=${12}
+AVG_RTT=${13}
+
+cat EOM | mail -s LSM: ${NAME} ${STATE}, IP ${CHECKIP} ${WARN_EMAIL}
+
+Hi,
+
+Your connection ${NAME} has changed it's state to ${STATE} at ${DATE}.
+
+Following parameters were passed:
+newstate = ${STATE}
+name = ${NAME}
+checkip  = ${CHECKIP}
+device   = ${DEVICE}
+warn_email   = ${WARN_EMAIL}
+
+Packet statuses:
+replied  = ${REPLIED} packets replied
+waiting  = ${WAITING} packets waiting for reply
+timeout  = ${TIMEOUT} packets that have timeout (= packet loss)
+reply_late   = ${REPLY_LATE} packets that received a reply after timeout
+cons_rcvd= ${CONS_RCVD} consecutively received replies in sequence
+cons_wait= ${CONS_WAIT} consecutive packets waiting for reply
+cons_miss= ${CONS_MISS} consecutive packets that have timed out
+avg_rtt  = ${AVG_RTT} average rtt [usec], calculated from received packets
+
+BR,
+Your LSM installation
+
+EOM
+
+cd /etc/lsm/script.d/
+for script in $(ls); do
+if [ ! -x $script

Re: [OpenWrt-Devel] [PATCH] Preinit, mount_root, firstboot modularization, complete

2010-02-19 Thread Brian J. Murrell
On Sun, 2010-01-24 at 09:59 -0800, Marc Abrams wrote:
 Brian:

Hi Marc, 
 An earlier version of Dan's work has been extensively tested for a
 service provider auto-configuration and management application and
 works very well.

Excellent!

 The changes made are for more flexibility and extensibility and to
 support other architectures. 

Great!

 I think you will find that it's implemented correctly.

Yeah, it certainly looks like a good implementation.  I just didn't want
to give an wrong impression that I had reviewed the code in any detail.

Let's get 'er landed then!  Is there anything holding that up?

b.




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Preinit, mount_root, firstboot modularization, complete

2010-01-24 Thread Brian J. Murrell
On Sat, 2010-01-23 at 02:56 -0500, Daniel Dickinson wrote: 
 Hi all,

Hi,

 Just a reminder of what it is:
 
 It modularizes preinit, mount_root, and firstboot.  This is done so that
 the boot system can be modified by drop-in packages (e.g. usbroot-*,
 enhanced failsafe, and provider provisioning).  I have already created
 versions of usb on rootfs and provider provisioning (load configuration
 from server) for previous versions of this concept, and will be working
 on updated versions of the usb on rootfs next.

I just want to give a big yeah to this concept.  I don't know how
correctly it has been implemented, but I really (and mean really!) love
the concept.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] syslog-ng should log kernel messages as well

2010-01-03 Thread Brian J. Murrell
[ Second try as the first was not committed ]

If you want to use syslog-ng, likely you want to also log the kernel
messages with it.  This patch adds that.

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca

---

Index: files/syslog-ng.conf
===
--- files/syslog-ng.conf(revision 18617)
+++ files/syslog-ng.conf(working copy)
@@ -10,7 +10,8 @@
 };
 
 source src { unix-stream(/dev/log); internal(); };
+source kernel { pipe(/proc/kmsg log_prefix(kernel: )); };
 
 destination messages { file(/var/log/messages); };
 
-log { source(src); destination(messages); };
+log { source(src); source(kernel); destination(messages); };



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


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] skip hotplug/iface processing during boot

2009-12-30 Thread Brian J. Murrell
As you all know, when an openwrt router is booting, many iface hotplug
events are generated for all of the interfaces that are coming up.

If I had an action that I generally wanted to do (i.e. reload
firewall/routing configure) in response to interface transition events,
an /etc/hotplug.d/iface script seems ideal.  However such an action does
cause quite a storm during an initial boot.

Ideally, I'd like to skip processing this particular action during
iface up events that are the cause of a system boot but allow them to
run otherwise.

Any thoughts on how I could achieve that?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ePoint HotSpot package

2009-12-21 Thread Brian J. Murrell
On Mon, 2009-12-21 at 06:32 +0100, Daniel A. Nagy wrote: 
 Hello,

Hi Daniel,

 Well, only the three packages together, including their OpenWrt Makefiles (but
 excluding the sources of qrencode library). I haven't made any attempts at
 making the software portable beyond OpenWrt; right now it is very
 OpenWrt-specific and I don't see that changing.

A.  I see.  That's quite a different story than most packages then.

 That is an interesting question and honestly, I have never considered it, 
 since
 our software does not make much sense outside of the context of OpenWrt.

Yes.  I see.  I was not aware of this.  So given that you maintain your
software in the context of OpenWRT, perhaps a full source inclusion is
the better way to go.

 As I have mentioned, our software is very OpenWrt-specific. We, as a company,
 are perfectly willing to maintain it within the framework of OpenWrt with 
 either
 myself or the developer (his name is Rooslan Khayrov), who actually wrote most
 of the code, acting as the package maintainer.

Fair enough then.

 Of course, the above does not hold for the Code128 barcode stuff, which I am
 perfectly prepared to rip out into a separate source tarball. But what would 
 you
 recommend with the rest that is entirely dependent on OpenWrt?

I'd probably be fine with it remaining in full source, but I am not a
maintainer here, so somebody who is will have to step up and make that
decision.

 Thanks in advance for your suggestions!

NP.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ePoint HotSpot package

2009-12-20 Thread Brian J. Murrell
On Mon, 2009-12-21 at 01:28 +0100, Daniel A. Nagy wrote: 
 I would like to contribute a package to OpenWrt that we have developed and
 successfully use commercially.

It appears that your patch is the entire source from your project, yes?
Is your software distributed as a tarball release in usual open source
fashion as well?

As you may have noticed, many packages are made of a Makefile that
points to a downloadable tarball of a package (i.e. rather than
including the whole source), some rules on how to build the package
after unpacking the tarball and possibly some patches that need to be
applied after unpacking but prior to build.

I think the benefit to this method is that you don't have to try to get
the openwrt devs to push changes you make in your source all the time
but rather just changes to the currently released version pointed to in
the Makefile.

Would that suit your package better perhaps?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] syslog-ng should log kernel messages as well

2009-12-14 Thread Brian J. Murrell
On Mon, 2009-12-14 at 10:41 +0200, Vasilis Tsiligiannis wrote: 
 Hello Brian,

Hi Vasilis,

  -log { source(src); destination(messages); };
  +log { source(src); source(kernel); destination(syslog_server); };
 
 Correct me if I am wrong: shouldn't there be a destination syslog_server 
 {...}; also present in the config? Or just send them to messages destination 
 which already exists?

Doh!  More than I wanted leaked into that patch.  I do use a syslog
server here, but I am not convinced that logging to a syslog server was
a reasonable default so didn't include the destination syslog_server.
But of course I forgot to change the destination(syslog_server) back
to destination(messages).  Find below a new, cleaner patch.

P.S. what really needs to happen is for the syslog-ng.conf file to be
uci-ized (i.e. generated a run time based on UCI configuration).  I
don't really have time for that at the moment though.  :-(

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca

---

Index: files/syslog-ng.conf
===
--- files/syslog-ng.conf(revision 18617)
+++ files/syslog-ng.conf(working copy)
@@ -10,7 +10,8 @@
 };
 
 source src { unix-stream(/dev/log); internal(); };
+source kernel { pipe(/proc/kmsg log_prefix(kernel: )); };
 
 destination messages { file(/var/log/messages); };
 
-log { source(src); destination(messages); };
+log { source(src); source(kernel); destination(messages); };




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] syslog-ng should log kernel messages as well

2009-12-14 Thread Brian J. Murrell
On Mon, 2009-12-14 at 11:16 +0100, edgar.sol...@web.de wrote: 
 
 the syslog-ng manual also states
 
 page 38
[ details about klogd snipped ]

 and about the use of pipe on Page 39
 Pipe is very similar to the file() driver, but there are a few 
 differences, for example pipe() opens its argument
 in read-write mode, therefore it is not recommended to be used on 
 special files like /proc/kmsg.

But then the FAQ contradicts this with it's expanded
syslog-ng.conf (http://www.campin.net/syslog-ng/expanded-syslog-ng.conf) where 
it uses:

source s_kernel 
{ pipe(/proc/kmsg log_prefix(kernel: )); };

And then contradict themselves yet again with:

  * I want to replace syslogd *and* klogd on my Linux box with
syslog-ng.

Use a source line like this in your conf file to read kernel
messages, too. 

source src { file(/proc/kmsg); unix-stream(/dev/log); internal(); };

in http://www.campin.net/syslog-ng/faq.html#klogd

 therefore I am not sure if enabling logging kernel messages without 
 disabling klogd is a good idea.

Of course.  I don't use klogd here.  Perhaps the packaging of syslog-ng
should be such that it's mutually exclusive of whatever provides klogd,
although I am not sure which package that is given that I don't use it
here.  :-)  I'm also unsure if the ipk format allows the specification
of conflicts.

 Also you should use file() and of course 
 add it to the log declaration.

Well, the package authors themselves seem to use file and pipe
with /proc/kmsg quite interchangeably.  I think I'd like to see more
clarification before I change what I think has been the historical use
case.

Of course, you can go ahead and submit a patch to change it yourself if
you like, but using pipe() is working plenty fine here and I log plenty
of kernel messages (i.e. every firewall exception and there are tons).

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] libipt_set is no longer packaged

2009-12-14 Thread Brian J. Murrell
Per ticket #6327 (which as thus far not been updated in any manner):

I cannot find libipt_set packaged any package any more.  It seems that
changeset 18032 (by nico) made some changes for ipsets and failed to
take this into consideration.

I have tried to resolve it but I am not sure of the proper resolution.
Could somebody please investigate this?

Thanx,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] my patches being ignored?

2009-12-10 Thread Brian J. Murrell
Is there any reason in particular that my patches to this list are being
ignored?  I thought it was everyone's but I saw some commits today, yet
not my patches which were sent here prior the patches that were
committed today.

This seems to be my (and others from messages I have seen posted here in
the past) history with this list.  I take the time to make and send
patches and they get ignored despite others' being committed.  It's
really quite discouraging to contribute to a project only to have one's
contribution ignored.

If there is something wrong with my patches, would somebody please tell
me what it is rather than simply ignoring them?  Ignoring mistakes won't
get them corrected.

Thanx for your time and attention.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Update shorewall-lite to latest 4.2 release

2009-12-07 Thread Brian J. Murrell
This is a patch to shorewall-lite to update it to the latest release in
the 4.2 series: 4.2.11.  It also includes the following changes:

  * use the shorewall restore action (very quick) if available in
the initscript's restart action 
  * modify the 110-MODULESDIR.patch to include /lib/modules/$(uname
-r) in the module search path 
  * include an iface hotplug action to reload the ruleset on
interface transitions

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca

---

Index: net/shorewall-lite/files/shorewall-lite.init
===
--- net/shorewall-lite/files/shorewall-lite.init(revision 18617)
+++ net/shorewall-lite/files/shorewall-lite.init(working copy)
@@ -12,5 +12,9 @@
 }
 
 restart() {
-   /sbin/shorewall-lite -qq restart
+   if [ -f /etc/shorewall-lite/state/restore ] ; then
+   /sbin/shorewall-lite -qq restore
+   else
+   /sbin/shorewall-lite -qq restart
+   fi
 }
Index: net/shorewall-lite/patches/110-MODULESDIR.patch
===
--- net/shorewall-lite/patches/110-MODULESDIR.patch (revision 18617)
+++ net/shorewall-lite/patches/110-MODULESDIR.patch (working copy)
@@ -1,20 +1,20 @@
 --- a/lib.base
 +++ b/lib.base
-@@ -251,7 +251,7 @@
+@@ -267,7 +267,7 @@
  
- [ -n ${MODULE_SUFFIX:=o gz ko o.gz ko.gz} ]
+ [ -z $MODULESDIR ]  \
+   uname=$(uname -r)  \
+-  
MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
++  
MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
  
--[ -z $MODULESDIR ]  MODULESDIR=/lib/modules/$(uname 
-r)/kernel/net/ipv4/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter
-+[ -z $MODULESDIR ]  MODULESDIR=/lib/modules/$(uname 
-r)/kernel/net/ipv4/netfilter:/lib/modules/$(uname 
-r)/kernel/net/netfilter:/lib/modules/$(uname -r)
  MODULES=$(lsmod | cut -d ' ' -f1)
  
- for directory in $(split $MODULESDIR); do
-@@ -283,7 +283,7 @@
- [ -n ${MODULE_SUFFIX:=o gz ko o.gz ko.gz} ]
+@@ -306,7 +306,7 @@
  
  [ -z $MODULESDIR ]  \
--  MODULESDIR=/lib/modules/$(uname 
-r)/kernel/net/ipv4/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter
-+  MODULESDIR=/lib/modules/$(uname 
-r)/kernel/net/ipv4/netfilter:/lib/modules/$(uname 
-r)/kernel/net/netfilter:/lib/modules/$(uname -r)
+   uname=$(uname -r)  \
+-  
MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
++  
MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname
  
  for directory in $(split $MODULESDIR); do
[ -d $directory ]  moduledirectories=$moduledirectories $directory
Index: net/shorewall-lite/Makefile
===
--- net/shorewall-lite/Makefile (revision 18617)
+++ net/shorewall-lite/Makefile (working copy)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-lite
-PKG_VERSION:=4.0.12
+PKG_VERSION:=4.2.11
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/
 \
-   http://www1.shorewall.net/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/ \
-   
http://slovakia.shorewall.net/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/ \
-   http://shorewall.de/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/ \
-   http://www.shorewall.com.au/4.0/shorewall-$(PKG_VERSION)/ \
-   
http://shorewall.infohiiway.com/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/ \
-   
http://www.shorewall.com.ar/pub/shorewall/shorewall/4.0/shorewall-$(PKG_VERSION)/
+PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION)/
 \
+   http://www1.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION)/ \
+   
http://slovakia.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION)/ \
+   http://shorewall.de/pub/shorewall/4.2/shorewall-$(PKG_VERSION)/ \
+   http://www.shorewall.com.au/4.2/shorewall-$(PKG_VERSION)/ \
+   
http://shorewall.infohiiway.com/pub/shorewall/4.2/shorewall-$(PKG_VERSION)/ \
+   
http://www.shorewall.com.ar/pub/shorewall/shorewall/4.2/shorewall-$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=ab82b03f987f69536d305db40dc7692c
+PKG_MD5SUM:=cb34824f076fdff6b7457d85e124ea74
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -50,9 +50,11 @@
 define Package/shorewall-lite/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR

[OpenWrt-Devel] [PATCH] Add shorewall6-lite

2009-12-07 Thread Brian J. Murrell
This patch adds shorewall6-lite.

Signed-off-by: Brian J. Murrell br...@interlinx.bc.ca

---

diff --exclude .svn -urN /tmp/empty/files/hostname 
ipv6/shorewall6-lite/files/hostname
--- /tmp/empty/files/hostname   1969-12-31 19:00:00.0 -0500
+++ ipv6/shorewall6-lite/files/hostname 2008-11-11 01:22:55.0 -0500
@@ -0,0 +1,2 @@
+#!/bin/sh
+cat /proc/sys/kernel/hostname
diff --exclude .svn -urN /tmp/empty/files/hotplug_iface 
ipv6/shorewall6-lite/files/hotplug_iface
--- /tmp/empty/files/hotplug_iface  1969-12-31 19:00:00.0 -0500
+++ ipv6/shorewall6-lite/files/hotplug_iface2009-05-13 09:49:47.0 
-0400
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# should restart shorewall when an interface comes up
+
+[ ifup = $ACTION ]  {
+   /etc/init.d/shorewall6-lite restart
+}
+
+[ ifdown = $ACTION ]  {
+   # might need to restore some routing
+   /etc/init.d/shorewall6-lite restart
+}
diff --exclude .svn -urN /tmp/empty/files/shorewall-lite.init 
ipv6/shorewall6-lite/files/shorewall-lite.init
--- /tmp/empty/files/shorewall-lite.init1969-12-31 19:00:00.0 
-0500
+++ ipv6/shorewall6-lite/files/shorewall-lite.init  2009-05-13 
09:49:15.0 -0400
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+
+START=46
+start() {
+   touch /var/log/messages
+   mkdir -p /var/lock/subsys
+   /sbin/shorewall6-lite -qq start -f
+}
+
+stop() {
+   /sbin/shorewall6-lite -qq stop
+}
+
+restart() {
+   if [ -f /etc/shorewall6-lite/state/restore ] ; then
+   /sbin/shorewall6-lite -qq restore
+   else
+   /sbin/shorewall6-lite -qq restart
+   fi
+}
diff --exclude .svn -urN /tmp/empty/files/vardir 
ipv6/shorewall6-lite/files/vardir
--- /tmp/empty/files/vardir 1969-12-31 19:00:00.0 -0500
+++ ipv6/shorewall6-lite/files/vardir   2009-05-13 09:49:36.0 -0400
@@ -0,0 +1,2 @@
+# move state dir out of ram
+VARDIR=/etc/shorewall6-lite/state
diff --exclude .svn -urN /tmp/empty/Makefile ipv6/shorewall6-lite/Makefile
--- /tmp/empty/Makefile 1969-12-31 19:00:00.0 -0500
+++ ipv6/shorewall6-lite/Makefile   2009-12-06 13:38:25.0 -0500
@@ -0,0 +1,66 @@
+# 
+# Copyright (C) 2008 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:=shorewall6-lite
+PKG_VERSION:=4.2.11.2
+PKG_VERSION_DIR:=4.2.11
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/
 \
+   
http://www1.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/ \
+   
http://slovakia.shorewall.net/pub/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/ \
+   http://shorewall.de/pub/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/ \
+   http://www.shorewall.com.au/4.2/shorewall-$(PKG_VERSION_DIR)/ \
+   
http://shorewall.infohiiway.com/pub/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/ 
\
+   
http://www.shorewall.com.ar/pub/shorewall/shorewall/4.2/shorewall-$(PKG_VERSION_DIR)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=ade665881a4bb0b5592276e8d90c4681
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/shorewall6-lite
+  SECTION:=ipv6
+  CATEGORY:=IPv6
+  DEPENDS:=+ip +ip6tables +ip6tables-utils
+  TITLE:=Shorewall6 Lite
+  URL:=http://www.shorewall.net/
+  SUBMENU:=firewall
+endef
+
+define Package/shorewall6-lite/description
+   Shoreline Firewall 6 Lite is an iptables-based firewall for Linux 
systems.
+endef
+
+define Package/shorewall6-lite/conffiles
+/etc/shorewall6-lite/shorewall6-lite.conf
+/etc/shorewall6-lite/vardir
+endef
+
+define Build/Compile
+   rm -rf $(PKG_INSTALL_DIR)
+   mkdir -p $(PKG_INSTALL_DIR)
+   PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh
+endef
+
+define Package/shorewall6-lite/install
+   $(INSTALL_DIR) $(1)/sbin
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+   $(INSTALL_DIR) $(1)/etc/shorewall6-lite
+   $(INSTALL_DIR) $(1)/usr/share
+   $(INSTALL_BIN) ./files/shorewall-lite.init 
$(1)/etc/init.d/shorewall6-lite
+   $(INSTALL_BIN) ./files/hotplug_iface 
$(1)/etc/hotplug.d/iface/05-shorewall6-lite
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/shorewall6-lite $(1)/sbin
+   $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite $(1)/usr/share
+   $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite
+   $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite $(1)/etc
+   $(CP) ./files/vardir $(1)/etc/shorewall6-lite
+endef
+
+$(eval $(call BuildPackage,shorewall6-lite))
diff --exclude .svn -urN /tmp/empty/patches/100-hostname.patch 
ipv6/shorewall6-lite/patches/100-hostname.patch
--- /tmp/empty/patches/100-hostname.patch   1969-12-31 19:00:00.0 
-0500
+++ ipv6/shorewall6-lite/patches/100-hostname.patch 2009-05-12 
01:36:45.0 -0400
@@ -0,0 +1,11 @@
+--- a/shorewall6-lite
 b/shorewall6-lite
+@@ -153,7

[OpenWrt-Devel] ticket #6193: updatedd fail to builds with gcc 4.3.3+cs

2009-12-04 Thread Brian J. Murrell
I'd just like to raise the issue that current trunk does not build due
to an issue with updatedd:

mipsel-openwrt-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 
-funit-at-a-time -fhonour-copts -msoft-float -DHAVE_CONFIG_H  -I./missing  
-D_U_=__attribute__((unused)) -I. 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/include 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -c ./print-zephyr.c
mipsel-openwrt-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 
-funit-at-a-time -fhonour-copts -msoft-float -DHAVE_CONFIG_H  -I./missing  
-D_U_=__attribute__((unused)) -I. 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/include 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -c ./print-vrrp.c
/bin/bash ../../libtool --tag=CC --mode=link mipsel-openwrt-linux-uclibc-gcc 
-Wall -Wwrite-strings -Wstrict-prototypes -Wno-trigraphs -Os -pipe -mips32 
-mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float   
-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib 
-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/lib 
-L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib
 
-L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib
  -o libregfish.la -rpath /usr/lib/updatedd  libregfish.lo 
../../libupdatedd-exception/libupdatedd-exception.la -liberty -ldl -lnsl 
-lresolv 
mipsel-openwrt-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 
-funit-at-a-time -fhonour-copts -msoft-float -DHAVE_CONFIG_H  -I./missing  
-D_U_=__attribute__((unused)) -I. 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include 
-I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/include 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
 
-I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -c ./print-vtp.c
mipsel-openwrt-linux-uclibc-gcc -shared  .libs/libregfish.o -Wl,--whole-archive 
../../libupdatedd-exception/.libs/libupdatedd-exception.a 
-Wl,--no-whole-archive  
-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib 
-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/lib 
-L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib
 
-L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib
 -liberty -ldl -lnsl -lresolv  -mips32 -mtune=mips32 -msoft-float -Wl,-soname 
-Wl,libregfish.so.0 -o .libs/libregfish.so.0.0.0
/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld:
 
/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libiberty.a(strncmp.o):
 relocation R_MIPS_26 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC
/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libiberty.a:
 could not read symbols: Bad value
collect2: ld returned 1 exit status
make[6]: *** [libregfish.la] Error 1
make[6]: Leaving directory 
`/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/src/plugins'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory 
`/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6'
make[4]: *** [all] Error 2
make[4]: Leaving directory 
`/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6'
make[3]: *** 
[/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/.built] 
Error 2
make[3]: Leaving directory `/usr/src/openwrt/feeds/packages/net/updatedd'
make[2]: *** [package/feeds/packages/updatedd/compile] Error 2

Any ideas on how to fix?  I tried the patch that was included in the
ticket but it just gave me a different error:

configure.ac:24: version mismatch.  This is Automake 1.9.6,
configure.ac:24: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:24: comes from Automake 1.10.  You should recreate
configure.ac:24: aclocal.m4 with aclocal and run automake again.
make[3]: *** [Makefile.in] Error 1
make[3]: Leaving directory 
`/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6'
make[2]: *** 
[/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/.built] 
Error 2
make[2]: Leaving directory `/usr/src/openwrt/feeds/packages/net/updatedd'
make[1]: *** [package/feeds/packages/updatedd/compile] Error 2
make[1]: Leaving directory `/usr/src/openwrt'
make: *** [package/feeds/packages/updatedd-compile] Error 2

And only seems like a 

Re: [OpenWrt-Devel] br-lan and wan interfaces not getting plumbed in r18587

2009-12-01 Thread Brian J. Murrell
On Mon, 2009-11-30 at 19:03 -0500, Brian J. Murrell wrote: 
 
   for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do
   /usr/bin/env -i ACTION=add INTERFACE=$iface 
 /sbin/hotplug-call net
   done

So it's clear what prompts the real interfaces to get plumbed.  The
question is what prompts the likes of br-lan to get plumbed?

In any case, my point in following up with my own message was to state
that this happens right from the very first boot on this router (which
creates the default /etc/config/network of course) so I do have the
default network config installed for this router when this plumbing of
br-lan (and wan) is not happening.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] br-lan and wan interfaces not getting plumbed in r18587

2009-11-30 Thread Brian J. Murrell
I have built a firmware from r18587 in SVN for my wl500gp and it boots
fine, but I don't get any other interfaces plumbed except eth0.0 and
eth0.1.  The br-lan and wan interfaces are not getting plumbed for some
reason.

I have debugged to the point that I see an /etc/hotplug.d/net/10-net
event for interfaces lo, eth0 and eth1 being done in response
to /etc/rc.d/S10boot starting hotplug2 with:

/sbin/hotplug2 --override --persistent  --max-children 1 --no-coldplug 
/dev/null 21 

# the coldplugging of network interfaces needs to happen later, so we 
do it manually here
for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do
/usr/bin/env -i ACTION=add INTERFACE=$iface 
/sbin/hotplug-call net
done

When eth0 is getting configured in hotplug.d/net/10-net, there is an
add_vlan eth0.0 call made as well as eth0.1.

But by the time the boot is completely done and the router settled the
only interfaces that are up are eth0, eth0.0 and eth0.1.  No
br-lan.  :-(  eth0.1 (the Internet interface) doesn't even have udhcp
running on it so I don't think it's really been ifuped yet even.

So what I am at a loss to understand exactly, is supposed to trigger the
plumbing of the br-lan bridge and start the WAN services (i.e. the
udhcp, etc.) on eth0.1.  It's clear that the ifup -a
in /etc/rc.d/S40network is only supposed to happen in the start case,
not the boot case.  So what does trigger br-lan and wan getting
configured?

Cheers and TIA for any light you can shed on this.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Packages were found, but none compatible with the architectures configured

2009-10-18 Thread Brian J. Murrell
I'm trying to upgrade some packages I just built from an updated trunk
(r18050) and getting:

# opkg install kmod-sched
Collected errors:
 * Packages were found, but none compatible with the architectures configured

Hardware is an ASUS WL500GP:

# uname -a
Linux gw 2.6.25.20 #1 Sat Feb 7 13:49:36 EST 2009 mips unknown

The package's control file says:

Package: kmod-sched
Version: 2.6.30.8-1
Depends: kernel (=2.6.30.8-1)
Provides: 
Source: package/kernel
Section: kernel
Priority: optional
Maintainer: OpenWrt Developers Team openwrt-de...@openwrt.org
Architecture: brcm47xx
Installed-Size: 251800
Description:  Kernel schedulers for IP traffic

(Yes, I know the kernel version of this package doesn't match the
running kernel.  That will be remedied once I have the necessary kmod
packages installed.)

In any case, how is opkg verifying this mismatch?  Is it comparing the
Architecture: tag in the control file to $(uname -m)?  If so, why is the
Architecture: tag in my packages wrong?

BTW: kernel module packages really ought to be named/versioned such that
I can have more than one kmod-sched installed at the same time, for
different kernels.

Thanx!
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] replace /jffs with usb stick

2009-08-19 Thread Brian J. Murrell
On Tue, 2009-08-18 at 20:38 -0400, Stefan Monnier wrote:
  I am having a hard time to find the place where mounting root / really
  happens ..
 
 It's in /sbin/mount_root.  And yes, it is not exactly trivial to find
 (although in retrospect I had to admit that the name should have made it
 pretty obvious).
 
 See below the patch I use on my WL-700gE to mount the IDE drive's partition.

I really wish we could get some form of official support upstream for /
mounted on USB devices.  It seems that more and more people are
re-inventing this wheel.  Sadly.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] gdb patch

2009-06-09 Thread Brian J. Murrell
On Tue, 2009-06-09 at 12:49 +0300, Alexandros C. Couloumbis wrote:
 gdb does not compile on latest svn r16391 with gcc-4.3.3
 
 here is the error:
 cc1: warnings being treated as errors
 .././gdb/cli/cli-cmds.c: In function 'pwd_command':
 .././gdb/cli/cli-cmds.c:323: error: ignoring return value of 'getcwd',
 declared with attribute warn_unused_result
 
 the following patch deals with issue
 
 Signed-off-by: Alexandros C. Couloumbis alex at ozo.com
 
 ---
 diff -Nrub toolchain/gdb/Makefile.orig toolchain/gdb/Makefile
 
 --- toolchain/gdb/Makefile.orig   2009-06-09 12:44:12.845806604 +0300
 +++ toolchain/gdb/Makefile2009-06-09 12:44:37.419806535 +0300
 @@ -29,6 +29,7 @@
   --disable-tui --disable-gdbtk --without-x \
   --without-included-gettext \
   --enable-threads \
 + --disable-werror \

Uhm.  No.  The correct solution is to fix the warning, not disabling
-Werror.  IMHO, anyway.

And of course, you should push the correct fix upstream.

   );
  endef

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] missing modules from iptables-1.4.3.2

2009-05-16 Thread Brian J. Murrell
Hi,

I noticed that the updated packaging of iptables-1.4.3.2 is missing some
(quite a few, to my surprise) modules:

libipt_addrtype.so
libipt_CLUSTERIP.so
libipt_MIRROR.so
libipt_realm.so
libipt_SAME.so
libipt_unclean.so
libxt_comment.so
libxt_connlimit.so
libxt_CONNSECMARK.so
libxt_dccp.so
libxt_hashlimit.so
libxt_NFLOG.so
libxt_NFQUEUE.so
libxt_owner.so
libxt_RATEEST.so
libxt_rateest.so
libxt_sctp.so
libxt_SECMARK.so
libxt_socket.so
libxt_TCPOPTSTRIP.so
libxt_TPROXY.so
libxt_TRACE.so
libxt_u32.so

Is this oversight or are these intentionally missing?

I'd supply a patch, but I have not yet really figured out how the
Makefile procedures in the build system work.  I can see the enumerating
of the modules in include/netfilter.mk and the installation of them in
package/iptables/Makefile, i.e.:

for m in $(patsubst xt_%,ipt_%,$(IPT_BUILTIN)) $(patsubst 
ipt_%,xt_%,$(IPT_BUILTIN)); do \
if [ -f 
$(PKG_INSTALL_DIR)/usr/lib/iptables/lib{m}.so ]; then \
$(CP) 
$(PKG_INSTALL_DIR)/usr/lib/iptables/lib{m}.so $(1)/usr/lib/iptables/ ;\
fi; \
done \

But I kinda get lost from there.

Anyone want to roll a patch and submit it?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] kexec on mips

2009-05-11 Thread Brian J. Murrell
There was some discussion a while ago about kexec and mips, and, well it
not quite working.

Any progress in that area?  Anyone got kexec working on a linksys/asus
type device?  i.e. a:

system type : Broadcom BCM47XX
processor   : 0
cpu model   : Broadcom BCM3302 V0.6
BogoMIPS: 263.16
wait instruction: yes
microsecond timers  : yes
tlb_entries : 32
extra interrupt vector  : yes
hardware watchpoint : no
ASEs implemented:
shadow register sets: 1
core: 0
VCED exceptions : not available
VCEI exceptions : not available

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-05-11 Thread Brian J. Murrell
On Tue, 2009-04-28 at 19:43 +0200, Jo-Philipp Wich wrote:
 
 Hmm ... I'm no expert with this but shouldn't /etc/nsswitch.conf take
 care of the order of used resolvers? Could you try if this works for the
 affected tools:
 
 echo $(uci get network.wan.ipaddr) $(cat /proc/sys/kernel/hostname) \
/tmp/hosts.local
 
 uci set dhcp.dnsmasq.addnhosts=/tmp/hosts.local
 uci commit dhcp
 /etc/init.d/dnsmasq restart

Doesn't this presume the use of dnsmasq on the router?  What if one
isn't using dnsmasq?  I surely don't.  I think this use-case illustrates
why the right solution is probably to generate the hosts file in /tmp
and point to it with a symlink in /etc/.  Perhaps there should be
an /etc/hosts.base that is used in the generation for one that wants to
have static entries in a /etc/hosts file.

  An alternative is for /etc/hosts to be generated in /tmp and symlinked
  to /etc ...

Indeed.

 We done that for LuCI but it seems to confuse/annoy users...

Hrm.  If one understands the working environment of an embedded device
like a router, why is one confused?  IOW, if one is confused by this,
then one should likely not be mucking around in configuration files and
one should likely stick to configuration interfaces provided for the
less initiated.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] svn/development website error

2009-05-08 Thread Brian J. Murrell
When I try to svn update my openwrt repo I'm getting:

svn: Server sent unexpected return value (504 Gateway Time-out) in
response to OPTIONS request for
'https://svn.openwrt.org/openwrt/packages'

This is the same kind of error (504 Gateway Time-out) I try to follow
the Developer link at the top of the openwrt main page,

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Introduce new router board

2009-05-05 Thread Brian J. Murrell
On Tue, 2009-05-05 at 21:27 +0300, Linkodas wrote:
 Hi list/community,

Hi,

 PCB form factor: Pico-ITX (10cm x 7.2cm, fanless)
 
 Onboard CPU: Cortina Systems CS3516 (300Mhz ARM9 Core)
 Onboard DDR SDRAM: 128Mb 333Mhz 32bit
 Onboard NAND FLASH: 128Mb (or more)
 Onboard LAN: 2x 10/100Mbps Ethernet
 Onboard SATA: 2x SATA
 
 Onboard connectors: 2x SATA, 2x mini-PCI slots, 1x mini-PCI Express 
 (with USB 2.0 interface), 1x UART, 1x Pico-ITX power, 1x JTAG, GPIO ports
 
 Back panel connectors: 2x RJ-45 LAN, 2x USB 2.0, 3x antenna (GSM, 3G, 
 Wifi, Wimax, other), 1x RS232
 
 Management: Watch Dog Timer, Brown-out Reset, RTC with battery
 
 Operating system: OpenWRT with newest 2.6 Linux Kernel.
 Bootloader: U-boot

Sounds nice, but pricey.  One of the attractive aspects of OpenWRT for
me is that it runs on inexpensive hardware.

b,



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] HEADS UP -- Server upgrade @ 2009-03-29

2009-03-23 Thread Brian J. Murrell
On Mon, 2009-03-23 at 12:15 +0100, Imre Kaloz wrote:
 Hi all,
 
 As the current OpenWrt box has been serving the project for almost 4 years, 
 it was clear sooner or later it will reach it's limits. Thanks for the 
 spammers mainly from Asia the time has come.

While server upgrades are usually good news regardless of their reason
for doing so, how do spammers from Asia necessitate a server upgrade?

Just curious.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] kexec failure on mips

2009-02-22 Thread Brian J. Murrell
On Sun, 2009-02-22 at 14:56 +0100, Holger Gross wrote:
 now the kernel loads, but does not boot:
 
 br-lan: port 1(eth0.0) entering disabled state
 Starting new kernel
 Will call new kernel at 0029d000
 Bye ...

Do you have a serial console on your device?  I don't yet.  My
TTL-to-RS232 level converter arrived the other day, although I'd really
rather find one of those nokia usb cables with the level adjuster built
in.

Anyway, sounds like you and I are having the same problems and likely
seeing the kernel boot on a serial console will reveal the problem.  I
just need to find the time to get to it.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] kexec failure on mips

2009-02-22 Thread Brian J. Murrell
On Sun, 2009-02-22 at 17:17 +0100, Holger Gross wrote:
 i use the serial console, no other output is given.

Oh, so the kernel doesn't even begin to boot?

 now i m trying something of 
 http://www.nabble.com/kexec-on-mips---anyone-has-it-working--tt17485898.html#a17485898

Maybe I didn't quite follow the thread well enough but I didn't really
see any solutions in there.  It does seem clear that there are all sorts
of avenues for failure to kexec.  :-(  If you do manage to make any
headway, please, do post here.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ttl to rs232 on wl500gp

2009-02-09 Thread Brian J. Murrell
On Mon, 2009-02-09 at 08:14 -0200, Felipe Maya wrote:
 Follow the next link to do it. It works with ASUS, LINKSYS and etc.:
 
 http://www.myopenrouter.com/article/10811/Hacking-Your-NETGEAR-WGR614L-How-To-Install-A-Serial-Port/

Yeah, I guess that might have been another way to go.  But my rs232/ttl
converter is already on it's way and it was half the price of those
ttl/usb cables, even if I do have to rummage through my power supply box
for a 5V supply, should I need it.  Would sure like to avoid the
external power need though, if I can.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ttl to rs232 on wl500gp

2009-02-09 Thread Brian J. Murrell
On Mon, 2009-02-09 at 11:30 -0200, Andres Aguirre wrote:
 I have a question... Is not more easy to use a usb2serial adaptor?

It probably is.  It is more expensive though.  Following the previous
links, the best option I could find was $35-40 by the time it was
shipped to me.  The rs232/ttl converter was $11 shipped.

 I plan to do it, maybe there are some important reason to choose the
 rs232/ttl alternative that I'm not taking in account.

Just cost I think.  Well, and not having to screw around with USB/serial
device drivers.  That said, had I known about these USB/ttl adaptors and
had I been able to get one at a reasonable price, I might have opted for
that.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ttl to rs232 on wl500gp

2009-02-09 Thread Brian J. Murrell
On Mon, 2009-02-09 at 17:22 +0100, marco wrote:
 
 i would suggest an usb-uart cable (operating at 3.3v, based on the  
 ftdi chip).
 then just cut the uart end and solder some pin connectors
 (http://marco.blogs.teknusi.org/files/2009/02/p1010192.jpg to get an  
 idea)
 

Yeah, somebody else suggested such a thing here earlier in this thread.
The one supply of those I could find would have ended up costing me 4x
what I got the ttl/rs232 adaptor I have on order for.

The nokia phone cable is interesting in as much as you find those
things in liquidation/discount stores sometimes.  I think my question
was though, is that those have a USB end on them most of the time, yes?
So you need to know that the chip that's in them doing the ttl/usb
conversion has a driver for Linux, yes?  I guess most do in as much as
somebody always wants their phone USB connection working.  :-)

With them all going bluetooth these days though, I suppose those cables
are going out of style.  :-/

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] kexec failure on mips

2009-02-08 Thread Brian J. Murrell
On Fri, 2009-02-06 at 23:45 -0500, Brian J. Murrell wrote:
 I have an asus wl500gp that I'm trying to kexec a kernel on.  I had
 written about this before but have another bit of info and I'm hoping it
 rings a bell for someone so that I don't have to through the painful
 process of printk() instrumenting the kernel and flashing new kernels
 with more and more debug.

Ah ha!  Seems this was a simple case of KEXEC not being configured in
the kernel configuration.  Now I can load a kernel with no (apparent)
problems:

r...@gw:~# kexec -l /vmlinux-2.6.25.20 --append=root=/dev/mtdblock2 
rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200

but booting it doesn't seem to complete:

r...@gw:~# kexec -e

and it reboots, but never comes back until I power reset the unit.

I guess a serial port could really help at this point.  I don't have one
though.  I guess I should look into adding one to my wl500gp.

Any ideas before/while I do though?

Any debugging tips on how I can determine how far it's getting without a
serial console?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ttl to rs232 on wl500gp

2009-02-08 Thread Brian J. Murrell
OK.  So I need a serial console on my ASUS WL-500G Premium to debug this
kexec problem I'm having.

Having a peek at
http://wiki.openwrt.org/OpenWrtDocs/Hardware/Asus/WL500GP#head-8c0c5262c5a79f43d67037a30331937a6f7b8628
 it says that the serial output is TTL level.  I have a TTL-to-RS232 converter 
on order which apparently uses the popular MAX232 chip for its work.  This 
adaptor (http://fcpcb.ecrater.com/product.php?pid=1750384) requires an external 
3-5V (300 μA) external supply however.

I notice on the diagram for the serial connector at the first URL I
pasted above that there is a 3.3V_OUT available.  Is this intended to
supply such a converter or is this for something else and I should still
use an external power supply for the above converter?

I do notice in the photo
(http://wiki.openwrt.org/OpenWrtDocs/Hardware/Asus/WL500GP/IMG_0007) on
that page that the connector wired to that header is using that
3.3V_OUT supply.  I wonder if he is using it to power such a
converter.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] kexec failure on mips

2009-02-06 Thread Brian J. Murrell
I have an asus wl500gp that I'm trying to kexec a kernel on.  I had
written about this before but have another bit of info and I'm hoping it
rings a bell for someone so that I don't have to through the painful
process of printk() instrumenting the kernel and flashing new kernels
with more and more debug.

Anyway, my command line is:

# kexec -l /vmlinux-2.6.25.20 --append=root=/dev/sda1 rootfstype=ext3 noinitrd 
console=ttyS0,115200 init=/etc/preinit

where /vmlinux-2.6.25.20 is build_dir/linux-brcm47xx/vmlinux.elf from my
build tree.

kexec -l returns:

kexec_load failed: Success result = 89
entry   = 0x29f000 flags = 0
nr_segments = 2
segment[0].buf   = 0x2ac33008
segment[0].bufsz = 27a07a
segment[0].mem   = 0x1000
segment[0].memsz = 29e000
segment[1].buf   = 0x458440
segment[1].bufsz = 194
segment[1].mem   = 0x29f000
segment[1].memsz = 1000

and result, 89 is what is returned from kexec_load() in my_load() in
the kexec-tools package.  I dug a bit but could not really find anything
in sys_kexec_load() or it's callees that would return 89,

For reference, cpuinfo is:

system type : Broadcom BCM47XX
processor   : 0
cpu model   : Broadcom BCM3302 V0.6
BogoMIPS: 263.16
wait instruction: yes
microsecond timers  : yes
tlb_entries : 32
extra interrupt vector  : yes
hardware watchpoint : no
ASEs implemented:
shadow register sets: 1
core: 0
VCED exceptions : not available
VCEI exceptions : not available

Anyone with any ideas at all?

Anyone actually using kexec on a mips architecture with success, just so
I know I am not chasing a pipe-dream?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please reopen ticket 3152

2009-02-03 Thread Brian J. Murrell
On Tue, 2009-02-03 at 09:39 -0500, Stefan Monnier wrote:
 
   ln -sf /rom/etc/init./boot /etc/init.d/boot

Hrm.  But in my case, those files are effectively the same (where
hotplug counts).  See:

# diff -u /rom/etc/init.d/boot /etc/init.d/boot
--- /rom/etc/init.d/bootMon Jun 16 23:08:04 2008
+++ /etc/init.d/bootFri Jul 11 00:16:00 2008
@@ -20,8 +20,12 @@
config_get log_ip $cfg log_ip 
config_get log_size $cfg log_size
# but what if we want to use syslog-ng here?
-   syslogd -C${log_size:-16} ${log_ip:+-L -R $log_ip}
-   klogd
+   if [ -x /etc/init.d/syslog-ng ]; then
+   /etc/init.d/syslog-ng start
+   else
+   syslogd -C${log_size:-16} ${log_ip:+-L -R $log_ip}
+   klogd
+   fi
 }

As you can see, the only difference is in regard to a local patch I have
for syslog/syslog-ng handling.

 I think the first is started in /etc/preinit.

Yeah, there are a number of calls to hotplug2 in there.

 Starting it twice is fairly normal: once in the initramfs (aka
 miniroot in Irix parlance) before the real rootfs is mounted, and once
 after the real rootfs is mounted.

But only one of them is actually active, yes?  Why keep a second one
around consuming RAM if it's been superseded and doing nothing?

 The killall hotplug2 was moved a little while ago from one place to
 another, so if the two rootfs aren't in sync, the first hotplug2 doesn't
 get killed.

Hrm.

  So something like:
 
   [ $FAILSAFE = true ]  touch /tmp/.failsafe
  
  +killall -q hotplug2
   [ -x /sbin/hotplug2 ]  /sbin/hotplug2 --override --persistent \
   --max-children 1 --no-coldplug  
   
 Yes.

I guess I wonder why, even without an externally mounted rootfs, this
issue of having two hotplug2s running is not being addressed.

The patch should look more like:

@@ -50,8 +55,11 @@
[ $FAILSAFE = true ]  touch /tmp/.failsafe
 
killall -q hotplug2
-   [ -x /sbin/hotplug2 ]  /sbin/hotplug2 --override --persistent \
+   [ -x /sbin/hotplug2 ]  {
+   killall -q hotplug2
+   /sbin/hotplug2 --override --persistent \
--max-children 1 --no-coldplug 
+   }
 
# the coldplugging of network interfaces needs to happen later, so we 
do it manually here
for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do

to be really safe about it (i.e. only kill the existing one if there is
one available to replace it).  But indeed, it works -- for the limited
use case I have tested for so far.  ;-)

 Try a diff, and you'll probably get something very similar to your above
 suggested patch.

I did.  See above.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] b43 good news and bad news

2009-02-03 Thread Brian J. Murrell
On Tue, 2009-02-03 at 20:16 +0100, Michael Buesch wrote:
 On Tuesday 03 February 2009 05:44:42 Brian J. Murrell wrote:
  The bad news is that throughput still sucks rocks.

Sorry if that sounded harsh.  It didn't seem as harsh when I was writing
it as it did just now reading it.  I meant no ill-will in any way by it.
Just trying to be frank I guess.  I'm not known for beating around the
bush.  :-)

 This is unlikely to change ever, except if broadcom releases the sources.

OK.  That's fair enough.  I was just trying to supply some feedback in
case it was in fact unexpected.  I thought full throughput was being
targeted by the current reverse engineering effort.  I can totally
understand if it will never be achieved.

 Go and buy a device that's actually vendor supported, if you want full 
 throughput.

Yeah.  Given that it's got a minipci slot in it, maybe an atheros or
something.  I did in fact buy an ipw2200 based card on spec hoping to
replace the broadcom card in that unit but alas, the AP support for that
card is next-to-nonexistent.  Fortunately I didn't pay too much for it
and I had a laptop here with an old broadcomm 802.11b card in it that I
replaced.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please reopen ticket 3152

2009-02-03 Thread Brian J. Murrell
On Tue, 2009-02-03 at 22:01 -0500, Stefan Monnier wrote:
 
 Then I don't know what's going on.

Indeed, it is of question isn't it?

 Only one of them is active at any particular time: the first gets killed
 before the seconed is started.

But where, and why is this not happening with a usb-rootfs install.
From here, it looks to me that regardless of whether rootfs is on an
external storage or not, 2 hotplug2s manage to get running and stay that
way.

 It's not on purpose.

Indeed.  I think I was beating around a this-looks-like-a-bug bush.

 In a normal OpenWRT install, there's only one hotplug2 running at any time.

But is there?  I guess I could pull the usb-key on my router and reboot
it and see.  That will have to wait for another time I think.  Too many
balls in the air at the moment.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please reopen ticket 3152

2009-02-02 Thread Brian J. Murrell
On Sun, 2009-02-01 at 21:52 -0500, Stefan Monnier wrote:
 
 Here's another guess:
 
   Your USB rootfs is not quite in sync for your firmware rootfs.

Most definitely true.

   So the
   firmware rootfs starts udev (aka hotplug2) and doesn't kill it before
   doing pivot_root, and your USB rootfs doesn't kill it either, so you
   end up woith 2 hotplug2 daemons running

Ahhh.  You might be on to something:

r...@gw:~# ps -ef | grep hotplug
  207 root   1132 S   /sbin/hotplug2 --no-coldplug --persistent --set-rules
  366 root   1128 S   /sbin/hotplug2 --override --persistent --max-children

But I would expect the pre-pivot_root hotplug2 to show it's root as
being where the old root was pivoted to, which is /oldroot, however it
doesn't:

r...@gw:~# ls -l /proc/207/root
lrwxrwxrwx1 root root0 Feb  2 18:47 /proc/207/root - /
r...@gw:~# ls -l /proc/366/root
lrwxrwxrwx1 root root0 Feb  2 18:47 /proc/366/root - /

  and your firmware-load
   request is handled by the first hotplug2 which lives in the firmware's
   rootfs where b43/b0g0initvals5.fw is indeed absent.

Maybe this is the case.

 A recent change to the way hotplug2 is startedkilled around
 pivot_root made me bump into the exact above scenario.

How did you solve it?  Even if you give me command line actions just to
test your theory out, I'd be happy to.

Thanx!

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please reopen ticket 3152

2009-02-02 Thread Brian J. Murrell
On Mon, 2009-02-02 at 22:01 -0500, Stefan Monnier wrote:
 
 I updated my USB (really IDE in my case) rootfs.

Ahhh.  Care to post the patch?

 More specifically, the
 /etc/init.d/boot script

The one on the flash, that calls /sbin/mount_root?

 needs to killall -q hotplug2 before starting
 hotplug2

So where is this first hotplug2 being started from if /etc/init.d/boot
is starting the second one?  Surely this must be a bug (i.e. two
hotplug2 processes) even on installations with no externally mounted /,
no?

So something like:

 chown 0700 /tmp/.uci
 touch /var/log/wtmp  
 touch /var/log/lastlog  
 ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf  
  
 [ $FAILSAFE = true ]  touch /tmp/.failsafe
 
+killall -q hotplug2
 [ -x /sbin/hotplug2 ]  /sbin/hotplug2 --override --persistent \
 --max-children 1 --no-coldplug  
  
 # the coldplugging of network interfaces needs to happen later, so we 
do it manually here
 for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do 
  
 /usr/bin/env -i ACTION=add INTERFACE=$iface 
/sbin/hotplug-call net 
 done   
  

 (I did that by changing it into a symlink to
 /rom/etc/init.d/boot).

Hrm.  I must be missing what you mean.  /etc/init.d/boot
and /rom/etc/init.d/boot for all intents and purposes are the same on my
router.

 You can try killing the process 207.

Yes, that was the ticket.  Now I want to make the change permanent.

Thanx!

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] please reopen ticket 3152

2009-02-01 Thread Brian J. Murrell
I've just posted some more details to ticket #3152 which is currently
closed.  Could somebody with permission to do so, please reopen it?

Basically, I'm getting:

b43-phy2: Broadcom 4318 WLAN found
phy2: Selected rate control algorithm 'pid'
Broadcom 43xx driver loaded [ Features: NLR, Firmware-ID: FW13 ]
input: b43-phy2 as /devices/virtual/input/input3
b43-phy2 ERROR: Firmware file b43/b0g0initvals5.fw not found
b43-phy2 ERROR: You must go to 
http://linuxwireless.org/en/users/Drivers/b43#devicefirmware and download the 
latest firmware (version 4).

Trying to do:

insmod b43
ifconfig wlan0 up

But the file most certainly exists:

r...@gw:~# ls -l /lib/firmware/b43/
-rw-r--r--1 root root   18 Jan 31 11:36 a0g0bsinitvals4.fw
-rw-r--r--1 root root  158 Jan 31 11:36 a0g0bsinitvals5.fw
-rw-r--r--1 root root  158 Jan 31 11:36 a0g0bsinitvals9.fw
...
-rw-r--r--1 root root  158 Jan 31 11:36 b0g0bsinitvals5.fw
...

My / (and therefor the above files) is on a USB key if that matters any.

Interestingly enough, there seem to be other occurrences of this this
issue:

http://forum.openwrt.org/viewtopic.php?id=18473
http://forum.openwrt.org/viewtopic.php?id=14233

The second one above is also a WL500gp and the problem for him only
occurred after moving his / to USB storage.

Is there some problem with the kernel trying to read firmware files from
a USB storage device perhaps?

Any ideas how to move forward with debugging this?

b.

P.S. I'm not terribly hopeful that this b43 driver will function well in
AP mode, but I thought it would be easy enough to give it a try.  I
guess not.  :-(



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please reopen ticket 3152

2009-02-01 Thread Brian J. Murrell
On Sun, 2009-02-01 at 16:53 +0100, Hauke Mehrtens wrote:
 Brian J. Murrell wrote:
  I've just posted some more details to ticket #3152 which is currently
  closed.  Could somebody with permission to do so, please reopen it?
  
  Basically, I'm getting:
  
  b43-phy2: Broadcom 4318 WLAN found
  phy2: Selected rate control algorithm 'pid'
  Broadcom 43xx driver loaded [ Features: NLR, Firmware-ID: FW13 ]
  input: b43-phy2 as /devices/virtual/input/input3
  b43-phy2 ERROR: Firmware file b43/b0g0initvals5.fw not found
  b43-phy2 ERROR: You must go to 
  http://linuxwireless.org/en/users/Drivers/b43#devicefirmware and download 
  the latest firmware (version 4).
  
  Trying to do:
  
  insmod b43
  ifconfig wlan0 up

 Hi,

Hi.

 is the b43 module also on an external USB drive?

Yes.  Which is mounted in /sbin/mount_root.

 The b43 driver is
 initilizied very early,

Not before /sbin/mount_root does it's thing I am quite sure.

 probably before the USB drive is fully
 initialized and then the driver does not find the firmware.

Not likely given that the b43 is not in the firmware image.

 Have you tried to put the firmware onto the internal flash?

Nope.

But all of this is moot.  Notice in my original message I state that I
am getting this error simply from trying to do:

insmod b43
ifconfig wlan0 up

The implication there is that this is being done at the command line
after the system is fully booted.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] WARNING: kmod-iptunnel4 is not available in the kernel config

2009-01-31 Thread Brian J. Murrell
I don't seem to be getting a kmod-iptunnel4 with an r14139 checkout and
build.  I am getting warnings in the make output:

WARNING: kmod-iptunnel4 is not available in the kernel config

However, in my .config I have:

CONFIG_PACKAGE_kmod-iptunnel4=m

and in target/linux/generic-2.6/config-2.6.25 I have:

CONFIG_INET_TUNNEL=m

and the tunnel4.ko is even being built:

  CC [M]  net/ipv4/tunnel4.o
...
  CC  net/ipv4/tunnel4.mod.o
...
  LD [M]  net/ipv4/tunnel4.ko

So any ideas why the kmod-tunnel4 package is not being built?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-25 Thread Brian J. Murrell
On Wed, 2009-01-21 at 17:46 +0100, Harald Schiöberg wrote:
 
 here is the script we use to boot an Openwrt from a running Openwrt.

Thanx!

 Make sure to have kexec-tools installed

Indeed.

 kexec -l /mnt/openwrt-avila-zImage --append=rtc-ds1672.probe=0,0x68
 root=$1 rootfstype=ext2 noinitrd console=ttyS0,115200 init=/etc/preinit

Can I ask, just to be clear, and so there are no nasty accidents here,
what *exactly* is /mnt/openwrt-avila-zImage?  I mean I understand it's a
kernel, but I want to be sure in what format.  For example in my
build_dir/linux-brcm47xx/ dir I have:

-rwxr-xr-x  1 brian brian 2596986 2009-01-23 03:38 vmlinux
-rwxr-xr-x  1 brian brian 2602200 2009-01-23 03:38 vmlinux.elf
-rw-r--r--  1 brian brian  778706 2009-01-23 03:38 vmlinux.lzma

Is it by chance the vmlinux.lzma image, or one of the other two, or
something else altogether?

Thanx,
b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] cp: cannot stat `.../staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.29/bin': No such file or directory

2009-01-23 Thread Brian J. Murrell
I seem to be getting this during my make world with trunk, r14139:

cp -fpR 
/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.29/bin 
/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.29/OpenWrt-ImageBuilder-brcm47xx-for-Linux-i686/staging_dir/host/
cp: cannot stat 
`/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.29/bin': No 
such file or directory
make[3]: *** 
[/usr/src/openwrt/bin/OpenWrt-ImageBuilder-brcm47xx-for-Linux-i686.tar.bz2] 
Error 1
make[3]: Leaving directory `/usr/src/openwrt/target/imagebuilder'
make[2]: *** [target/imagebuilder/install] Error 2

/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.29/
has in it:

-rw-r--r--  1 brian brian  144 2009-01-22 13:35 info.mk
drwxr-xr-x  2 brian brian 4096 2009-01-22 14:06 lib
drwxr-xr-x  2 brian brian 4096 2009-01-22 14:07 sbin
drwxr-xr-x  2 brian brian 4096 2009-01-22 14:07 stamp
drwxr-xr-x 10 brian brian 4096 2009-01-22 14:07 usr

Known?


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-22 Thread Brian J. Murrell
On Thu, 2009-01-22 at 09:39 +0100, Bastian Bittorf wrote:
 
 only very few computersystems have NVRAM

s/computersystems/[wireless] routers/ ?  OpenWRT is targeted at
[wireless] routers.

 thats why UCI was invented

I would have suggested some kind of on disk nvram emulation for such
non-nvram capable systems so that the nvram paradigm remains the same
for nvram capable systems and is emulated for others that have, say,
persistent disk.

But given the advances made with sysupgrade, this might be getting moot.
I guess only time will tell if my fears of synchro problems between
config files and sysupgrade manifest themselves.

That said, I wonder if sysupgrade has a user driven inventory list --
that is, a list of files to be included in the sysupgrade save set that
the user can define.

 It think this is a clean way

Agreed, with the above idea.

 anyway - if a config file changes you have always some fiddling by
 manual configuration. The most important thing is IMHO, that all
 network related stuff starts as usual.

Agreed on the networking stuff. :-)

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-21 Thread Brian J. Murrell
On Wed, 2009-01-21 at 08:51 +0100, Markus Wigge wrote:
 Hello,

Hi,

 Have you ever tried sysupgrade?

No.

 A nice little tool to save your
 config,

And how does it know where all of the various config is?  Are you sure
it's not missing any, now or in the future?

 flash a new image and restore the config?

So, I've flashed my new image.  Now what?  Do I have to connect to the
router using it's factory (or OpenWRT) default IP address?  So now I
have to reconfigure other equipment to get back into the router after I
reflash it?  And now I have to go through some kind of configuration
restore process?  This is _exactly_ the kind of rigmarole I am talking
about.  With the router's stock firmware, or OpenWRT's WhiteRussian,
this is not necessary.  You just reflash and when it comes back it's
ready to go.

Anyway, this particular annoyance in the whole upgrade thing was a minor
point.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-21 Thread Brian J. Murrell
On Wed, 2009-01-21 at 16:39 +0100, Jo-Philipp Wich wrote:
 
 It has a builtin list of important configs like /etc/opkg.conf, /etc/dropbear 
 etc.

Right.  But that's a list that will continually need updating as new
packages are brought in.  As I said in a previous message, having
package maintainers identify config files within their packaging is
still error-prone but probably less so than them having to know/remember
to upgrade the sysupgrade list.

  It also
 backups the whole /etc/config/ directory which contains 100% of the uci 
 config.

Yes.  That one seems quite obvious.  Unfortunately, not all packages are
uci driven [yet].

 No, since the old network config is restored, you connect to the ip it 
 previously had.

So sysupgrade also takes care to restore the saved config,
automatically?  Does it do this on reboot?  I might have to go
investigate this sysupgrade more closely.  I think the last time I
looked at it though it didn't support much outside of x86 based systems
though.

 Solved for the platforms which support sysupgrade which are currently the 
 ones that have a
 unified image format (kernel + rootfs).

So how do I know which ones specifically that is?

 Only if all firmwares agree on the same meaning for the same nvram variables.

Yes, absolutely.  They all should though, where there is common
functionality.

 Dito for sysupgrade.

Well, this is good news then.  Maybe time to look at that again.

Thanx for the clarification.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-21 Thread Brian J. Murrell
On Wed, 2009-01-21 at 17:01 +0100, Jo-Philipp Wich wrote:
 
 Yes. For squashfs + jffs based systems you could also investigate the 
 contents of /jffs,
 which contains only files that where modified compared to the initial rom 
 file system.

Yes, that is an interesting approach for such systems.  Wouldn't apply
to me though as I mount / from a USB storage device and use it as a
regular RW filesystem.

 It builds a temporary ramdisk, chroots to it, flashes the image from there and
 reinitalizes the jffs2 partition from within the yet running system.

Interesting.

 It works pretty well now.

Good news.

 
  So how do I know which ones specifically that is?
 
 Basically all platforms that utilize squashfs + jffs2 in only one single 
 image file for
 flashing. Examples for that are bcm47xx, bcm63xx, x86 (not for ext2) and 
 others.

Ahhh.  Cool.  I might have to try playing with this on my WRT54GS.

 Yes, I'd suggest to try it out. If it supports your platform then it might be 
 a suitable
 solution for you.

Is it, or will it some day get Luci driven to operate as seamlessly as
native firmware upgrades?

b.





signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] R: Re: rebooting from a kernel on external storage

2009-01-21 Thread Brian J. Murrell
On Wed, 2009-01-21 at 20:57 +0100, Roberto Riggio wrote:
 
 Is it possible to use sysupgrade on a ext2 partition? Or does it have 
 to be a jff2 partition?

I think a previous posting in this thread said that ext2 didn't work.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-21 Thread Brian J. Murrell
On Wed, 2009-01-21 at 20:30 +0100, Steven Barth wrote:
  Is it, or will it some day get Luci driven to operate as seamlessly as
  native firmware upgrades?
 
 Is this seamless enough:
 http://dev.luci.freifunk-halle.net/sysupgrade.png

Sure, as long as when it's done that, it comes back on the new firmware
with all of my old settings.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] mounting / from USB automatically yet?

2009-01-21 Thread Brian J. Murrell
I've just updated my trunk tree to the latest and I'm looking at the
patches that I'm carrying in my tree wondering what's still relevant and
what's not.  One of the bigger ones is a patch to mount a USB device
on / in mount_root.

Is this still needed or has some official support for this functionality
been merged in recently.

My current patch for this functionality is:

Index: package/base-files/files/sbin/mount_root
===
--- package/base-files/files/sbin/mount_root(revision 14139)
+++ package/base-files/files/sbin/mount_root(working copy)
@@ -2,6 +2,62 @@
 # Copyright (C) 2006 OpenWrt.org
 . /etc/functions.sh
 
+###  Try to mount some drive.  
+mount_drive () {
+   local rootdev=$1
+
+   for m in jbd ext3; do
+   insmod $m
+   done
+
+   # this may need to be higher if your disk is slow to initialize
+   n=10
+   basesysdev=${rootdev%[0-9]}
+   sysdev=/sys/block/${basesysdev##/dev/}
+   while [ $n -gt 0 -a ! -e $sysdev/dev ]; do
+   echo waiting for root device to be available...$n 2
+   let n=n-1
+   sleep 1
+   done
+
+   # loop either timed out, or found the device
+   if [ -e $sysdev/dev ]; then
+   # if it found the device, create the nodes for it
+   find $sysdev/ -name dev | while read file; do
+   dev=${file%/dev}
+   dev=${dev##*/}
+   # but only if it doesn't exist already
+   if [ ! -b /dev/$dev ]; then
+   echo creating device node /dev/$dev 2
+   IFS=: read major minor  $file
+   mknod /dev/$dev b $major $minor
+   fi
+   done
+
+   mount $rootdev /mnt  [ -x /mnt/sbin/init ]  {
+   mkdir /mnt/oldroot
+   pivot /mnt /oldroot
+   exit
+   }
+   fi
+}
+
+mount_ide () {
+   for m in ide-core aec62xx ide-generic ide-disk; do
+   insmod $m
+   done
+   mount_drive /dev/hde1
+   return 0
+}
+
+mount_usb () {
+   for m in usbcore ohci-hcd ehci-hcd scsi_mod sd_mod usb-storage; do
+   insmod $m
+   done
+   mount_drive /dev/sda1
+   return 0
+}
+
 jffs2_ready () {
mtdpart=$(find_mtd_part rootfs_data)
magic=$(hexdump $mtdpart -n 4 -e '4/1 %02x')
@@ -15,9 +71,21 @@
echo switching to jffs2
mount $(find_mtd_part rootfs_data) /jffs -t jffs2  \
fopivot /jffs /rom
+   if [ $1 != nousb -a $2 != nousb ]; then
+   mount_usb
+   fi
+   if [ $1 != noide -a $2 != noide ]; then
+   mount_ide
+   fi
} || {
echo jffs2 not ready yet; using ramdisk
ramoverlay
+   if [ $1 != nousb -a $2 != nousb ]; then
+   mount_usb
+   fi
+   if [ $1 != noide -a $2 != noide ]; then
+   mount_ide
+   fi
}
 } || {
mtd unlock rootfs

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] rebooting from a kernel on external storage

2009-01-20 Thread Brian J. Murrell
One of the most frustrating tasks in regard to OpenWRT is needing to
upgrade.  There are several factors that instigate it further.

Firstly, with any given router's traditional WAP/router firmware (as
well as OpenWRT's White Russian), configuration settings were stored in
NVRAM and survived up/downgrades.  This was comforting in that you knew
that no matter what you flashed (with caveats) you would not lose your
configuration.

This assurance is gone with Kamikaze.  Upgrading is much more of PITA,
ensuring that I've saved all my settings from /etc/[config] and having
to reload them back, but only after I've gone through the gyrations of
fixing up the default router address re-assignment [you all know the
rigmarole], etc., etc.

Along with all of this is the always uncertainty as to the stability of
the upgraded firmware.  Maybe it will be unsuitable for some reason, so
now you have to downgrade again and go through the whole process a
second time.  Maybe your downgrade also does not roll everything back
properly.  Now where do you go?

I mitigate some of this by keeping my / on USB storage.  That way, I can
to some degree, take comfort in upgrades by first duping my USB key to
another key (or just some other storage) so that know that I can get
back my previous / after I downgrade to my previous flashed image (IOW,
kernel).

But all this flashing to up/downgrade a kernel and essentially what is
an initrd (given that I mount USB storage on /) seems silly.

I wonder what the feasibility is of instead of putting a linux kernel in
the kernel portion of the flash image and essentially what's an initrd
in the filesystem portion (because remember, all the / in the flash
image does for me is mount USB storage on /), putting a simple boot
loader that can load the kernel from the USB storage based filesystem.
Given that model the kernel is coupled with the rest of the system on a
single USB storage device which you just plug in and boot.  Pull the
device and replace with another and get the kernel that goes along with
it.

It's worth recognizing and mentioning that perhaps this boot loader
could actually be a full linux kernel and a very small / that simply
kexecs a new kernel from the USB storage once it's mounted at /.  I
wonder how portable kexec is amongst the processors Linux runs on.

Being able to operate like this would take a lot of the fear (and work)
of upgrading away since you can upgrade simply by using a new USB
storage device (which you might even have prepared on some machine other
than the router) and keep the old one sitting around in case you need to
quickly back out to plan B.

FWIW, this is all in reference to my particular WAP which is an ASUS
WL-500g Premium, but portability where USB storage devices can be used
would be ideal.

Thots?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] AP/master mode with b43

2008-11-12 Thread Brian J. Murrell
On Wed, 2008-11-12 at 15:22 +0100, Michael Buesch wrote:
 On Wednesday 12 November 2008 14:22:46 Brian J. Murrell wrote:
  I can see in the bottom-half where all of those are handled except
  B43_IRQ_DMA.  I don't see anywhere in the whole driver where that is
  handled in fact.
 
 It's handled implicitely by the DMA handling. You can ignore that IRQ.

OK.

 What's not handled correctly is the PMQ and TBTT indication IRQs.
 See the FIXMEs and TODOs in the code that handle these IRQs.

Indeed.  So that's the root of the high softirqs on an AP?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] AP/master mode with b43

2008-11-12 Thread Brian J. Murrell
On Wed, 2008-11-12 at 12:39 +0100, Michael Buesch wrote:
 On Wednesday 12 November 2008 04:27:14 Brian J. Murrell wrote:
  Please excuse the cross-posting but this thread started on openwrt-users
  but the findings are probably more relevant to the developers.
  
  On Tue, 2008-10-21 at 17:46 +0200, Michael Buesch wrote:
   
   Lookup b43_interrupt_handler() and look for the reason variable.
   Fairly straightforward, IMO.
  
  OK.  I've managed to tool up a b43.ko with a printk and this is what I
  see, before I even pump anything through the wireless link (i.e. up in
  Master mode, and idle):
 
 Did you print the value _after_ it was masked with the mask? It seems you 
 didn't.

All I did was:

if (b43_status(dev)  B43_STAT_STARTED)
goto out;
reason = b43_read32(dev, B43_MMIO_GEN_IRQ_REASON);
+   /* don't print transmits */
+   if (reason  B43_IRQ_TX_OK)
+   ;
+   else
+   printk(KERN_INFO b43_interrupt_handler: 0x%x\n, reason);
if (reason == 0x)   /* shared IRQ */
goto out;
ret = IRQ_HANDLED;

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] AP/master mode with b43

2008-11-12 Thread Brian J. Murrell
On Wed, 2008-11-12 at 13:57 +0100, Michael Buesch wrote:
 
 Yeah, wrong.
 Do it later _after_ checking for shared IRQ and after the masking.
 
 1892 static irqreturn_t b43_interrupt_handler(int irq, void *dev_id)
 1893 {
 1894 irqreturn_t ret = IRQ_NONE;
 1895 struct b43_wldev *dev = dev_id;
 1896 u32 reason;
 1897 
 1898 if (!dev)
 1899 return IRQ_NONE;
 1900 
 1901 spin_lock(dev-wl-irq_lock);
 1902 
 1903 if (b43_status(dev)  B43_STAT_STARTED)
 1904 goto out;
 1905 reason = b43_read32(dev, B43_MMIO_GEN_IRQ_REASON);
 1906 if (reason == 0x)   /* shared IRQ */
 1907 goto out;
 1908 ret = IRQ_HANDLED;
 1909 reason = b43_read32(dev, B43_MMIO_GEN_IRQ_MASK);
 1910 if (!reason)
 1911 goto out;
 
  Insert printk code here 

OK.  So doing it here, while link is idle I see many:

0x8000 (B43_IRQ_DMA) and 0x4 (B43_IRQ_TBTT_INDI) intermixed.

When I start cranking traffic through, the last series of prints before
the link dies are:

b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8000
b43-phy8 debug: Updated beacon template at 0x68
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x68
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x68
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x68
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x68
b43_interrupt_handler: 0x4
b43_interrupt_handler: 0x8000
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43-phy8 debug: Updated beacon template at 0x468
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040
b43_interrupt_handler: 0x8040

Re: [OpenWrt-Devel] why no 8.09 RC1 announcement here?

2008-11-11 Thread Brian J. Murrell
On Tue, 2008-11-11 at 10:24 +0100, Gregers Petersen wrote:
 I believe it is appropriate to mention that the developer-group as a
 whole has been, and is, very hard working and in lack of adequate time -
 unfortunately this makes slips-of-the-mind possible, and I can only
 make a note in this regard.

That is fair enough.  Which is why I posted it here myself.

The main reason for my posting the announcement however was not to point
out that it slipped somebody's mind but rather to comment on what is
being promised as functioning in the release and how my own and others'
experiences are in conflict with those promises.

Do you really think it's fair to call the current b43 AP mode functional
given the two major defects that have been reported; those being the
huge softirq (beating the crap out of the CPU) and the wireless
connection dropping after some amount of data being pushed through it?

Maybe there is a plan to fix those before the final release, but in that
case I think the RC1 notice should have made note of the known issues
and the plan to have them fixed by the release.

Unfortunately I'm not a kernel-space developer so I don't know how to go
about figuring out why the softirq is so high -- or I would, given that
it was reported on the openwrt-users list as trivial to discover.
Trivial for somebody who understands the intricacies of the kernel and
interrupt handlers and so on I guess.

b.




signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] why no 8.09 RC1 announcement here?

2008-11-11 Thread Brian J. Murrell
On Tue, 2008-11-11 at 10:06 +0100, ZioPRoTo (Saverio Proto) wrote:
 
 thanks for reporting on mailing list! I never read forums ...

soapbox
Me neither.  In contrast to e-mail, they are an asinine way to
communicate.  Having to poll (i,e, go to a webpage and check to see if
there are any replies to your messages) is just silly.  If I had to do
that for every mailing list I am on I'd spend all day checking webpages
just in case somebody has replied to me.

And before somebody tells me I can get an e-mail when somebody replies
to me on a forum, that's like having the postman come to my door and
tell me that there is mail at the post office for me to go pick up
instead of him just bringing it with him.

If people really want pretty little web-pages with silly little 20x4
boxes to type in to communicate with, I wish somebody would come up with
a forums-email (i.e. two way -- I get forum posts in e-mail and I can
post to forums via e-mail) gateway so that busy old codgers like me can
participate without having to waste most of their day polling web pages.
/soapbox

In any case, I have bothered the PunBB developers about this [lack of]
feature.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] AP/master mode with b43

2008-11-11 Thread Brian J. Murrell
Please excuse the cross-posting but this thread started on openwrt-users
but the findings are probably more relevant to the developers.

On Tue, 2008-10-21 at 17:46 +0200, Michael Buesch wrote:
 
 Lookup b43_interrupt_handler() and look for the reason variable.
 Fairly straightforward, IMO.

OK.  I've managed to tool up a b43.ko with a printk and this is what I
see, before I even pump anything through the wireless link (i.e. up in
Master mode, and idle):

b43_interrupt_handler: 0xc18a
b43_interrupt_handler: 0x418e
b43_interrupt_handler: 0xc18a
b43_interrupt_handler: 0x418e
b43_interrupt_handler: 0xc18a
b43_interrupt_handler: 0x418e
...

but looking at the IRQ reasons in b43.h I see a hole.  Let's take the
first one for example:

0xc18a:
0xc000 = B43_IRQ_DMA | B43_IRQ_TIMER1
0x0100 = B43_IRQ_PIO_WORKAROUND
0x0080 = undefined
0x000a = B43_IRQ_BEACON_TX_OK | B43_IRQ_BEACON

The next one:
0x418e:
0x4000 = B43_IRQ_TIMER1
0x0100 = B43_IRQ_PIO_WORKAROUND
0x0080 = undefined
0x000e = B43_IRQ_BEACON_TX_OK | B43_IRQ_TBTT_INDI | B43_IRQ_BEACON

I wonder what 0x0080 is.

So I tried masking off B43_IRQ_BEACON IRQs and sure no more noise but
very very few reasons being logged at all, including none during normal
tx/rx.  Beacons must be in every interrupt.

So let's just mask off the B43_IRQ_TX_OK interrupts and send some bulk
data (which drives the softirq through the ceiling).  The last packets
through the router caused the following interrupts:

b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc58a
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0xc58a
b43_interrupt_handler: 0xc5ce
b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0xc58a
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0xc5ca
b43_interrupt_handler: 0x458e
b43_interrupt_handler: 0xc58a
b43_interrupt_handler: 0xc58a
b43_interrupt_handler: 0xc58a

Which are:

0x458e: B43_IRQ_TIMER1 | 
0x400 (unknown) | B43_IRQ_PIO_WORKAROUND |
0x80 (unknown) |
B43_IRQ_BEACON_TX_OK | B43_IRQ_TBTT_INDI | B43_IRQ_BEACON

0xc5ca: B43_IRQ_DMA | B43_IRQ_TIMER1 |
0x400 (unknown) | B43_IRQ_PIO_WORKAROUND |
0x80 (unknown) | B43_IRQ_PMQ |
B43_IRQ_BEACON_TX_OK | B43_IRQ_BEACON

0xc58a: B43_IRQ_DMA | B43_IRQ_TIMER1 |
0x400 (unknown) | B43_IRQ_PIO_WORKAROUND |
0x80 (unknown) |
B43_IRQ_BEACON_TX_OK | B43_IRQ_BEACON

0xc5ce: B43_IRQ_DMA | B43_IRQ_TIMER1 |
0x400 (unknown) | B43_IRQ_PIO_WORKAROUND |
0x80 (unknown) | B43_IRQ_PMQ |
B43_IRQ_BEACON_TX_OK | B43_IRQ_TBTT_INDI | B43_IRQ_BEACON

All packets had two unknown IRQ masks, 0x400 and 0x80.

It's also interesting to note that with relation to the issue of the
wireless interface all of a sudden stopping it's transmission of data
after a certain amount of bulk, which a number of people have reported;
it seems to correlate to a:

b43-phy7 debug: Updated beacon template at 0x68

event.

Is any of this useful?

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] repeated kernel config questions

2008-11-10 Thread Brian J. Murrell
Using Kamikaze r13161 every time I run a make I get prompted for the
following kernel options:

  Excessive debugging output (IEEE1394_VERBOSEDEBUG) [N/y/?] (NEW) 
  Texas Instruments PCILynx support (IEEE1394_PCILYNX) [N/m/?] (NEW) 
Enable replacement for physical DMA in SBP2 (IEEE1394_SBP2_PHYS_DMA) 
[N/y/?] (NEW) 
  IP over 1394 (IEEE1394_ETH1394) [N/m/?] (NEW) 
  OHCI-DV I/O support (deprecated) (IEEE1394_DV1394) [N/m/?] (NEW) 

I did do a make oldconfig before trying to build this rev. but still I
get asked these same questions on every make world.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] repeated kernel config questions

2008-11-10 Thread Brian J. Murrell
On Mon, 2008-11-10 at 14:03 +0100, Gregers Petersen wrote:
 
 Did you try 'make clean' and then a new 'menuconfig' ?

I did make clean before I did make oldconfig.  Why should I need to make
menuconfig?  I don't want to use the stupid menu interface.  make
oldconfig should achieve the same thing, no?  make oldconfig did ask me
questions about new openwrt options, but it did not prompt me about any
of those kernel options.

I suspect there is a disconnect between those new kernel options and the
supporting options in openwrt's configuration for them or some such.
I'm not entirely clear of the relationship between those configs.

b.



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] why no 8.09 RC1 announcement here?

2008-11-10 Thread Brian J. Murrell
I'm wondering why the 8.09 RC1 announcement was not made here.  It was
made on the forums at
http://forum.openwrt.org/viewtopic.php?pid=75990.  Do we really have to
subject ourselves to the far inferior interface of silly forums in
order to be up to date on this stuff?

Mailing lists are where the heart of the Internet is, not
johnny-come-lately web forums.  It's disappointing to see the OpenWrt
team treat forums with such preference and the mailing lists with such
prejudice.

In any case, the release announcement made on the forums is as such:

It is well known fact that it takes time to build quality, and sometimes
more time than expected. The OpenWrt developers would like to announce
the availability of OpenWrt Kamikaze 8.09 RC1.
You can find it at http://downloads.openwrt.org/kamikaze/8.09_RC1

Release Candidate 1 for Kamikaze 8.09

New changes/features include:

* Busybox upgraded to 1.11.2
* Kernel upgrades for all targets
* uClibc upgraded to 0.9.29
* Firewall rewrite, fully modular netfilter/iptables support
- Syntax of /etc/config/firewall converted to UCI
* ipkg package manager replaced with opkg
- package lists moved to ramdisk, lists are not retained 
between reboots.
- `opkg update' must be run after each reboot before new 
packages are installed
* Broadcom 47xx running reliably with the new Kernel, including b43 
wireless driver
- WEP, WDS and multi-SSID not yet supported
- AP mode and STA mode are supported with WPA, WPA2, or no 
encryption
* IMQ and Traffic shaping fixed with newer kernels (2.6.25+)
* Sysupgrade for x86, broadcom and adm5120
* New web interface (LuCI, Lua Configuration Interface)
* New HAL and driver for Atheros based WiFi cards
* Attention towards the integration of security updates
* Build system cleanup
* Package maintaining and updates between releases 

Supported targets:

* AMD Alchemy (MeshCube)
* Atheros AR531x/231x based routers
* Atheros AR71xx based routers
* Atmel AVR32
* Broadcom 47xx based routers (Linux 2.4 and 2.6)
* Infineon/ADMtek ADM5120
* Infineon Danube/TwinPass
* Intel IXP42x/43x
* MagicBox
* MikroTik RouterBoard 532
* RDC SoC
* Texas Instruments AR7
* User-Mode Linux (source code release only)
* x86 based boards

Known Issues:
* New uClibc version breaks ABI compatibility with older releases.
* Wireless no longer supported on older Broadcom devices 
(bcm4710/bcm94702)
  - Support was dropped in upstream Broadcom wl driver and b43
  - b43legacy (which adds support for such hardware) might be added 
in a future release

The OpenWrt Team

I think it's really bad to be advertising the support of b43 on Broadcom
47xx based systems given that it works so badly in both my own
experience and the experiences of others on the above announcement
forum.

The throughput is dismal due to the amount of softirq:

Mem: 14404K used, 15524K free, 0K shrd, 1008K buff, 6800K cached
CPU:   0% usr   0% sys   0% nice   0% idle   0% io   0% irq  99% softirq
Load average: 1.21 0.33 0.31
  PID  PPID USER STAT   VSZ %MEM %CPU COMMAND
3 2 root RW  0   0%  57% [ksoftirqd/0]

This is without any encryption (i.e. WEP, WPA, etc.), just plain,
clear-text wireless.  Resulting throughput is 1.4MB/s on an 802.11g
connection showing a link quality of 100/100.  So out of a theoretical
54Mb/s actual throughput with all that softirq activity is only 10Mb/s
or 20% with the CPU of the router pegged at full.

As well, the wireless connection only works for a while after which it
just stops passing any traffic and then you have to issue
an /etc/init.d/network restart in order to have it working again.

Many people are reporting these results, not just me.

The user that posted the release also said subsequently in the same
forum thread (http://forum.openwrt.org/viewtopic.php?pid=76039#p76039):

broadcom 47xx needs to be migrated to 2.6.27 before we can fully
take advantage of the new mac80211 stuff.
this won't happen in 8.09, but probably in the release after
that.

So it's known that b43 and broadcom 47xx are known to not work until at
least 2.6.27 yet it's still being included in the 8.09 release
announcements?

Maybe a bit of work on why the softirq is so high and solving that could
be done before 8.09 is final and that would be at least a big step
closer to an actual working b43 in 8.09.

IMHO, if you wanted to keep the b43/bcm47xx in the release announcement,
this softirq 

  1   2   >