[OpenWrt-Devel] netfilter -j QUEUE fails with nf_queue: error creating packet message

2011-05-06 Thread Anders
 Hi,

I've written a simple netfilter app intercepting packets using the QUEUE
target. It work ok when run on my gentoo machine, but on vanilla
backfire, it fails with a number of:
192.168.1.1 kernel: nf_queue: error creating packet message
in the log.

I seem to be getting one of those for each package which _should_ go to
userspace. Googling on that error sting and some digging in the kernel
source gave me no additional clues.

For my tests I've moved my app to the SDK and created the necessary
Makefiles etc for it. I then moved the resulting binary and nfnetlink.ko
to openwrt:/tmp/ and insmodded the kernel modules and ran the binary.
The binary exeutes fine so I see no issue with the compilation process.
I also added a simple rule to trigger it iptables -I OUTPUT -p icmp -j
QUEUE and a ping to the box is duly interrupted when the rule is
instantiated.

I'm at a loss! Any ideas what makes the kernel _not_ forward the packets
to my app?
The same source works on my gentoo laptop.

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


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Ithamar R. Adema
On Thu, 2011-05-05 at 16:49 -0600, Philip Prindeville wrote:
 I agree that user files should take precedence over canned release
 files (actually, I thought this was the case?).

This used to be the cause, but broken a while ago.

See this[1] disucssion for previous discussion on basically the same
problem.

Ithamar.

[1]:
https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/010191.html


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


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Joachim Schlipper
Philip, thanks for pointing me to that.
I was thinking of doing something similar as a last resort, but had the
belief there must be a better way.
But when you do it that way, my conscience permits me to do the same :-)

cheers
Joachim

On 05/06/2011 12:49 AM, Philip Prindeville wrote:
 Joachim:

 I've had to deal with this and similar issues (wrong ordering of startup 
 scripts, etc) by having:

 #!/bin/sh

 cat __EOF__ /etc/config/foo
 ...
 __EOF__

 as an /etc/uci-defaults/xyzzy script.

 Ugly, but it works.

 I agree that user files should take precedence over canned release files 
 (actually, I thought this was the case?).

 -Philip


 On 5/5/11 10:24 AM, Joachim Schlipper wrote:
 Hi Jow,

 thanks for the quick reply.
 The problem is that if I just copy my own configuration file to
 /etc/config/openvpn, it will be overwritten by the one from the
 openvpn-package. So my config is lost.

 Joachim

 On 05/05/2011 06:16 PM, Jo-Philipp Wich wrote:
 Hi.

 Any mechanism that relies on any particular package installation order
 during image creation is by definition broken.

 Better use the files/ directory in your buildroot toplevel folder (you
 have to create it first) and then put your stuff there, e.g.

   files/etc/openvpn/cert.crt
   files/etc/openvpn/key.pem
   files/etc/openvpn/blah.conf
   files/etc/config/openvpn


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

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


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 The problem is that if I just copy my own configuration file to
 /etc/config/openvpn, it will be overwritten by the one from the
 openvpn-package. So my config is lost.

Not if you put it in the files/ dir of the buildroot topdir as I wrote.
Its processed last, after all packages got install and overrides anything.

~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3Dxb0ACgkQdputYINPTPMl7wCeK2DEv4xsF6kOfhKDC30/IScf
vFUAoJV5ujTVBDY1G1GlBU35H75lVoEn
=pSlR
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The linked discussion refers to an entirely different matter.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3DxosACgkQdputYINPTPPUMwCfStx5Xh72QnO35HV0O/1qfhDG
NEsAoKNWKmrnmLEAIBZY2rMouX2q/Ra2
=smmF
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Joachim Schlipper
Sorry Jow, I didn't misunderstood what you meant with buildroot topdir.
I guess now you mean a files folder that is not in my package dir, but
somewhere in the build_dir folder (or any descendant), right?
Now I'm searching for the folder or any example that uses it, but I can't
find one. Could you give me an example Makefile line?

Joachim

On 05/06/2011 11:56 AM, Jo-Philipp Wich wrote:
  The problem is that if I just copy my own configuration file to
  /etc/config/openvpn, it will be overwritten by the one from the
  openvpn-package. So my config is lost.

 Not if you put it in the files/ dir of the buildroot topdir as I wrote.
 Its processed last, after all packages got install and overrides anything.

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


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


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-06 Thread John Crispin
On 06/05/11 15:13, Peter Lebbing wrote:
 On 02/05/11 14:01, John Crispin wrote:
 after the very long thread on the ML, i figure no one was aware that the
 patch was complete.
 
 So, can someone please commit my patch,
 http://patchwork.midlink.org/patch/906/ ?
 
 (Or tell me why not...)
 
 Thanks,
 
 Peter.
 
patch looks ok, let me apply it 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Problem: Cannot satisfy the dependencies for ... during installation into image

2011-05-06 Thread Joachim Schlipper
Ah, now I get it. I guess I was thinking too complicated to realize that
it's that simple.
Thanks a lot!

Joachim

On 05/06/2011 01:42 PM, Jo-Philipp Wich wrote:
 With topdir I mean the directory where you run make in,
 feeds.conf.default and LICENSE are located there.

 As I also wrote initially you have to create this folder, it is not
 there by default.

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

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


Re: [OpenWrt-Devel] [PATCH v2 1/1] lm-sensors: split out sensors-detect from rest of package

2011-05-06 Thread Luka Perkov
On Thu, May 05, 2011 at 05:28:43PM -0600, Philip Prindeville wrote:
 Since sensors-detect isn't always needed where sensors is used, and has 
 unexpressed dependency on perl, it might make more sense to have this be 
 separated out...
 
 Redux with better perl dependencies.

Applied in 26838 with minor changes. Tips for next time:

* you forgot to bump PKG_RELEASE because PKG_VERSION stayed the same
* reply to your own mails when resubmitting the patch
* for small patches like this one you did not have to make 'announcement'
* send patch inline

More info here:

https://dev.openwrt.org/wiki/SubmittingPatches

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


[OpenWrt-Devel] [PATCH] add interface and hosts parsing from uci dhcp config to ISC dhcpd (fix bridges)

2011-05-06 Thread Rajko Stojadinovic
This allows people to use the luci interface to specify to dhcpd which
interfaces it should listen to, and which static MAC-IP host mappings
should it define
For the interface, this has to be done in the initscript, via
commandline when the server is started
For the static hosts, the initscript makes a file called
/tmp/dhcpd.hosts which you can include in your dhcpd.config to use the
webgui defined hosts
Fix: 7.5.2011. Now works properly on interfaces which are in a bridge

Signed-off-by: Rajko Stojadinovic ad...@rajko.info

Index: dhcpd.init
===
--- dhcpd.init  (revision 26837)
+++ dhcpd.init  (working copy)
@@ -4,7 +4,66 @@
 lease_file=/tmp/dhcpd.leases
 config_file=/etc/dhcpd.conf
 pid_file=/var/run/dhcpd.pid
+hosts_file=/tmp/dhcpd.hosts
+dhcp_ifs=

+append_interface() {
+   local ifname=$(uci_get_state network $1 device)
+   if [ $(uci_get_state network $1 type) = bridge ]; then
+   ifname=$(uci_get_state network $1 ifname); fi
+
+   if [ -z $dhcp_ifs ]; then
+   dhcp_ifs=$ifname
+   else
+   dhcp_ifs=$dhcp_ifs $ifname
+   fi
+}
+
+parse_dhcp() {
+   local cfg=$1
+   config_get net $cfg interface
+   [ -n $net ] || return 0
+
+   config_get_bool ignore $1 ignore 0
+   if [ $ignore -eq 1 ]; then return 0; fi
+
+   append_interface $net
+}
+
+parse_host_entry() {
+   local cfg=$1
+
+   config_get name $cfg name
+
+   config_get ip $cfg ip
+   [ -n $ip ] || return 0
+
+   local i=0
+   config_get mac $cfg mac
+   for m in $mac; do
+   local hostid=$name
+   if [ $i -ne 0 ]; then hostid=$name_$i; fi
+
+   echo host $hostid {  $hosts_file
+   echo hardware ethernet $m;  $hosts_file
+   echo fixed-address $ip;  $hosts_file
+   echo }  $hosts_file
+
+   i=$((i+1))
+   done
+}
+
+init_config() {
+   echo  #Automatically generated by dhcpd initscript, any
modifications will be overwritten  $hosts_file
+
+   include /lib/network
+   scan_interfaces
+   config_load dhcp
+
+   config_foreach parse_host_entry host
+   config_foreach parse_dhcp dhcp
+}
+
 start() {
if [ -e $pid_file ] ; then
 echo   dhcpd already running with PID `cat $pid_file`
@@ -17,9 +76,11 @@
echo   Creating $lease_file
touch $lease_file
fi
+
+   init_config
+
+   /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file $dhcp_ifs

-   /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file
-   
if [ $? -ne 0 ]; then
echo   isc-dhcpd failed to start
fi
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel