0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-20 04:15:19 +00:00
Commit Graph

269 Commits

Author SHA1 Message Date
Ondrej Zajicek
6a8d3f1c1f BFD work in progress.
Now it compiles and mostly works.
2013-09-16 23:57:40 +02:00
Ondrej Zajicek
70e212f913 Implements TTL security for OSPF and RIP.
Interfaces for OSPF and RIP could be configured to use (and request)
TTL 255 for traffic to direct neighbors.

Thanks to Simon Dickhoven for the original patch for RIPng.
2013-06-25 15:39:44 +02:00
Ondrej Zajicek
ef4a50be10 Better packet priority and traffic class handling.
Implements support for IPv6 traffic class, sets higher priority for OSPF
and RIP outgoing packets by default and allows to configure ToS/DS/TClass
IP header field and the local priority of outgoing packets.
2013-06-24 16:37:30 +02:00
Ondrej Filip
a9fc659b84 Small typos fixed. 2013-02-26 14:29:53 +01:00
Ondrej Filip
de41dcd13d Redundant lines removed. 2013-02-26 14:13:11 +01:00
Ondrej Filip
a9c38203bd Allow 1 sec RIP update. 2013-02-24 00:43:08 +01:00
Ondrej Filip
04ddefb357 Use BIRD's ASSERT instead of assert.h 2013-02-22 07:15:27 +01:00
Ondrej Filip
2bf59bf4d3 Hotfix to solve an issue with delaying timers reported by Aleksey Chudov. 2013-02-21 00:44:59 +01:00
Ondrej Zajicek
094d2bdb79 Implements ADD-PATH extension for BGP.
Allows to send and receive multiple routes for one network by one BGP
session. Also contains necessary core changes to support this (routing
tables accepting several routes for one network from one protocol).
It needs some more cleanup before merging to the master branch.
2012-08-14 16:46:43 +02:00
Ondrej Zajicek
47c447c42e Minor cleanups. 2012-05-11 12:10:21 +02:00
Ondrej Zajicek
e2bf812f3d Fixes RIPng compatibility.
Also probably breaks compatibility with older BIRDs, but RIPng not
really worked here.

Thanks to Goesta Smekal for the original patch.
2012-03-15 12:38:08 +01:00
Ondrej Zajicek
f761503760 Fixes RIPng socket and neighbor handling.
RIPng did not really work because of link-local addresses.

Thanks to Roman Hoog Antink for some notes.
2012-03-15 12:23:49 +01:00
Ondrej Zajicek
39c028e9e9 Assign default protocol preference via proto_config_new().
The patch from Alexander V. Chernikov.
2012-01-24 11:31:00 +01:00
Ondrej Zajicek
a7f23f581f Implements protocol templates.
Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
2011-11-07 00:31:23 +01:00
Ondrej Zajicek
14a8f396e1 Fixes sockets for IPv4 RIP.
Thanks Roman Hoog Antink for a suggestion.
2011-10-26 14:10:49 +02:00
Ondrej Zajicek
52a43ae3b7 Minor changes in addresses.
Mainly changes IA_UNNUMBERED to IA_PEER and adds IA_HOST. Also do not
show broadcast addr in show interfaces. Nobody cares for that.
2011-03-28 22:46:18 +02:00
Ondrej Zajicek
948c865fac Fixes a crash in RIP during reconfigure. 2010-09-03 17:15:02 +02:00
Ondrej Zajicek
3cb6c83f1a Fixes a memory leak in RIP. 2010-09-03 16:32:00 +02:00
Ondrej Zajicek
0aad2b9292 Temporary OSPF commit - sockets. 2010-03-14 16:36:59 +01:00
Ondrej Zajicek
e81b440f68 Fix configure to enable warnings and fix most of them. 2010-02-21 14:34:53 +01:00
Ondrej Zajicek
dca75fd7c2 Removes phantom protocol from the pipe design.
It seems that by adding one pipe-specific exception to route
announcement code and by adding one argument to rt_notify() callback i
could completely eliminate the need for the phantom protocol instance
and therefore make the code more straightforward. It will also fix some
minor bugs (like ignoring debug flag changes from the command line).
2010-02-13 12:26:26 +01:00
Ondrej Zajicek
f9c799a00e Temporary OSPFv3 development commit (changing multicast support). 2009-09-04 11:06:51 +02:00
Ondrej Zajicek
f98e291579 The pipe cleanup. 2009-06-01 14:07:13 +02:00
Ondrej Zajicek
23ac9e9a9e Changes pipes to transfer all routes between routing table, not just optimal routes. 2009-05-31 15:24:27 +02:00
Ondrej Zajicek
20e94fb85b A change in OSPF and RIP interface patterns.
Allows to add more interface patterns to one common 'options'
section like:

interface "eth3", "eth4" { options common to eth3 and eth4 };

Also removes undocumented and unnecessary ability to specify
more interface patterns with different 'options' sections:

interface "eth3" { options ... }, "eth4" { options ... };
2009-05-06 22:02:45 +02:00
Ondrej Zajicek
aebe06b40c Proper format functions for ORIGINATOR_ID, CLUSTER_LIST 2008-11-08 23:33:22 +01:00
Ondrej Filip
004cf4fc0c Minor bugfix to compile bird in IPv6. 2004-07-15 17:28:13 +00:00
Ondrej Filip
16c2d48d8f Bugfix - RIP now updates routes with worse metric. 2004-07-13 20:53:56 +00:00
Ondrej Filip
5236fb03af Password management redesigned (untested). 2004-06-26 20:11:14 +00:00
Ondrej Filip
5ed68e46d7 Small typo changes. 2004-06-23 23:59:48 +00:00
Ondrej Filip
973cf09c3b Hotfix to problem with metric change reported by Luca. 2004-06-23 21:36:55 +00:00
Ondrej Filip
3fe5f89907 P->magic used just in LOCAL_DEBUG mode 2004-06-23 21:34:26 +00:00
Martin Mares
c91fc9b606 ... and in rip (there are even unused functions!). 2004-06-05 09:27:49 +00:00
Martin Mares
6a57bb3110 Killed a couple of unused variables.
We really should compile with warnings enabled.
2004-05-31 20:57:38 +00:00
Martin Mares
4a02013767 Make RIP nolisten mode actually work. The socket is required for
sending, the received data has to be discarded instead.

(patch by Andreas Steinmetz modified by me)
2004-05-31 17:42:38 +00:00
Martin Mares
502ded5215 Fix reporting of RIP socket errors. Thanks to Eric Leblond for the patch. 2003-12-06 16:41:11 +00:00
Martin Mares
53a50af504 Applied Pavel's fix for broadcast/multicast mode. 2002-03-10 12:32:12 +00:00
Pavel Machek
ad3907559c RIP bugfix 2000-06-21 19:40:46 +00:00
Pavel Machek
07f29765a5 RIPv6 now works. 2000-06-07 14:06:37 +00:00
Pavel Machek
18b4d6bf27 rip ipv6 bugfix 2000-06-07 13:58:49 +00:00
Martin Mares
58f7d004fd Fixes to the progdoc. 2000-06-07 13:25:53 +00:00
Martin Mares
2e9b24211a Spelling fixes to progdoc. 2000-06-07 12:29:08 +00:00
Pavel Machek
4c5f93d76b Better documentation. There are functions whose description is good when
reading source but whose documentation does not belong to progdocs.
2000-06-05 17:13:36 +00:00
Pavel Machek
8b79c4ccd5 Add safety check. 2000-06-05 15:41:44 +00:00
Pavel Machek
b093c328f5 Updates to both programmers and users doc 2000-06-05 12:52:57 +00:00
Martin Mares
e24ddd9bef Don't set precedence and TTL for the dummy socket. 2000-06-04 20:00:35 +00:00
Martin Mares
201187c558 debug -> DBG 2000-06-04 19:55:11 +00:00
Martin Mares
491cd43b77 Updated RIP to new neighbor cache semantics. When presented with next hop
equal to a local address, just ignore the route (as it is usually just an
external route exported by us echoed by some RIP peer), when given an
invalid next hop, moan to the log.
2000-06-01 12:59:50 +00:00
Martin Mares
3b0b2cb61f IPv6: Absolutize link-scope addresses of incoming packets.
IPv6 socket interface is hopefully right now.
2000-05-30 22:48:14 +00:00
Martin Mares
2cec475b8f Removed several unused local variables. 2000-05-30 21:24:53 +00:00
Martin Mares
dc6405d27e Latest changes by Pavel have removed the error messages printed after
unsuccessful socket open, but replaced them by segmentatio fault!

Grrrrrrrrr.
2000-05-19 17:21:42 +00:00
Pavel Machek
9511a483b1 Less error messages in case sk_open fails. 2000-05-19 16:44:25 +00:00
Pavel Machek
eb4097e4e4 Added name of protocol to messages being logged. 2000-05-19 16:22:53 +00:00
Martin Mares
f7ad556f20 Commented out the `inserting entry which is already there' message since
it's pretty normal: during feeding of the protocol, a new route can appear
which will be announced normally and then repeated by the feeding process.
2000-05-19 11:00:47 +00:00
Pavel Machek
6d5e703dc9 Minor cleaning 2000-05-17 20:23:05 +00:00
Martin Mares
e5a47266d0 Turned off LOCAL_DEBUG. 2000-05-16 15:08:52 +00:00
Pavel Machek
5b846de6a6 Interface dummy is too strange for me... but psst, that's secret. 2000-05-16 15:05:05 +00:00
Pavel Machek
898fdd85dc Rip should now reconfigure itself only if needed. 2000-05-16 14:58:06 +00:00
Martin Mares
28323d9ddb Several minor RIP changes (Pavel, please check as usually):
o  Use FIB_ITERATE_INIT instead of calling the function fit_init()
      which is explictly marked as private in route.h.
   o  When printing trace messages, don't spit out protocol name twice.
   o  Some messages are a bit more verbose.
   o  Added a bunch of FIXME's.
   o  When running in broadcast mode, don't forget to bind the local
      end of the socket to the same broadcast address, so that we don't
      get the broadcasts looped back via different interface. I'm just
      going to look up the same problem for multicasts.
2000-05-11 15:05:13 +00:00
Pavel Machek
ec21aecfdd Fixed nasty segfault in rip. 2000-05-11 10:33:18 +00:00
Pavel Machek
10f5c47d2e Some more paranoia into rip_insert and rip_delete 2000-05-11 09:41:16 +00:00
Pavel Machek
94d1a6c9dc Unused variable killed. 2000-05-11 09:36:55 +00:00
Pavel Machek
2a41c8d9fc use password_same utility function 2000-05-10 13:42:50 +00:00
Pavel Machek
3e47419274 Inlined metric and mode into struct rip_interface to make reconfig
work.

reconfigure is conservative but should work.
2000-05-10 13:23:21 +00:00
Pavel Machek
30aa02d70d rip_reconfigure done right 2000-05-10 13:05:39 +00:00
Pavel Machek
b8524e9be4 ipa_same does not exist. 2000-05-10 12:48:06 +00:00
Pavel Machek
0bff946c0a Nicer messages from rip. 2000-05-10 12:46:47 +00:00
Pavel Machek
6f3849774f Use ea_get_int instead of ea_find. 2000-05-10 12:38:05 +00:00
Pavel Machek
7f5f44bb92 Reconfigure hook copied from bgp. 2000-05-10 12:32:45 +00:00
Pavel Machek
84a1305437 Send first udpate sooner. 2000-05-10 12:26:09 +00:00
Pavel Machek
14758d87c4 Only announce change to main routing table if it is better than current. 2000-05-10 12:23:06 +00:00
Pavel Machek
5e50f0a028 Don't touch used memory. 2000-05-10 11:57:56 +00:00
Pavel Machek
be3b6dc574 Killed unused variable. 2000-05-10 11:48:34 +00:00
Pavel Machek
4bfe4e8551 Fix segfaults by using new ea_get_int. 2000-05-10 06:56:42 +00:00
Martin Mares
92ef4fa719 Preference is a configurable parameter. 2000-05-08 10:38:25 +00:00
Martin Mares
ce1da96ee7 Added commands show route protocol <p>' and show route import <p>' which
show the routing table as exported to the protocol given resp. as returned
from its import control hook.

To get handling of filtered extended attributes right (even in the old
`show route where <filter>' command), the get_route_info hook gets an
attribute list and all protocol specific rte attributes are contained
there as temporary ones. Updated RIP to do that.

Added ea_append() which joins two ea_list's.
2000-05-06 22:57:39 +00:00
Martin Mares
9a220cabbc #ifdef out lots of debugging information.
The long resource/routing table dump printed upon startup is gone now
and if you wish to see it, just send bird SIGUSR1 or use the `debug'
commands.
2000-05-04 20:52:28 +00:00
Pavel Machek
9b63e3a58a Spelling fixes. 2000-05-04 20:08:34 +00:00
Martin Mares
53943a0022 Defined format specifier %M' which behaves as %m', but takes the
error code as an argument.

Use it in socket hooks where we really shouldn't rely on errno containing
the right value or even existing.
2000-05-02 16:10:04 +00:00
Pavel Machek
2337ade754 Moved documentation to top of file, where it belongs. 2000-04-30 18:47:48 +00:00
Pavel Machek
9c1a55deee IpV6 now actually compiles.
Mj, could you provide example of static config for ipv6 that is _not_
rejected by checks? I tried this and got rejected.

	route 62:168::/32 via 62:169::;
	route 1:2::/32 via 1:3::;
2000-04-29 15:45:30 +00:00
Pavel Machek
decc99fbbd Killed fixme: I already fixed it. 2000-04-28 10:15:57 +00:00
Pavel Machek
a769a180d7 Provide rip_get_attr, how do I test it? 2000-04-28 10:14:59 +00:00
Pavel Machek
6c0a7174af Add sample documentation to rip. 2000-04-28 09:55:52 +00:00
Pavel Machek
c010f4cb37 Use right address for ripv6. 2000-04-26 11:33:03 +00:00
Pavel Machek
7f704c06d8 Cleanup in preparation for ipv6. 2000-04-26 11:07:57 +00:00
Pavel Machek
3d0ea3a7c3 Fix of comment. 2000-04-07 09:02:17 +00:00
Martin Mares
dad177d7e0 RIP: Set attribute class. 2000-04-01 10:20:12 +00:00
Martin Mares
ac4b4683ae Removal of useless includes continues... 2000-03-31 23:40:00 +00:00
Martin Mares
a37410cbdd Use bsprintf() instead of sprintf(). 2000-03-31 23:33:03 +00:00
Martin Mares
221135d6bf Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.
2000-03-31 23:30:21 +00:00
Pavel Machek
8d2e3eba92 Cross-protocol issues solved better 2000-03-29 08:58:06 +00:00
Pavel Machek
d0031c5ee9 Use neigh_connected_to in rip, and behave more correctly
w.r.t. whotoldme and nexthop.
2000-03-27 12:21:11 +00:00
Pavel Machek
6480dd0880 I broke compilation. Sorry. 2000-03-26 21:31:57 +00:00
Pavel Machek
8c86f96fa6 Split horizont done right.
Locks done better.
2000-03-26 18:01:27 +00:00
Pavel Machek
772f489932 Minor change to make code more readable. 2000-03-23 12:08:40 +00:00
Pavel Machek
ff8ed63285 Rip now tries to lock interface.
Fixed fatal errors which caused segfault at startup.

Fixed fatal errors in rip which caused it not to send more than first
update.
2000-03-22 14:26:03 +00:00
Pavel Machek
856b87d1e4 Cleanup, mostly debugging messages. 2000-03-13 13:31:00 +00:00
Pavel Machek
af834f8630 Categorized TRACE() messages in rip 2000-03-09 16:38:51 +00:00
Pavel Machek
cb822c0777 Rip tracing: still need config hunk to set p->debug. 2000-03-09 15:12:41 +00:00
Pavel Machek
38466dbdac log() classes done right 2000-03-09 14:59:10 +00:00
Martin Mares
9f4929e749 Renamed EAF_INLINE to EAF_TEMP to make the name reflect the real meaning. 2000-03-04 22:30:44 +00:00
Martin Mares
ef0883a12f Adapted RIP to new interface flags. Pavel, please verify it's right. 2000-02-29 23:20:55 +00:00
Pavel Machek
bd215f8bab Do not send empty packets in rip. 2000-01-26 14:12:18 +00:00
Pavel Machek
8660913ba8 Output made prettier. 2000-01-26 12:07:18 +00:00
Martin Mares
d272fe22dd Separated `official protocol names' used in status dumps from name templates
used for automatic generation of instance names.

	protocol->name is the official name
	protocol->template is the name template (usually "name%d"),
		should be all lowercase.

Updated all protocols to define the templates, checked that their configuration
grammar includes proto_name which generates the name and interns it in the
symbol table.
2000-01-17 11:52:50 +00:00
Martin Mares
6aea8905c4 TODO entries and FIXME's. 1999-12-16 12:18:33 +00:00
Pavel Machek
dff1f57917 Added hooks for show route.
Fixed passing metrics around routing tables.
1999-12-08 13:33:44 +00:00
Pavel Machek
4d4de35f00 Fix timing and fix endianity in metrics. 1999-12-08 12:51:45 +00:00
Pavel Machek
e7f76bae8c Stupid bug (essentially while(1) loop) occuring sometimes during start
of bird fixed.
1999-12-01 13:44:42 +00:00
Pavel Machek
639e628554 Actually check sequence numbers. 1999-12-01 12:52:57 +00:00
Pavel Machek
1a509a6310 md5 authentication seems to work. 1999-11-25 15:03:12 +00:00
Pavel Machek
d3702d57fd Bugfixes: select right password for password authentication, do not
try to process authentication blocks as datablocks, make it possible
to add data at end of packet. Password authentication should actually work.
1999-11-25 14:54:08 +00:00
Pavel Machek
7e61cac325 Triggered updates should now actually work. Fixed metric=16 -> time it
out logic.
1999-11-25 13:38:25 +00:00
Pavel Machek
774f149959 Fix timeouts. Triggered updates are not done, yet. 1999-11-25 12:01:45 +00:00
Martin Mares
ea9bb932a3 Commented out nexthop selection, see the comment. 1999-11-17 11:16:15 +00:00
Pavel Machek
3918b1b050 Added timeout for routes (which means proper expiring of routes) added
few fixmes.
1999-11-10 11:52:36 +00:00
Pavel Machek
a5b583f20a FIXME's updated. One fixme is remaining for correct RIPv4. Wow. 1999-11-04 14:39:51 +00:00
Pavel Machek
7bf19253d0 Reject packets which are not authenticated.
Set correct nexthop on outgoing packets.
1999-11-04 14:26:18 +00:00
Pavel Machek
f942a589ef FIXME's for rip added.
Will we ever able to generate packets saying "route 1.2.3.4 using someone else"?
1999-10-12 13:04:50 +00:00
Martin Mares
89dc383a8c Changed syntax of ip_class_mask, the old one was stupid. 1999-10-12 07:46:08 +00:00
Pavel Machek
c79ec2ec19 Untested IPv6 support added. I do not know if it compiles in IPV6 mode. 1999-10-11 14:19:29 +00:00
Pavel Machek
ac40c888c2 Obvious bugs in authentication fixed. 1999-10-02 10:44:48 +00:00
Pavel Machek
bce8a34b12 Few fixme's fixed in rip (will not crash any more on request for
sending routing table - hopefully).

Next few steps in md5 authentication (not yet complete).
1999-08-18 13:19:33 +00:00
Martin Mares
3e1f30610e Defined IP_PREC_INTERNET_CONTROL and made all (well, both :)) protocols
use it when creating sockets.
1999-06-01 13:57:24 +00:00
Pavel Machek
9de840bdbd Set corectly destination address for RIP multicast. Broadcasting &
multicasting rip actually works [broadcasting is kind of hard to turn
it on, through].
1999-05-31 20:34:48 +00:00
Pavel Machek
b94bbe0027 Added FIXME: mode broadcast randombly corrupts memory.
Small cleaning and bugfixes.
1999-05-31 20:30:16 +00:00
Pavel Machek
9607536dbf Kill duplicity between rif and rif_patt. 1999-05-31 19:43:08 +00:00
Pavel Machek
72efa4b6f8 Small fixes to rip. 1999-05-31 19:37:16 +00:00
Pavel Machek
91c7c7416b Incoming side of authentication done but untested. Right handling of
filters in rip.
1999-05-31 19:16:22 +00:00
Martin Mares
bb027be1e2 Added extra argument to rt_update hook which contains a pointer to the
temporary attribute list.
1999-05-31 18:55:35 +00:00
Pavel Machek
fd5f8704bb Make rip use newly defined password lists. 1999-05-26 14:37:47 +00:00
Martin Mares
4f1a6d27b9 Kill remaining master_table relics in KRT code.
Make all protocols pass routing table to rte_update and rte_discard.
1999-05-17 20:16:53 +00:00
Pavel Machek
1b16029c12 Mensi updaty do ripu. Pridana passwd autentikace (netestovano). 1999-05-11 09:53:45 +00:00
Martin Mares
9a158361da I rewrote the interface handling code, so that it supports multiple
addresses per interface (needed for example for IPv6 support).

Visible changes:

o  struct iface now contains a list of all interface addresses (represented
   by struct ifa), iface->addr points to the primary address (if any).
o  Interface has IF_UP set iff it's up and it has a primary address.
o  IF_UP is now independent on IF_IGNORED (i.e., you need to test IF_IGNORED
   in the protocols; I've added this, but please check).
o  The if_notify_change hook has been simplified (only one interface pointer
   etc.).
o  Introduced a ifa_notify_change hook. (For now, only the Direct protocol
   does use it -- it's wise to just listen to device routes in all other
   protocols.)
o  Removed IF_CHANGE_FLAGS notifier flag (it was meaningless anyway).
o  Updated all the code except netlink (I'll look at it tomorrow) to match
   the new semantics (please look at your code to ensure I did it right).

Things to fix:

o  Netlink.
o  Make krt-iface interpret "eth0:1"-type aliases as secondary addresses.
1999-05-06 21:38:11 +00:00
Pavel Machek
36bbfc704c Updated filters: they now actually see IP/pxlen of net being filtered,
gateway, and who told us, so they can do usefull jobs from now on.
1999-04-19 18:41:56 +00:00
Pavel Machek
afbc41ab3d SImplify code a tiny bit. 1999-04-14 21:11:24 +00:00
Martin Mares
08e2d6259a Removed TOS support. This simplifies many things a lot. 1999-04-12 18:01:07 +00:00
Martin Mares
6c02d83f4d Added FIXME: If a strange interface appears, ignore it instead of only
writing an error message...
1999-03-29 19:56:32 +00:00
Martin Mares
7dc4827c96 Added everything protocols need to know about multiple routing tables,
i.e. struct proto now contains field 'table' pointing to routing table
the protocol is attached to. Use this instead of &master_table.

Modified all protocols except the kernel syncer to use this field.
1999-03-26 21:50:43 +00:00
Martin Mares
c612a3be31 Removed the `rta_same' hook since it's no longer needed (all protocols
needing some local information should use extended attrs and cached
rta's).
1999-03-17 13:13:18 +00:00
Pavel Machek
9a38757c6a Initialize pointers to functions so that code is actually alive. 1999-03-17 13:05:25 +00:00
Pavel Machek
29df5739c4 Don't segfault on unknown interface. 1999-03-17 10:20:23 +00:00
Pavel Machek
05a845ed8e Avoid segfault 1999-03-02 19:49:22 +00:00
Pavel Machek
c748cdb9ec Hopefully ended translating to new interface 1999-03-01 21:18:01 +00:00
Pavel Machek
293e313ec9 More rip fixes (config data moved to struct rip_proto_config), still
not tested.
1999-02-15 13:34:43 +00:00
Martin Mares
d1f7eab6b5 Parameter order for the proto->if_notify hook was different in the include
file and different in reality. Decided to use the same order as we do
for proto->rt_notify (i.e., first new value and second the old one).
1999-02-13 21:58:53 +00:00
Martin Mares
ab749558a2 Pass new argument to FIB_ITERATE_END. 1999-02-13 19:14:16 +00:00
Pavel Machek
edf62ba13f Propagate depend into all subdirectories; make rip compile after
latest mj's changes.
1999-02-08 22:50:32 +00:00
Pavel Machek
663683a575 Make it compile again (stupid makefiles!), make quiet option work
(multicast/broadcast options are currently unimplemented).
1999-01-12 16:50:38 +00:00