Commit graph

442 commits

Author SHA1 Message Date
Benjamin Cama
e7d32f2da8 Log tunnel # while shutting down MPPP sessions.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-25 21:30:26 +02:00
Benjamin Cama
639b43bffc Add a uint16_t control buffer type, as a union.
Then adapt the code using it. Make putting uint16_t easier in the
buffer. Pleases gcc better.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-25 14:23:24 +02:00
Benjamin Cama
036223c418 Fix the strange bundles' members looping use.
Avoids gcc warnings.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-24 17:14:57 +02:00
Benjamin Cama
6a529fb49e Remove unused variables.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-23 19:53:35 +02:00
Benjamin Cama
d331c822c0 Log the tunnel # when adding/removing routes.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-22 19:09:54 +02:00
Benjamin Cama
0b06de8105 Set hostname /after/ having read the config file.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-19 18:10:03 +02:00
Benjamin Cama
bf41bf2eac Log the session # when adding IPv6 routes.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-19 17:25:18 +02:00
Benjamin Cama
1a20ccb840 Change the rtm_proto to some arbitrary-defined value.
We change this value (which should really _not_ be RTPROT_BOOT) to some
arbitrary number so that we can import it into BIRD.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-16 17:51:29 +02:00
Benjamin Cama
6b54e4985e Correctly set mp_epdis in host order.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-15 16:48:32 +02:00
Brendan O'Dea
b939b00afd clean up some compiler errors 2011-09-12 20:46:07 +10:00
Benjamin Cama
0f85bdecab Merge branch 'use-netlink' into fdn-mods 2011-08-20 18:25:44 +02:00
Benjamin Cama
c23b9c14ab Correctly form the delete route/route6 request.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-20 18:24:54 +02:00
Benjamin Cama
7d4d3c7bca Merge branch 'use-netlink' into fdn-mods 2011-08-20 17:24:10 +02:00
Benjamin Cama
31fd6f1055 Remove the netlink code to get the tun if index.
It only worked for kernel >= 2.6.33. Use if_nametoindex() instead, which made
me include net/if.h in place of linux/if.h. Also, fix the RTM_SETLINK use which
should really be RTM_NEWLINK with correct parameters.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-19 19:23:27 +02:00
Benjamin Cama
ec7ce23c79 Merge branch 'use-netlink' into fdn-mods
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 17:23:07 +02:00
Benjamin Cama
1b372e5d46 Fix a stray comma, and replace existing routes.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 17:16:30 +02:00
Benjamin Cama
464a2bb072 Since 7c47438 we can remove math.h.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 02:28:33 +02:00
Benjamin Cama
1455a9c9bb Make routset()/route6set() use netlink.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 02:23:13 +02:00
Benjamin Cama
7c474381d4 Switch from masks to CIDR globally for IPv4.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 01:41:54 +02:00
Benjamin Cama
e6bf06aa1b Simplify route attribute appending.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 00:45:27 +02:00
Benjamin Cama
4344f5e9c7 Better tun device name length handling.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 00:23:25 +02:00
Benjamin Cama
8f944eeb21 Fix wrong rta type.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 19:04:08 +02:00
Benjamin Cama
1df1b625a8 netlink: Better error handling.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 18:45:53 +02:00
Benjamin Cama
7bdb42fe54 Add netlink fd polling.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 17:19:42 +02:00
Benjamin Cama
5cd5238b2f Remove all acknoledgement stuff. Still doesn't work.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 16:42:13 +02:00
Benjamin Cama
ba87a9d874 Commiting the rework I have done until now.
But I will remove the ack stuff, too complicated.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 16:06:33 +02:00
Benjamin Cama
c23922ce7c Netlink bugfixes.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-16 00:12:23 +02:00
Benjamin Cama
7aa8cc3dc0 Further netlink implementation. Not working yet.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-15 22:59:13 +02:00
Benjamin Cama
c7b02a0927 First netlink functions.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-14 22:56:35 +02:00
Benjamin Cama
500eb6e594 Check for expired timers even when receiving no events.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-08 13:43:02 +02:00
Benjamin Cama
1c898f7017 Merge branch 'rfc4760' into fdn-mods 2011-07-29 13:04:31 +02:00
Benjamin Cama
8c4f3bfe79 Add a config option to set the advertised BGP next hop.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:58:31 +02:00
Benjamin Cama
fd021320ec Add an "hostname" config option.
It is overridden by the -h command line option.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:54 +02:00
Benjamin Cama
8321e71491 Add a cli_bind_address configuration option.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:25 +02:00
Benjamin Cama
d48de5fddd Stop BGP session even when we are master
Probably a bug; introduced by a patch that made only slaves stop their BGP
session.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:00 +02:00
Benjamin Cama
b36141c0c7 Add an option to set source address for a BGP session.
When adding a BGP neighbour, one can set "update-source" (quagga syntax) to the
source IP address that will be used for that session.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:00 +02:00
Benjamin Cama
11ec3c4a24 Remove no more used plugin function names; fixes a crash.
These functions have been for long removed from plugins.h.
Debian sources used an older plugins.h.
l2tpns.c doesn't seem to have been ever fixed in upstream CVS.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:00 +02:00
Benjamin Cama
7e1e91ef98 Call bgp_add/del_route6() in l2tpns.c.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
59411b8799 Add a nexthop6 config option.
Will be used to set the NEXT_HOP for IPv6 routes, otherwise our address in
ipv6_prefix is used as the next hop.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:51 +02:00
Brendan O'Dea
d5c6f84271 Import to git from cvs. Remove keywords. 2011-01-27 17:36:01 +11:00
bodea
46d1fa17df Apply patch from Geoffrey D. Bennett to fix retry of control packets. 2011-01-20 12:48:40 +00:00
Brendan O'Dea
e934c096dd Apply patch from Geoffrey D. Bennett to fix retry of control packets. 2011-01-20 12:48:40 +00:00
bodea
448f218ae7 Apply patch from Cyril Elkaim to fix an issue with MacOS. 2010-03-25 05:24:23 +00:00
Brendan O'Dea
97119ee512 Apply patch from Cyril Elkaim to fix an issue with MacOS. 2010-03-25 05:24:23 +00:00
bodea
eb34e8b8b2 Apply patch from Michael O to avoid sending multiple CDNs. 2010-01-09 13:33:41 +00:00
Brendan O'Dea
bab8601f70 Apply patch from Michael O to avoid sending multiple CDNs. 2010-01-09 13:33:41 +00:00
bodea
ac773ac88d Apply MLPPP patch from Muhammad Tayseer Alquoatli, very belatedly, with
thanks.  Changes:
- Handle session shutdown gracefully regarding leaving the bundle (bug that is
  caused when a all session leaves a bundle then another join)
- IP assignment is done only for the first session in the bundle (save IP
  waste for multiple MLPPP sessions)
- Route is being added only for the first session in the bundle (less routes
  on l2tpns system)
- Fix route deletion problem for MLPPP sessions (bug that caused when a
  session leaves a bundle)
- Uniformity of sequence number space satisfied (according to RFC1990)
- Fix reassembling fragmented packets and handling lost fragments (according
  to RFC 1990)
- FragmentatConnection to l2tpns.cvs.sourceforge.net closed by remote host.n
  across N session rather than two)
- Sequence numbers extraction mask has been corrected (bug in extracting
  sequence numbers)
- some clustering support fixes
- Upload/Download statistics has been corrected
- add "kill_timedout_sessions" config option
2009-12-08 14:49:28 +00:00
Brendan O'Dea
845bb1f376 Apply MLPPP patch from Muhammad Tayseer Alquoatli, very belatedly, with
thanks.  Changes:
- Handle session shutdown gracefully regarding leaving the bundle (bug that is
  caused when a all session leaves a bundle then another join)
- IP assignment is done only for the first session in the bundle (save IP
  waste for multiple MLPPP sessions)
- Route is being added only for the first session in the bundle (less routes
  on l2tpns system)
- Fix route deletion problem for MLPPP sessions (bug that caused when a
  session leaves a bundle)
- Uniformity of sequence number space satisfied (according to RFC1990)
- Fix reassembling fragmented packets and handling lost fragments (according
  to RFC 1990)
- FragmentatConnection to l2tpns.cvs.sourceforge.net closed by remote host.n
  across N session rather than two)
- Sequence numbers extraction mask has been corrected (bug in extracting
  sequence numbers)
- some clustering support fixes
- Upload/Download statistics has been corrected
- add "kill_timedout_sessions" config option
2009-12-08 14:49:28 +00:00
bodea
32ab43cf29 don't send interim records before session start (Daryl Tester) 2006-12-18 12:05:36 +00:00
Brendan O'Dea
3bea7b1e3e don't send interim records before session start (Daryl Tester) 2006-12-18 12:05:36 +00:00