Re: [gentoo-user] Configuring hostapd

2015-08-16 Thread Cor Legemaat
On Mon, 2015-08-10 at 15:20 -0400, Fernando Rodriguez wrote:
 On Monday, August 10, 2015 8:59:27 AM Cor Legemaat wrote:
  On Thu, 2015-08-06 at 23:41 -0400, Fernando Rodriguez wrote:
   On Thursday, August 06, 2015 7:04:27 AM Cor Legemaat wrote:
On Wed, 2015-08-05 at 01:00 -0400, Fernando Rodriguez wrote:
 On Tuesday, August 04, 2015 8:18:43 PM Cor Legemaat wrote:
  On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez 
  wrote:
   On Sunday, August 02, 2015 11:12:07 PM Mick wrote:
On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez 
wrote:
 On Sunday, August 02, 2015 1:29:50 PM Mick wrote:
  On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez
  wrote:
   Hello,
   
   After installing hostapd I can successfully 
   connect
   to
   the
   AP, I can
   get DHCP from it, but I cannot access the network
   through it
   (neither
   lan or internet).
  
  This sounds like a (network) routing problem, 
  rather
  than a
  hostapd
  issue.
 
 It looks like that, but if I stop iptables 
 completely on
 the
 router all
 unicast traffic still works in the lan (both wired 
 and
 through
 an external
 AP), so if I connect to the hostapd AP with iptables 
 off,
 shouldn't I at
 the very least be able to ping the wireless 
 interface on
 the
 router?
 
 I also tried with only the following rule which 
 enables
 internet
 access to
 all wired workstations and through external AP:
 
 iptables -t nat -A POSTROUTING -o enp0s8 -j 
 MASQUERADE

You should probably specify the local subnet, so that
multicast packets are
not sent out to the Internet, e.g.:

iptables -t nat -A POSTROUTING -o enp0s8 -s 
192.168.1.0/24
! -d
   192.168.1.0/24
-j MASQUERADE

(Change 192.168.1.0/24 to suit your LAN subnet)
   
   I'm not actually using that rule except as a minimal 
   setup
   for troubleshooting
   this issue. My actual rules do specify the subnet.
   
Also have you enabled ip forwarding in your kernel:

sysctl -w net.ipv4.ip_forward=1
   
   Yes, it is an existing router that works perfectly except
   for the hostapd AP.
   My current setup is as follows:
   
   Internet - Gentoo Router - Switch - AP
   
   Where AP is a wifi router with routing features disabled.
   Never had
   problems
   with it. Now I installed hostapd on Gentoo Router and
   everything
   else still
   works fine except when I connect to the hostapd AP. Even
   with only
   that minimal
   iptable rule or no rules at all.
   
   Thanks,
   
  Probably /dev/random depleated, try enable your hardware 
  rng
  or sys-
  apps/haveged test with `cat
  /proc/sys/kernel/random/entropy_avail`
  
  Regards:
  Cor
 
 Thanks. II did get an error about depleted entropy at some 
 point when starting
 hostapd but I went ahead and installed haveged and it still
 doesn't work. It
 doesn't even work when configured as an open AP. I checked 
 the kernel config and
 I had VLAN support disabled. I've rebuilt it but can't 
 reboot right now. Maybe
 it's required even though I'm not using VLANs?
 
Is there an IP configured on the interface or the bridge of 
that interface?
   
   Yes
   
Can you ping your gateway?
   
   No...I can ping it locally or remotely when I connect through 
   the external AP
   but not through hostapd.
   
If I'm correct dhcp uses
broadcast but you need a valid gateway IP switchable on mac 
layer.

Does it stay connected?
   
   Yes
   
I have a problem with a link between hostapd
and a mikrotik device on 802.11a where I needed to patch 
hostapd to get it to stay connected. But that should show in 
hostapd debug logs. Mine is still running on hostapd-2.3 
because if I update and screw it my internet is broken, if 
that's your problem I will search for my notes and mail it.
   
   Tried hostapd-2.3 too, same thing.
   I will try it on a laptop with a more recent adapter tomorrow to 
   rule that
   out.
   
Regards: Cor
   
  If you stay connected I would assume your hostapd setup and key is 
  correct, otherwise you wouldn't receive a dhcp answer. That must 
  be an IP config/iptables problem but very difficult to help if I 
  can't see your setup.
  
  Regards:
  Cor
 
 I used only this rule for testing:
 iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
 
 I tested on a laptop and the same setup works with one

Re: [gentoo-user] Re: crossdev runtime version

2015-08-10 Thread Cor Legemaat
On Wed, 2015-08-05 at 00:45 -0400, Fernando Rodriguez wrote:
 On Tuesday, August 04, 2015 5:16:09 PM walt wrote:
  On Tue, 04 Aug 2015 18:40:49 +0200
  Cor Legemaat c...@cor.za.net wrote:
  
   Hi:
   
   I want to install a mingw64 compiler with =dev-util/mingw64-
   runtime- 4.0.1, tried with the cmd:
crossdev --lenv 'CFLAGS=-march=generic -mtune=generic -O2 -
pipe CXXFLAGS=-march=generic -mtune=generic -O2 -pipe' --ex-
gdb -t x86_64-w64-mingw32 --ov-output /usr/local/portage-
crossdev --l 4.0.1 --k 4.0.1 -P '-v'
   but cross-x86_64-w64-mingw32/mingw64-runtime-3.2.0-r1 get 
   installed.
   
   What am I doing wrong?
  
  I notice you are using a version of Evolution that is not 
  available yet in gentoo.  Are you using gentoo package overlays, 
  or installing packages from non-gentoo source repositories?  (I 
  see /usr/local in your message :)
  
  Sometimes these little details can give important clues.
  
 It should give you 4.0.1 even without the --l 4.0.1 as that's the 
 latest
 unstable version. Are you sure that crossdev went all the way 
 through? I
 usually have to disable the fortran use flag or it fails half way. 
 If you have
 a previous version maybe the 3.2.0 version is from another build. 
 What's the
 output of:
 
 qlop -gvH mingw64-runtime
 
 You could also use crossdev -C to remove it completely and start 
 fresh (after
 cleaning any leftovers in /etc/portage).
 
 What is the contents of /etc/portage/package.keywords/cross-x86_64-
 w64-mingw32
 after the build completes? It should have ~amd64 amd64 for mingw64-
 runtime.
 
 Also check that you don't have any cross-x86_64-w64-mingw32 entries 
 anywhere
 else on your /etc/portage/package.* files and directories.
 
 You can also verify that /usr/local/portage-crossdev/cross-x86_64-
 mingw32
 points to the right directory on /usr/portage just in case.
 
 If all that checks then I at a loss. It installed 4.0.1 for me 
 without any
 arguments but the triplet. You could try:
 
 emerge -pv cross-x86_64-w64-mingw32/mingw64-runtime
 or
 emerge -pv =cross-x86_64-w64-mingw32/mingw64-runtime-4.0.1
 
 and see if it gives you any clues.
 
Found it, tnx. I changed my portage from syncing over rsync to git 
according to https://wiki.gentoo.org/wiki/Project:Git_mirrorĀ that 
changed my repository from /usr/portage to /usr/portage/db and 
crossdev -C didn't delete the symlinks to the portage repository. 
Removed them manual now every thing fine.

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] Configuring hostapd

2015-08-10 Thread Cor Legemaat
On Thu, 2015-08-06 at 23:41 -0400, Fernando Rodriguez wrote:
 On Thursday, August 06, 2015 7:04:27 AM Cor Legemaat wrote:
  On Wed, 2015-08-05 at 01:00 -0400, Fernando Rodriguez wrote:
   On Tuesday, August 04, 2015 8:18:43 PM Cor Legemaat wrote:
On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez wrote:
 On Sunday, August 02, 2015 11:12:07 PM Mick wrote:
  On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote:
   On Sunday, August 02, 2015 1:29:50 PM Mick wrote:
On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez 
wrote:
 Hello,
 
 After installing hostapd I can successfully connect 
 to
 the
 AP, I can
 get DHCP from it, but I cannot access the network
 through it
 (neither
 lan or internet).

This sounds like a (network) routing problem, rather 
than a
hostapd
issue.
   
   It looks like that, but if I stop iptables completely on 
   the
   router all
   unicast traffic still works in the lan (both wired and
   through
   an external
   AP), so if I connect to the hostapd AP with iptables off,
   shouldn't I at
   the very least be able to ping the wireless interface on 
   the
   router?
   
   I also tried with only the following rule which enables
   internet
   access to
   all wired workstations and through external AP:
   
   iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
  
  You should probably specify the local subnet, so that 
  multicast packets are
  not sent out to the Internet, e.g.:
  
  iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 
  ! -d
 192.168.1.0/24
  -j MASQUERADE
  
  (Change 192.168.1.0/24 to suit your LAN subnet)
 
 I'm not actually using that rule except as a minimal setup 
 for troubleshooting
 this issue. My actual rules do specify the subnet.
 
  Also have you enabled ip forwarding in your kernel:
  
  sysctl -w net.ipv4.ip_forward=1
 
 Yes, it is an existing router that works perfectly except 
 for the hostapd AP.
 My current setup is as follows:
 
 Internet - Gentoo Router - Switch - AP
 
 Where AP is a wifi router with routing features disabled. 
 Never had
 problems
 with it. Now I installed hostapd on Gentoo Router and
 everything
 else still
 works fine except when I connect to the hostapd AP. Even 
 with only
 that minimal
 iptable rule or no rules at all.
 
 Thanks,
 
Probably /dev/random depleated, try enable your hardware rng 
or sys-
apps/haveged test with `cat 
/proc/sys/kernel/random/entropy_avail`

Regards:
Cor
   
   Thanks. II did get an error about depleted entropy at some point 
   when starting
   hostapd but I went ahead and installed haveged and it still 
   doesn't work. It
   doesn't even work when configured as an open AP. I checked the 
   kernel config and
   I had VLAN support disabled. I've rebuilt it but can't reboot 
   right now. Maybe
   it's required even though I'm not using VLANs?
   
  Is there an IP configured on the interface or the bridge of that 
  interface?
 
 Yes
 
  Can you ping your gateway?
 
 No...I can ping it locally or remotely when I connect through the 
 external AP
 but not through hostapd.
 
  If I'm correct dhcp uses
  broadcast but you need a valid gateway IP switchable on mac layer.
  
  Does it stay connected?
 
 Yes
 
  I have a problem with a link between hostapd
  and a mikrotik device on 802.11a where I needed to patch hostapd 
  to get it to stay connected. But that should show in hostapd debug 
  logs. Mine is still running on hostapd-2.3 because if I update and 
  screw it my internet is broken, if that's your problem I will 
  search for my notes and mail it.
 
 Tried hostapd-2.3 too, same thing.
 I will try it on a laptop with a more recent adapter tomorrow to 
 rule that
 out.
 
  Regards: Cor
 
If you stay connected I would assume your hostapd setup and key is 
correct, otherwise you wouldn't receive a dhcp answer. That must be an 
IP config/iptables problem but very difficult to help if I can't see 
your setup.

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] Configuring hostapd

2015-08-05 Thread Cor Legemaat
On Wed, 2015-08-05 at 01:00 -0400, Fernando Rodriguez wrote:
 On Tuesday, August 04, 2015 8:18:43 PM Cor Legemaat wrote:
  On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez wrote:
   On Sunday, August 02, 2015 11:12:07 PM Mick wrote:
On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote:
 On Sunday, August 02, 2015 1:29:50 PM Mick wrote:
  On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote:
   Hello,
   
   After installing hostapd I can successfully connect to 
   the
   AP, I can
   get DHCP from it, but I cannot access the network 
   through it
   (neither
   lan or internet).
  
  This sounds like a (network) routing problem, rather than a
  hostapd
  issue.
 
 It looks like that, but if I stop iptables completely on the
 router all
 unicast traffic still works in the lan (both wired and 
 through
 an external
 AP), so if I connect to the hostapd AP with iptables off,
 shouldn't I at
 the very least be able to ping the wireless interface on the
 router?
 
 I also tried with only the following rule which enables 
 internet
 access to
 all wired workstations and through external AP:
 
 iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE

You should probably specify the local subnet, so that multicast
packets are
not sent out to the Internet, e.g.:

iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d
   192.168.1.0/24
-j MASQUERADE

(Change 192.168.1.0/24 to suit your LAN subnet)
   
   I'm not actually using that rule except as a minimal setup for
   troubleshooting
   this issue. My actual rules do specify the subnet.
   
Also have you enabled ip forwarding in your kernel:

sysctl -w net.ipv4.ip_forward=1
   
   Yes, it is an existing router that works perfectly except for the
   hostapd AP.
   My current setup is as follows:
   
   Internet - Gentoo Router - Switch - AP
   
   Where AP is a wifi router with routing features disabled. Never 
   had
   problems
   with it. Now I installed hostapd on Gentoo Router and 
   everything
   else still
   works fine except when I connect to the hostapd AP. Even with 
   only
   that minimal
   iptable rule or no rules at all.
   
   Thanks,
   
  Probably /dev/random depleated, try enable your hardware rng or 
  sys-
  apps/haveged test with `cat /proc/sys/kernel/random/entropy_avail`
  
  Regards:
  Cor
 
 Thanks. II did get an error about depleted entropy at some point 
 when starting
 hostapd but I went ahead and installed haveged and it still doesn't 
 work. It
 doesn't even work when configured as an open AP. I checked the 
 kernel config and
 I had VLAN support disabled. I've rebuilt it but can't reboot right 
 now. Maybe
 it's required even though I'm not using VLANs?
 
Is there an IP configured on the interface or the bridge of that 
interface? Can you ping your gateway? If I'm correct dhcp uses 
broadcast but you need a valid gateway IP switchable on mac layer.

Does it stay connected? I have a problem with a link between hostapd 
and a mikrotik device on 802.11a where I needed to patch hostapd to 
get it to stay connected. But that should show in hostapd debug logs. 
Mine is still running on hostapd-2.3 because if I update and screw it 
my internet is broken, if that's your problem I will search for my 
notes and mail it.

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] Re: crossdev runtime version

2015-08-04 Thread Cor Legemaat

On Tue, 2015-08-04 at 17:16 -0700, walt wrote:
 On Tue, 04 Aug 2015 18:40:49 +0200
 Cor Legemaat c...@cor.za.net wrote:
 
  Hi:
  
  I want to install a mingw64 compiler with =dev-util/mingw64-
  runtime-
  4.0.1, tried with the cmd:
   crossdev --lenv 'CFLAGS=-march=generic -mtune=generic -O2 -pipe
   CXXFLAGS=-march=generic -mtune=generic -O2 -pipe' --ex-gdb -t
   x86_64-w64-mingw32 --ov-output /usr/local/portage-crossdev --l
   4.0.1 --k 4.0.1 -P '-v'
  but cross-x86_64-w64-mingw32/mingw64-runtime-3.2.0-r1 get 
  installed.
  
  What am I doing wrong?
 
 I notice you are using a version of Evolution that is not available
 yet in gentoo.  Are you using gentoo package overlays, or installing
 packages from non-gentoo source repositories?  (I see /usr/local in
 your message :)
 
 Sometimes these little details can give important clues.
 
 
The pc with my mail on is a Funtoo current install but that is not the 
one where I try the crossdev on, will check later but I'm pretty sure 
my evolution is in gentoo overlay also 3.13.6. The one where I try the 
crossdev build on is a Gentoo Hardened stable install.

The /usr/local/portage-crossdev is the path to the repository to 
install the cross compiler.

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


[gentoo-user] crossdev runtime version

2015-08-04 Thread Cor Legemaat
Hi:

I wand to install a mingw64 compiler with =dev-util/mingw64-runtime-
4.0.1, tried with the cmd:
 crossdev --lenv 'CFLAGS=-march=generic -mtune=generic -O2 -pipe 
 CXXFLAGS=-march=generic -mtune=generic -O2 -pipe' --ex-gdb -t 
 x86_64-w64-mingw32 --ov-output /usr/local/portage-crossdev --l 4.0.1 
 --k 4.0.1 -P '-v'
but cross-x86_64-w64-mingw32/mingw64-runtime-3.2.0-r1 get installed.

What am I doing wrong?

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] Configuring hostapd

2015-08-04 Thread Cor Legemaat
On Sun, 2015-08-02 at 19:56 -0400, Fernando Rodriguez wrote:
 On Sunday, August 02, 2015 11:12:07 PM Mick wrote:
  On Sunday 02 Aug 2015 22:04:41 Fernando Rodriguez wrote:
   On Sunday, August 02, 2015 1:29:50 PM Mick wrote:
On Sunday 02 Aug 2015 01:50:21 Fernando Rodriguez wrote:
 Hello,
 
 After installing hostapd I can successfully connect to the 
 AP, I can
 get DHCP from it, but I cannot access the network through it 
 (neither
 lan or internet).

This sounds like a (network) routing problem, rather than a 
hostapd
issue.
   
   It looks like that, but if I stop iptables completely on the 
   router all
   unicast traffic still works in the lan (both wired and through 
   an external
   AP), so if I connect to the hostapd AP with iptables off, 
   shouldn't I at
   the very least be able to ping the wireless interface on the 
   router?
   
   I also tried with only the following rule which enables internet 
   access to
   all wired workstations and through external AP:
   
   iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
  
  You should probably specify the local subnet, so that multicast 
  packets are
  not sent out to the Internet, e.g.:
  
  iptables -t nat -A POSTROUTING -o enp0s8 -s 192.168.1.0/24 ! -d
 192.168.1.0/24
  -j MASQUERADE
  
  (Change 192.168.1.0/24 to suit your LAN subnet)
 
 I'm not actually using that rule except as a minimal setup for 
 troubleshooting
 this issue. My actual rules do specify the subnet.
 
  Also have you enabled ip forwarding in your kernel:
  
  sysctl -w net.ipv4.ip_forward=1
 
 Yes, it is an existing router that works perfectly except for the 
 hostapd AP.
 My current setup is as follows:
 
 Internet - Gentoo Router - Switch - AP
 
 Where AP is a wifi router with routing features disabled. Never had 
 problems
 with it. Now I installed hostapd on Gentoo Router and everything 
 else still
 works fine except when I connect to the hostapd AP. Even with only 
 that minimal
 iptable rule or no rules at all.
 
 Thanks,
 
Probably /dev/random depleated, try enable your hardware rng or sys-
apps/haveged test with `cat /proc/sys/kernel/random/entropy_avail`

Regards:
Cor

signature.asc
Description: This is a digitally signed message part


[gentoo-user] crossdev i686-w64-mingw32 threads

2015-04-10 Thread Cor Legemaat
Hi all:

All the mingw-w64 windows builds have pthreads enabled and you can use
std::thread and std::mutex, how can I enable that in the gentoo crossdev
builds?

Found https://github.com/niXman/mingw-builds and
http://sourceforge.net/p/mingw/mailman/message/28014658/ but will I then
need to edit the ebuild to get it working?

Tried the pthread setup as explained on the wiki but then I can't use my
class dynamically in a program if it is using pthread_mutex.

Regards:
Cor


signature.asc
Description: This is a digitally signed message part


[gentoo-user] Anjuta fail to debug application.

2014-01-11 Thread Cor Legemaat
Hi:

When I try to debug an application in Anjuta 3.8.4 on my Gentoo Hardened
pc I get an error of Unable to find a debugger plugin supporting a
target with application/x-sharedlib MIME type, got that with 3.2, 3.4
and 3.6 also but didn't had time to investigate.

I installed an virtual machine with Fedora 20 and tried it there where
it's working fine. On both machines I created an default foobar_cpp
hello world application and compared the configure/compile commands,
they are the same. On Fedora the executable has an MIME type of
application/x-executable but on Gentoo as application/x-sharedlib,
copied them over an they are still detected the same.

So it seems if the MIME types are detected correctly and the problem is
probably in autoconf/automake/gcc but I don't know where to start. Any
suggestions?

Regards:
Cor


signature.asc
Description: This is a digitally signed message part