Pavel Machek
2f2663bdb7
Password same now actually works
2000-05-16 15:00:15 +00:00
Martin Mares
df9f0fb30a
Don't log state changes if nothing user-visible has changed.
2000-05-16 13:43:26 +00:00
Martin Mares
e3f2d5fce3
Cleanup of configuration.
...
o Use `expr' instead of `NUM' and `ipa' instead of `IPA',
so that defined symbols work everywhere.
o `define' now accepts both numbers and IP addresses.
o Renamed `ipa' in filters to `fipa'.
Pavel, please update filters to accept define'd symbols as well.
2000-05-15 11:48:23 +00:00
Martin Mares
9449c91ab2
Added `show route for <prefix-or-ipa>' which looks up route leading to
...
given network.
2000-05-13 11:42:42 +00:00
Martin Mares
56d6c530eb
Added fib_route() which does (although very slow) lookup of longest-match
...
routing in a FIB.
2000-05-13 11:42:06 +00:00
Martin Mares
758458be05
Unified parsing of prefixes.
...
Had to rename `prefix' in filters to `fprefix'.
2000-05-13 11:17:49 +00:00
Martin Mares
08f0290a1e
Changed semantics of the rt_update hook. The attribute list we pass now
...
contains all attributes, not just the temporary ones. This avoids having
to merge the lists inside protocols or doing searches on both of them.
Also, do filtering of routes properly. (I'd like to avoid it, but it's
needed at least in the krt protocol.)
2000-05-13 11:00:37 +00:00
Pavel Machek
ec21aecfdd
Fixed nasty segfault in rip.
2000-05-11 10:33:18 +00:00
Pavel Machek
45a48e2de2
password_same utility function
2000-05-10 13:42:46 +00:00
Pavel Machek
c0100454cf
Added more convient interface for ea_find.
...
What is special about int default;? Compiler chokes on that!
2000-05-10 06:54:40 +00:00
Martin Mares
0521e4f684
rt_prune: Don't kill routes from protocols in FS_FEEDING state. If debugging,
...
call fib_check() on the table's fib.
2000-05-08 22:33:02 +00:00
Martin Mares
8abbde02d4
Several simplifications of the fib iterators.
2000-05-08 19:11:49 +00:00
Martin Mares
33a368ad59
Implemented show route count' which is
show route stats' with
...
exception that it doesn't print the routes themselves.
2000-05-08 14:58:00 +00:00
Martin Mares
e48dae3ed7
Stop feeding the protocol if it suddenly shuts down.
2000-05-08 14:51:26 +00:00
Martin Mares
5d86aefb6c
Really free attributes.
2000-05-08 13:12:14 +00:00
Martin Mares
d0126f0bf0
bugs_in_attr_cache_hashing--;
2000-05-08 11:40:30 +00:00
Martin Mares
916c8c0aba
Use preferences properly.
2000-05-08 10:40:00 +00:00
Martin Mares
0117d00494
Fixed `show route primary'.
2000-05-08 10:37:45 +00:00
Martin Mares
18c031fae8
Debugged printing and pruning of neighbor cache entries.
2000-05-08 10:13:59 +00:00
Martin Mares
0d3070824d
Don't count networks with no routes (they are not displayed at all and
...
will be removed during the next garbage collection pass).
2000-05-07 11:32:34 +00:00
Martin Mares
23693958aa
Implemented `show route <...> stats'.
2000-05-07 11:28:59 +00:00
Martin Mares
6998bb9ee3
Squashed one bug in fib_rehash(). No more routes disappearing as if struct
...
by a lightning :)
2000-05-07 11:28:34 +00:00
Martin Mares
891cec854f
Killed one more reference to RTS_RIP_EXT.
2000-05-07 11:27:23 +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
498c33395f
Cosmetic fixes.
2000-05-06 21:42:19 +00:00
Martin Mares
0b7610985c
Fixed silly bug in previous commit.
2000-05-06 21:31:41 +00:00
Martin Mares
67be5b23cd
When rte_update is called for an identical route, don't announce anything.
...
Please implement the rte_same hook in your protocols. It should just
compare your metrics stored directly in rte, the rest is done by the core.
2000-05-06 21:21:19 +00:00
Martin Mares
ab1129c1bd
Added skeleton Doc files for the whole developer's documentation.
2000-05-05 17:17:42 +00:00
Martin Mares
beaf86e13c
Removed RTS_RIP_EXT.
2000-05-04 21:23:10 +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
Martin Mares
93a786cb03
Removed a lot of unused variables.
...
Please try compiling your code with --enable-warnings to see them. (The
unused parameter warnings are usually bogus, the unused variable ones
are very useful, but gcc is unable to control them separately.)
2000-05-04 20:30:36 +00:00
Martin Mares
1d9622e10d
Switched off LOCAL_DEBUG.
2000-05-04 09:08:28 +00:00
Martin Mares
85a291ff30
IPv6 address classification fixes.
2000-05-02 15:21:51 +00:00
Martin Mares
2edb31b097
Split CF_HDR section to CF_HDR (only includes) and CF_DEFINES (defines,
...
C declarations etc.).
2000-04-28 15:11:10 +00:00
Martin Mares
f75e3bbc01
Fixed a couple of nasty CLI bugs which were triggered on long or multi-part
...
outputs. It took a whole evening to hunt them down, but now the CLI seems
to work fine.
Now I run three BGP connections with several thousand routes!
2000-04-27 22:35:08 +00:00
Martin Mares
8f6accb5bb
Event handlers no longer return re-queue flag. Instead of using it, just
...
call ev_schedule() on the same handler which should work perfectly now.
2000-04-27 22:28:49 +00:00
Martin Mares
987de54578
Fixed stupid bug in as_path_format().
2000-04-27 19:44:27 +00:00
Martin Mares
dbf3939a53
Better formatting of router ID's.
2000-04-26 12:32:07 +00:00
Martin Mares
ebd3720f83
Fixed several bugs in protocol state machine. Reconfigurations and
...
restarts of BGP seem to work now.
2000-04-26 12:30:41 +00:00
Pavel Machek
9834765946
Whitespace changes.
2000-04-26 09:37:07 +00:00
Martin Mares
41b26cfb55
Don't forget to set filter pointers in struct proto when reconfiguring.
2000-04-25 21:56:46 +00:00
Martin Mares
56a2bed46b
Don't import/export MED and LOCAL_PREF on external links.
...
Added real comparison of BGP routes (inspired by the Cisco one).
Default local preference and default MED are now settable.
Defined filter keywords for all BGP attributes we know.
2000-04-17 12:46:07 +00:00
Martin Mares
700bbe60fb
The previous fix for spacing was (a) totally out of context, (b) wrong.
...
Please *read* the code when trying to change it.
Also killed a couple of type clashes.
2000-04-17 11:49:41 +00:00
Pavel Machek
5a2455886d
Put space between entries so they are separated.
...
FIXME: should use format as in filters.
2000-04-17 11:42:34 +00:00
Pavel Machek
9c400ec9dd
Int sets moved to core. It is now possible to have variable of type clist.
2000-04-17 11:34:38 +00:00
Martin Mares
51a183af78
Define EAF_ORIGINATED and propagate it properly when merging attribute lists.
2000-04-17 11:23:05 +00:00
Martin Mares
4b03f64b34
Aesthetical tweaks (asterisk spells `asterisk' etc.)
2000-04-17 11:22:24 +00:00
Pavel Machek
2a40efa5e6
as_path_match moved to a-path.c
2000-04-17 11:11:33 +00:00
Pavel Machek
684c6f5a0e
Path_getlen moved to nest and length was made callable from filters.
2000-04-17 11:06:39 +00:00
Martin Mares
c6add07fa6
Printing of AS paths and community sets.
2000-04-17 10:18:55 +00:00
Martin Mares
c0668f3696
Created nest/a-path.c and a-set.c which should contain general operations
...
on AS paths and community sets.
Moved as_path_prepend() there.
Pavel, please move the other functions as well.
2000-04-17 07:53:29 +00:00
Martin Mares
b475c543b4
Fix comments.
2000-04-10 22:08:32 +00:00
Pavel Machek
73e03bce66
As usuall, most important info was missing.
2000-04-10 14:45:00 +00:00
Martin Mares
6f57dcc07c
Export ea_same() and ea_hash().
2000-04-10 12:39:29 +00:00
Martin Mares
287111fed1
Fix stupid bug in neighbor cache.
2000-04-10 10:40:00 +00:00
Martin Mares
d3feceff10
BGP doesn't need any inline attributes.
2000-04-09 22:04:12 +00:00
Martin Mares
3991d84e8f
Changed initialization of protocol list -- now we call proto_build() instead
...
of calling the protocols manually.
Implemented printing of dynamic attributes in `show route all'.
Each protocol can now register its own attribute class (protocol->attr_class,
set to EAP_xxx) and also a callback for naming and formatting of attributes.
The callback can return one of the following results:
GA_UNKNOWN Attribute not recognized.
GA_NAME Attribute name recognized and put to the buffer,
generic code should format the value.
GA_FULL Both attribute name and value put to the buffer.
Please update protocols generating dynamic attributes to provide
the attr_class and formatting hook.
2000-04-01 10:19:47 +00:00
Martin Mares
f880924990
BGP now handles incoming routes (IPv4 only).
2000-04-01 09:17:33 +00:00
Martin Mares
8581061399
When tracing, always print incoming part of the trace before the outgoing one.
...
Avoid buffer overflows in `show routes' command.
2000-04-01 09:16:42 +00:00
Martin Mares
ac4b4683ae
Removal of useless includes continues...
2000-03-31 23:40:00 +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
Martin Mares
08732b7178
Fixed bug in processing of dynamic attributes.
2000-03-31 23:21:19 +00:00
Martin Mares
3a6337ecb2
Use FF_FORCE_TMPATTR where appropriate.
2000-03-30 08:50:46 +00:00
Pavel Machek
0a06a9b8b3
f_run gets one more parameter to distinguish between in and out modes.
2000-03-29 09:02:00 +00:00
Martin Mares
200accf396
if_connected() is again private.
...
Introduced neigh_connected_to() to serve the same purpose efficiently.
2000-03-27 12:16:37 +00:00
Pavel Machek
6480dd0880
I broke compilation. Sorry.
2000-03-26 21:31:57 +00:00
Pavel Machek
697711be2c
if_connected is usefull outside of neighbour cache.
2000-03-26 18:00:45 +00:00
Martin Mares
267a2c0ebd
Added missing newline in debug output.
2000-03-20 20:52:18 +00:00
Martin Mares
ca97b489de
Define new data types for BGP.
2000-03-20 18:45:03 +00:00
Martin Mares
2638249d34
Bare skeleton of the BGP.
2000-03-19 22:09:07 +00:00
Martin Mares
349e21bb0b
Protocol tracing: Don't dump core on filtered out routes.
2000-03-19 21:59:24 +00:00
Martin Mares
f098e072be
Fixed a bunch of FIXME's by removing them :)
2000-03-12 22:53:05 +00:00
Martin Mares
4327090276
Made `show status' show uptime and time of last reconfiguration.
2000-03-12 22:44:54 +00:00
Martin Mares
6b9fa32080
Great cleanup of debug messages. LOCAL_DEBUG turned off in most modules,
...
several debug() calls converted to DBG().
2000-03-12 21:01:38 +00:00
Martin Mares
6a9f28b0b9
Added tracing of interface events.
2000-03-12 20:50:35 +00:00
Martin Mares
b0a47440e3
Oops, got <' and
>' markers in trace output reversed.
2000-03-12 20:49:08 +00:00
Martin Mares
cfd46ee4c5
Added debugging of communication between protocols and routing tables.
...
Just ask for "debug routes" if you want to see the routes and "debug filters"
if you want even the rejected ones.
2000-03-12 20:30:53 +00:00
Martin Mares
839380d7ec
Added debugging of protocol state transitions.
2000-03-07 21:50:21 +00:00
Martin Mares
f30b86f9d5
Added configuration of default protocol debugging flags.
2000-03-07 21:50:03 +00:00
Martin Mares
96d8e3bff2
Added protocol debugging flags (protocol.h: D_xxx), parsing of them
...
in configuration files and commands for manipulating them.
Current debug message policy:
o D_STATES, D_ROUTES and D_FILTERS are handled in generic code.
o Other debug flags should be handled in the protocols and whenever
the flag is set, the corresponding messages should be printed
using calls to log(L_TRACE, ...), each message prefixed with
the name of the protocol instance. These messages should cover
the whole normal operation of the protocol and should be useful
for an administrator trying to understand what does the protocol
behave on his network or who is attempting to diagnose network
problems. If your messages don't fit to the categories I've defined,
feel free to add your own ones (by adding them to protocol.h
and on two places in nest/config.Y), but please try to keep the
categories as general as possible (i.e., not tied to your protocol).
o Internal debug messages not interesting even to an experienced
user should be printed by calling DBG() which is either void or
a call to debug() depending on setting of the LOCAL_DEBUG symbol
at the top of your source.
o Dump functions (proto->dump etc.) should call debug() to print
their messages.
o If you are doing any internal consistency checks, use ASSERT
or bug().
o Nobody shall ever call printf() or any other stdio functions.
Also please try to log any protocol errors you encounter and tag them
with the appropriate message category (usually L_REMOTE or L_AUTH). Always
carefully check contents of any message field you receive and verify all
IP addresses you work with (by calling ipa_classify() or by using the
neighbour cache if you want to check direct connectedness as well).
2000-03-07 20:49:48 +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
b9626ec6ea
Garbage collector events and counters are now per table and one day
...
they can be made configurable if it turns out to be useful.
2000-03-04 22:21:06 +00:00
Martin Mares
c7814f01fc
Enabled short continuations.
2000-03-04 21:26:19 +00:00
Martin Mares
ee76a92a80
Implemented real attribute cache.
2000-03-04 21:09:14 +00:00
Martin Mares
c8518ae136
Removed RTF_EXTERIOR and RTF_TAGGED (unused).
2000-03-01 15:05:43 +00:00
Martin Mares
85053fce04
Reimplemented neighbor cache. Now uses real hashing.
2000-03-01 14:51:47 +00:00
Martin Mares
7293c5dd81
Added proto->hash_key which contains randomly generated hash key used
...
for calculation of hash functions depending on proto.
2000-03-01 14:49:07 +00:00
Martin Mares
4c1b4e1a58
If the user has specified identical preferences for instances of different
...
protocols, break the tie by comparing addresses, so we keep the ordering
unambiguous.
2000-03-01 11:48:11 +00:00
Martin Mares
6a636392d3
Rewrote interface type detection logic. The `unnumbered' flag is now per
...
address, not per interface (hence it's ifa->flags & IA_UNNUMBERED) and
should be set reliably. IF_MULTIACCESS should be fixed now, but it isn't
wise to rely on it on interfaces configured with /30 prefix.
2000-02-29 23:19:52 +00:00
Martin Mares
fae0396ea4
Completion works. Unfortunately, we have to access a couple of internal
...
symbols of libreadline :-(
2000-02-17 23:37:16 +00:00
Martin Mares
4b87e256eb
Split off general commands to cmds.c.
...
Added `show symbols' command which dumps whole symbol table together
with symbol types etc.
2000-01-19 12:30:19 +00:00
Martin Mares
f5ad9f87a3
Killed a couple of bugs in the neighbor cache.
...
Manual disable/enable/restart/shutdown/reconfiguration of protocols
no longer hangs on loops in neighbor lists :)
2000-01-19 11:52:32 +00:00
Martin Mares
3ea1ba632b
Killed protocol->priority. Protocol startup should be clean and hack-free now.
...
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).
2000-01-18 11:01:03 +00:00
Martin Mares
54aaa89ada
protocol->startup_counter no longer exists.
2000-01-18 10:42:45 +00:00
Martin Mares
471cc0be65
Moved initlialization of protocol lists to global init. Argh.
2000-01-17 12:38:07 +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
88dc89f991
Device protocol supports reconfiguration.
2000-01-17 00:20:17 +00:00
Martin Mares
26368f656c
Don't forget changing proto->name to point to name in new configuration
...
(to avoid the name being freed with the old config).
Also remember to add proto_pipe to protocol_list.
2000-01-17 00:19:58 +00:00
Martin Mares
f14a4becbe
Reworked proto lists -- each proto is now in two lists: the global one
...
(proto_list) and per-type one (original lists). A lot of things simplified.
Implemented `disable', `enable' and `restart' CLI commands.
2000-01-16 23:30:06 +00:00
Martin Mares
30a6108ccc
Added filter_same() for comparision of two filters.
...
Pavel, please implement this as soon as possible.
2000-01-16 17:49:32 +00:00