Commit graph

1159 commits

Author SHA1 Message Date
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
4df9aef570 Merge branch 'fdn-mods' 2011-08-08 13:51:59 +02:00
Benjamin Cama
49f8ea66ee Don't process timers of disabled peers.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-08 13:51:32 +02:00
Benjamin Cama
7d862d168f Merge branch 'fdn-mods' 2011-08-08 13:43:42 +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
6c503e49e5 Merge branch 'fdn-mods' 2011-08-08 00:35:29 +02:00
Benjamin Cama
ae7d3c9fca Merge branch 'rfc4760' into fdn-mods 2011-08-08 00:35:08 +02:00
Benjamin Cama
017a7d32fe Use the source IP we use as BGP router identifier.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-08 00:33:36 +02:00
Benjamin Cama
b320a99b8c Add a debian/changelog entry for version 2.2.1-1fdn1.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 15:07:08 +02:00
Benjamin Cama
08b8dffa78 Merge branch 'fdn-mods' 2011-07-29 14:54:00 +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
4f1a9aa378 Kill sessions receiving a ConfReq while closing.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:55 +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
3d9333a6cb Better example address for cli_bind_address.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:25 +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
625794576e Wait before retrying on CEASE.
Using bgp_restart() floods the peer with connection requests. Use bgp_retry()
instead.

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
482ed7cbe5 Display session's remainging time in CLI.
Patch extracted from original Debian sources, not found in upstream CVS.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-29 12:54:00 +02:00
Benjamin Cama
cc806b225e Add a debian/changelog entry for version 2.2.1-1.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 18:18:08 +02:00
Benjamin Cama
fbd2194031 Merge branch 'upstream' 2011-07-28 17:59:33 +02:00
Benjamin Cama
21ae6221cf Retry on unsupported capability, not restart immediatly.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:58 +02:00
Benjamin Cama
60bd25ccdc Really fix parameters length calculation this time.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:58 +02:00
Benjamin Cama
e6fe57eec8 Fix a bug in parameters length setting.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:58 +02:00
Benjamin Cama
974d5f4408 A bit of renaming for clarity.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:58 +02:00
Benjamin Cama
350b06e6f4 Fix bugs in IPv6 update routine.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:58 +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
c7e67e1de2 Don't send notification when receiving an unsupported capability.
Tested peer (quagga) doesn't interpret it nicely (i.e. it shuts the connection
down). Better not tell anything.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
3bd675ad2c Better check for IPv6 compatibility with the BGP peer.
We would advertise IPv6 routes to non-multiprotocol aware peers. Fix that.
Also, fix the way we parse options, to handle multiple optional parameters with
one capability in it (or many; it's just the way quagga send them).

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
3ea85f7c57 Fix the AFI for IPv6.
The Address Family Identifier was not the one I thought it was.
Define it and fix its use for IPv6.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
e86393ea90 Better handle IPv6 routes advertisement (non-)support.
Don't try to enable multiprotocol BGP when the peer says it can't.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
7407c1a1c4 Add config examples for nexthop/nexthop6.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 15:01:57 +02:00
Benjamin Cama
db276bcc80 Handle multiprotocol UPDATE.
Add IPv6 routes advertisement handling, with MP path attributes heading
prepared on initialization.
BTW, fix a bug in attribute size calculation (for extended attr).

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
Benjamin Cama
f4fb6922fe Add v6 routes handling.
Basically duplicate the v4 functions.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:59:59 +02:00
Benjamin Cama
02611e54fc Move NEXT_HOP attribute so that we can exclude it.
We will need to do that when we will send IPv6 routes (RFC4760 says we SHOULD
NOT carry this attribute when we will send UPDATE without NLRI). So, we save
the length of all the attributes except NEXT_HOP for later memcpy().

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:59:52 +02:00
Benjamin Cama
f2e59e9881 Fix a typo from last commit.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
78a7085778 Disable IPv6 routes adv when peer doesn't support it.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
5305d86922 Advertise IPv6 capability to peers.
Also rename a param define, and fix a forgotten ntohs().

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
1032adb5b4 Avoid implicit cast warning.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
cd8502743f Add a per-peer flag if it supports IPv6 routes adv.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
d7e506baf4 Add Multiprotocol definitions and more param handling.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
1b8cb12cb4 Add Optional Parameter and Capability handling.
Optional Parameters is defined in RFC4271 and Capability advertisement in
RFC3392. For now, we only hande them upon receiving an OPEN message.

Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-07-28 14:58:30 +02:00
Benjamin Cama
e57e8c3825 Merge remote-tracking branch 'upstream-repo/master' into upstream 2011-07-07 12:47:12 +02:00
Peter Eisentraut
bbcd45eab0 Imported Debian patch 2.1.21-1.1 2011-07-07 12:45:05 +02:00