Re: [Babel-users] babel freebsd issues

2012-08-02 Thread Juliusz Chroboczek
 Thanks for the fix! Should we add the patch to the FreeBSD port or wait
 for the next release?

Difficult to say.  I'm waiting for feedback on another bug report, and
I'll make a 1.3.* release with both fixes.  Unfortunately, I cannot give
you an ETA -- it depends on the reporter for the other bug.

If you want to cherry-pick the change, it's commit 724b40.

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


[Babel-users] babel jumps my default route

2012-08-02 Thread Antoine Beaupré
Hi,

I am struggling to setup proper routing policies on my local test mesh.

I have mentionned my setup previously so I won't repeat it here, but I
can expand by saying that most mesh routers export their default
routes. Not all of them have such a thing, but some do, in particular
carton (172.16.1.1).

The problem is, after a while, that route gets propagated to my core
router (roadkiller) which is the real internet connexion. The upstream
route therefore drops and roadkiller starts to use carton as its default
route, which is very bad, to say the least.

I can see two problems here:

 1. I can't seem to refuse default routes from the mesh
 2. roadkiller (FreeBSD) should prefer its own default route to the one
 proposed by the mesh, since it's a local route

To refuse the default routes, I have tried both those policies:

in ip 0.0.0.0/0 le 0 deny
in ip 0.0.0.0/32 le 0 deny

None work. After a little while, the default route gets inherited from
the mesh and I loose the sole real default route on the network.

Any ideas? I have tried to look for a sample babeld.conf in the source
distribution, couldn't find any... that would be very useful. I see:

https://dev.openwrt.org/browser/packages/net/babel/files/babeld.conf

... but it's in OpenWRT and lacking in/out samples.

A.
-- 
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.


pgpPihNTwy6PA.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

[Babel-users] Gitweb

2012-08-02 Thread Juliusz Chroboczek
For those of you allergic to Github, there's now a Gitweb server on

  http://git.wifi.pps.jussieu.fr/

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babel jumps my default route

2012-08-02 Thread Antoine Beaupré
I forgot, here's my whole babeld.conf on roadkiller:

redistribute metric 128
in ip 0.0.0.0/0 le 0 deny
in ip 0.0.0.0/32 le 0 deny

The other nodes have just the first line:

redistribute metric 128

... but I do not want to assume I control the other nodes.

A.

-- 
The problem is not a lack of highly educated workers, the problem is a
lack of highly educated workers willing to work for the minimum wage or
lower in the U.S. Costs are driving outsourcing, not the quality of
American schools.   - Scott Kirwin, IT Professionals Association


pgpR9rdiekCel.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babel jumps my default route

2012-08-02 Thread Juliusz Chroboczek
 in ip 0.0.0.0/0 le 0 deny

I've just checked again, and it works just fine -- it rejects the
default route.

Are you sure that the babeld.conf file is being read (it's in /etc/)?
And that the spurious route is not being installed by DHCP or something
else?

-- Juliusz


___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


[Babel-users] providing a sample babeld.conf in the distro

2012-08-02 Thread Antoine Beaupré
On 2012-08-02, Juliusz Chroboczek wrote:
 Any ideas? I have tried to look for a sample babeld.conf in the source
 distribution, couldn't find any... that would be very useful.

   http://mid.gmane.org/7ive3ry9r7@lanthane.pps.jussieu.fr

 This is linked from

   http://www.pps.univ-paris-diderot.fr/~jch/software/babel/faq.html

Great! thanks for the pointer.

I still think that a sample babeld.conf should be shipped with the babel
source code. It's great that there's a mailing list post somewhere that
describes the documentation, but the fact that I overlooked it (I did
read the FAQ before asking ;) is pretty significant I think.

Also, I feel it would make sense to have a sample config so that future
changes to the configuration syntax can be documented within the same
commit and source code distribution...

Even if the sample config file is just comments, it would still be
useful.

I volunteer for writing such a config file based on the above, if no one
else will, and if the idea is accepted here.

Thanks!

A.
-- 
Man really attains the state of complete humanity when he produces,
without being forced by physical need to sell himself as a commodity.
- Ernesto Che Guevara


pgp8pnXgdzufy.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babel jumps my default route

2012-08-02 Thread Antoine Beaupré
On 2012-08-02, Juliusz Chroboczek wrote:
 in ip 0.0.0.0/0 le 0 deny

 I've just checked again, and it works just fine -- it rejects the
 default route.

 Are you sure that the babeld.conf file is being read (it's in /etc/)?

I am not sure. It is in /etc.

 And that the spurious route is not being installed by DHCP or something
 else?

I am sure it is not installed by a DHCP client - there is no such thing
running on roadkiller. There's the mpd4 PPPoE daemon running, but I
strongly doubt it's in cause, as it's *his* route that gets overwritten.

I also note that the default route has babel's markings on it:

DestinationGatewayFlagsRefs  Use  Netif Expire
default172.16.1.1 UG2  1838   521393vr2

The 2 is the mark of RTF_PROTO2 flag on that route.

Also, if I stop babel and restore the default route, it doesn't come
back, until I start babel and wait for a few minutes again.

The strange thing is that the default route is not listed in babeld
-d1...

A.

-- 
La démocratie réelle se définit d'abord et avant tout par la
participation massive des citoyens à la gestion des affaires de la cité.
Elle est directe et participative. Elle trouve son expression la plus
authentique dans l'assemblée populaire et le dialogue permanent sur
l'organisation de la vie en commun.  - De la servitude moderne


pgpLALyCbF5sv.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] providing a sample babeld.conf in the distro

2012-08-02 Thread Juliusz Chroboczek
 I still think that a sample babeld.conf should be shipped with the babel
 source code.

Well, the message I'm trying to send is that babeld just works -- you
don't need a babeld.conf for normal usage, you're only supposed to use
one if you have special needs.

(As mentioned on IRC, you appear to be having another problem -- babeld
should detect that there already is a default route, and not install the
default route learned from Babel.  So it looks like the FreeBSD port is
not fully functional after all.)

 I volunteer for writing such a config file based on the above, if no one
 else will, and if the idea is accepted here.

I'll be glad to include a sample conf file in the source distribution,
but I'd like it to be called babeld.conf.sample, to start with
a comment that says that no babeld.conf file is necessary in normal
usage, and to consist of comments only.  For an example, please see

  http://git.wifi.pps.jussieu.fr/?p=polipo.git;a=blob;f=config.sample

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] providing a sample babeld.conf in the distro

2012-08-02 Thread Antoine Beaupré
On 2012-08-02, Juliusz Chroboczek wrote:
 I still think that a sample babeld.conf should be shipped with the babel
 source code.

 Well, the message I'm trying to send is that babeld just works -- you
 don't need a babeld.conf for normal usage, you're only supposed to use
 one if you have special needs.

Well, this is not my experience so far. I would very much like to agree
there, but so far, to announce routes I needed at least:

redistribute allow

Maybe a lesser incantation would have worked. I think this is related to
the fact that my routes don't have a proto assigned to them, after
reading the mailing list post.

 I volunteer for writing such a config file based on the above, if no one
 else will, and if the idea is accepted here.

 I'll be glad to include a sample conf file in the source distribution,
 but I'd like it to be called babeld.conf.sample, to start with
 a comment that says that no babeld.conf file is necessary in normal
 usage, and to consist of comments only.  For an example, please see

   http://git.wifi.pps.jussieu.fr/?p=polipo.git;a=blob;f=config.sample

Sure, that sounds reasonable.

I'll work on something.

A.

-- 
For every complex problem, there is an answer that is clear, simple -
and wrong.
- H.L. Mencken


pgpVEdR1iU3bR.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] providing a sample babeld.conf in the distro

2012-08-02 Thread Benjamin Henrion
On Thu, Aug 2, 2012 at 10:02 PM, Juliusz Chroboczek j...@pps.jussieu.fr wrote:
 I still think that a sample babeld.conf should be shipped with the babel
 source code.

 Well, the message I'm trying to send is that babeld just works -- you
 don't need a babeld.conf for normal usage, you're only supposed to use
 one if you have special needs.

 (As mentioned on IRC, you appear to be having another problem -- babeld
 should detect that there already is a default route, and not install the
 default route learned from Babel.  So it looks like the FreeBSD port is
 not fully functional after all.)

 I volunteer for writing such a config file based on the above, if no one
 else will, and if the idea is accepted here.

 I'll be glad to include a sample conf file in the source distribution,
 but I'd like it to be called babeld.conf.sample, to start with
 a comment that says that no babeld.conf file is necessary in normal
 usage, and to consist of comments only.  For an example, please see

I hit the same problem this week-end while doing an ebuild for babeld.

And I was suspecting Julius being responsible for no sample babeld.conf...

A well documented babeld.conf is more than welcomed, even if all the
variables are disabled by default.

-- 
Benjamin Henrion bhenrion at ffii.org
FFII Brussels - +32-484-566109 - +32-2-3500762
In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators.

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] providing a sample babeld.conf in the distro

2012-08-02 Thread Antoine Beaupré
sample configuration file available as patch here:

git://src.anarcat.ath.cx/babeld

it's a merge of the OpenWRT sample config file and the mailing list
post.

I removed the -X notes because I didn't understood what they were
refering to. I also toyed with the idea of removing the name of the
machines mentionned because it's a bit confusing, but didn't.

Feedback welcome.

A.
-- 
There has been only one Christian.
They caught him and crucified him -- early.
- Mark Twain


pgp63oUsQS8RN.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babel jumps my default route

2012-08-02 Thread Antoine Beaupré
I noticed that the default route problem started to happen when I
reverted the RTF_PROTO2 patch. Running without the patch: no such
problem. Of course, reverting the patch brings me back to the point
where the FreeBSD node announces the mesh's routes as itself's again and
basically breaks the whole mesh.

What follows is a bunch of paste of debug data that you asked on IRC.


With the PROTO2 patch reverted


I start with the RTF_PROTO2 patch reverted (ie. that we do install
routes with the PROTO2 flag). This makes babel overwrite the default
route.

Here is the output of babeld -d1 when it installs the evil default route:

My id 00:00:24:ff:fe:cc:93:46 seqno 59203
Neighbour fe80::21c:10ff:fe22:2ac dev vr2 reach f3f0 rxcost 96 txcost 256 chan 
-2.
fd64:2c08:9fa7:1::1/128 metric 0 (exported)
172.16.0.1/32 metric 0 (exported)
192.168.2.1/32 metric 0 (exported)
192.168.0.1/32 metric 0 (exported)
2001:1928:1:9::/128 metric 0 (exported)
fd64:2c08:9fa7::1/128 metric 0 (exported)
2001:1928:0:::1b/128 metric 0 (exported)
192.168.100.3/32 metric 0 (exported)
72.0.72.144/32 metric 0 (exported)
0.0.0.0/0 metric 128 (exported)
66.96.31.6/32 metric 128 (exported)
192.168.0.0/24 metric 128 (exported)
192.168.2.0/24 metric 128 (exported)
192.168.100.0/24 metric 128 (exported)
::/4 metric 128 (exported)
2001:1928:0:::1a/128 metric 128 (exported)
2001:1928:1:9::/64 metric 128 (exported)
fd64:2c08:9fa7::/48 metric 128 (exported)
172.16.0.0/12 metric 384 refmetric 128 id 02:1c:10:ff:fe:22:02:ac seqno 62820 
age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac nexthop 172.16.1.1 (installed)
172.16.1.1/32 metric 256 refmetric 0 id 02:1c:10:ff:fe:22:02:ac seqno 62820 age 
8 via vr2 neigh fe80::21c:10ff:fe22:2ac nexthop 172.16.1.1 (installed)
192.168.4.0/24 metric 384 refmetric 128 id 02:1c:10:ff:fe:22:02:ac seqno 62820 
age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac nexthop 172.16.1.1 (installed)
192.168.4.1/32 metric 256 refmetric 0 id 02:1c:10:ff:fe:22:02:ac seqno 62820 
age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac nexthop 172.16.1.1 (installed)
fd64:2c08:9fa7:1::/64 metric 384 refmetric 128 id 02:1c:10:ff:fe:22:02:ac seqno 
62820 age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac (installed)
fd64:2c08:9fa7:1::2/128 metric 256 refmetric 0 id 02:1c:10:ff:fe:22:02:ac seqno 
62820 age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac (installed)
fd64:2c08:9fa7:2::/64 metric 384 refmetric 128 id 02:1c:10:ff:fe:22:02:ac seqno 
62820 age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac (installed)
fd64:2c08:9fa7:2::1/128 metric 256 refmetric 0 id 02:1c:10:ff:fe:22:02:ac seqno 
62820 age 8 via vr2 neigh fe80::21c:10ff:fe22:2ac (installed)

Notice the absence of an actual installed default route.

Here's netstat -rn:
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default172.16.1.1 UG218 3124vr2
66.96.31.6 link#9 UH  00ng0
72.0.72.144link#9 UHS 0  141lo0
127.0.0.1  link#5 UH  049868lo0
172.16.0.0/12  172.16.1.1 UG2 04vr2
172.16.0.1 link#3 UHS 0   58lo0
172.16.1.1 00:00:24:cc:93:46  UH2 2   67vr2
192.168.0.0/24 link#6 U   3 230036029 bridge
192.168.0.1link#6 UHS 0   63lo0
192.168.2.0/24 link#4 U   0 13069574vr3
192.168.2.1link#4 UHS 0 2833lo0
192.168.4.0/24 172.16.1.1 UG2 00vr2
192.168.4.1172.16.1.1 UGH200vr2
192.168.100.0/24   link#10U   0   22   tap0
192.168.100.3  link#10UHS 00lo0

Internet6:
Destination   Gateway   Flags  
Netif Expire
::/96 ::1   UGRSlo0 
=
default   2001:1928:0:::1a  UGSgif0
::1   fe80::21c:10ff:fe22:2ac%vr2   UGH2vr2
:::0.0.0.0/96 ::1   UGRSlo0
2001:1928:0:::1a  2001:1928:0:::1b  UH gif0
2001:1928:1:9::   link#6UHS lo0 
=
2001:1928:1:9::/64link#6U   bridge0
fd64:2c08:9fa7::/48   link#3U   vr2
fd64:2c08:9fa7::1 link#6UHS lo0
fd64:2c08:9fa7:1::/64 fe80::21c:10ff:fe22:2ac%vr2   UG2 vr2
fd64:2c08:9fa7:1::1   link#3UHS lo0
fd64:2c08:9fa7:1::2   

Re: [Babel-users] babel freebsd issues

2012-08-02 Thread Gregoire Henry
Hi, 
 
  I have also found a significant problem with the mesh implementation in
  FreeBSD. It seems that after a few announcements, the FreeBSD babeld
  will start announcing routes it added to its routing from the mesh back
  to the mesh as native routes.
 
  What happens if you try to revert the following patch: 
 
 Kernel_socket: do not use the RTF_PROTO2 flag. 
 
 It stops happening.

Good news.

 Why was that change done in the first place? It looked like a good
 idea. :)

The original introduction of the RTF_PROTO2 flag was to easily filter in the 
kernel_routes function the routes that were installed by babel. On linux, 
babel's route are installed in a distinct route table; hence filtering is easy 
and babel do not compare the routes returnes by kernel_routes with this own 
internal table.

The removal of this flag is due to a bug on MacOS X: when the flag is set, 
atomic route changes (a.k.a. ROUTE_MODIFY) fail miserabily.

Then, on a late night, I probably forgot to implement another filtering 
mechanism. I don't know yet what to do:

- revert the patch and don't use atomic route change on OS X (and probably old 
BSD)
- implement another filtering mechanism (by comparing each route to the babel 
internal routing table ? by accepting only routes with a static flag ?)

Any ideas ? Juliusz ?

Regards,
Grégoire

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babel freebsd issues

2012-08-02 Thread Antoine Beaupré
On 2012-08-02, Gregoire Henry wrote:
 Then, on a late night, I probably forgot to implement another filtering 
 mechanism. I don't know yet what to do:

 - revert the patch and don't use atomic route change on OS X (and probably 
 old BSD)
 - implement another filtering mechanism (by comparing each route to the babel 
 internal routing table ? by accepting only routes with a static flag ?)

Well, just to make things a bit more confusing - things are stable again
here with the patch in. The routes don't have the #2 flag yet do not get
added back into babel.

No idea what's going on.

A.

-- 
feature, n: a documented bug | bug, n: an undocumented feature
- Mario S F Ferreira li...@freebsd.org


pgpiaoi0OjPKE.pgp
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users