Commit graph

48 commits

Author SHA1 Message Date
fendo
b3f40f41f7 Add DHCPv6 functionality. 2014-09-11 16:19:57 +02:00
Benjamin Cama
99921507eb Merge branch 'common-cvs-git-upstream' into fdn-mods
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2012-02-02 02:15:14 +01:00
Benjamin Cama
d19fdcba62 Merge branch 'use-netlink' into fdn-mods 2011-09-19 18:12:48 +02:00
Benjamin Cama
1877ddf760 Forgot to remove a prototype.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-09-19 18:12:31 +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
3190b01ada Fix last commit on switching to CIDR.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
2011-08-17 02:21:01 +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
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
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
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
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
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
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
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
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
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
f2a3180cc0 Imported Upstream version 2.1.21 2011-07-07 12:45:05 +02:00
Brendan O'Dea
d5c6f84271 Import to git from cvs. Remove keywords. 2011-01-27 17:36:01 +11:00
Brendan O'Dea
a8823a7dfa restart BGP on receipt of CEASE 2005-09-02 23:39:34 +00:00
Brendan O'Dea
aabf1d3fe9 - Replace flags used for LCP/IPCP with state machine.
- Use openssl MD5, fix DAE vector (Alex Kiernan).
2005-07-31 10:04:09 +00:00
Brendan O'Dea
b830a899ca Include endpoint address in accounting dump files.
Convert mainloop to use epoll rather than select.
2005-06-04 15:42:35 +00:00
Brendan O'Dea
9d199a1046 use standard uintN_t types for portability 2004-12-16 08:49:52 +00:00
Brendan O'Dea
2f5b811429 make "established" a different tcp flag match
add fragment handling
drop IP address from LOG macro (function)
2004-11-29 02:17:17 +00:00
Brendan O'Dea
b02fdbcde7 Don't assume BGP peer sends back negotiated hold time, pick smallest 2004-11-15 06:49:56 +00:00
Brendan O'Dea
3ab5eeb379 make BGP keepalive/hold time configurable, revise config syntax 2004-11-11 03:07:42 +00:00
Brendan O'Dea
4e0597cd50 use LOG for logging macro
clean up initlcp handling
2004-11-05 04:55:25 +00:00
David Parrish
d52f68e6d3 Cleanups and sync 2004-09-02 04:18:07 +00:00
David Parrish
d490579025 Add renegotiation patch from Yuri (ppp-aug10-patch)
Indentation and style cleanups
Make md5.c use standard memcpy and memset
2004-08-13 00:02:50 +00:00
David Parrish
7aa420ce9f * Update cli callbacks to work with libcli 1.6.
This supports privileged and unprivileged commands, as well as a configuration
  mode
* Add help for all cli commands
* Add "show version" command
* Fix uptime counter display
* Fix nasty bug where cluster basetime can be set to 0 when sending initial
  heartbeat
* Don't rmmod ip_conntrack, as this can take a lot of time
* Re-order logging in routeset such that the action is given before any error
* Use the correct gateway address when deleting routes
* Remove any routes when address changes
* Require authentication if telnet from remote ip
* Require enable password always
* Return error if show pool done on slave
* We MUST immediately exit if we're the wrong master!
2004-06-28 02:43:13 +00:00
David Parrish
c239d4b228 * Wed Jun 23 2004 David Parrish <david@dparrish.com> 2.0.0
- Major release
- Completely replace active/standby clustering with a new peer-to-peer
  clustering method which allows much greater throughput and is a lot more fault
  tolerant
- Add internal tbf implementation for throttling without relying on tc and
  kernel HTB
- Add support for iBGP and eBGP to advertise routes
- Add cli commands "show cluster", "show bgp", "show ipcache", "show throttle",
  "show tbf", "suspend bgp", "restart bgp", "show user"
- Interception destination must be set per-user
- If SMP machine, allow use of SCHED_FIFO, which should improve performance
- Added config option to send GARP at startup
- Added plugin_become_master and plugin_new_session_master plugin hooks
- Remove useless sessionsendarp(). This isn't needed now that we are using TUN
  instead of TAP.
- ICMP rate limiting so not every unreachable packet is replied with an ICMP
  unreachable message
- mangle table is not required on anything but the cluster master, so slaves
  will drop the mangle table and attempt to unload the ip_conntrack module
- Statically assigned IP addresses (by Radius) work now
- Add -d command-line flag to detach and become a daemon
- Configuration file is now "/etc/l2tpns/startup-config"
- Reduced MIN_IP_SIZE to 0x19 to stop a pile of Short IP warnings
- Resend initial IPCP request until it's acknowleged by the client
- Better radius session cleanup logic
- Many miscellaenous bugfixes and performance enhancements
- Thanks to Michael O'Reilly and Brendan O'Dea for most of these new features
2004-06-23 03:52:24 +00:00