Jan Moskyto Matejka
05d47bd53e
Linpool: default allocation size
2017-05-16 15:34:57 +02:00
Ondrej Zajicek (work)
1c5b4c5d5b
Merge branch 'master' into int-new
2017-05-16 14:56:01 +02:00
Ondrej Zajicek (work)
b845ea097c
Remove autoconf macros for time_t and alignment
...
Replaced by constant compile-time expressions. CPU_STRUCT_ALIGN is not
really correct, but is consistent with the old behavior.
2017-05-16 13:05:00 +02:00
Ondrej Zajicek (work)
e40542ef3a
Minor autoconf cleanup and documentation update
2017-05-16 12:59:22 +02:00
Ondrej Zajicek (work)
c253ec3a9c
Some more autoconf cleanups
...
Replace integer type width detection with C99 fixed-width types.
Also remove some unused or obsolete code.
Thanks to Ruben Kerkhof for the patchset.
2017-05-16 12:59:22 +02:00
Ondrej Zajicek (work)
fd1f355b7b
Merge branch 'master' into int-new
2017-05-09 17:37:38 +02:00
Ondrej Zajicek (work)
71652572e3
Minor autoconf cleanup and documentation update
2017-05-09 16:46:41 +02:00
Ondrej Zajicek (work)
525a88d879
Merge branch 'master' into int-new
2017-05-09 14:48:21 +02:00
Ondrej Zajicek (work)
5d6dc93043
Some more autoconf cleanups
...
Replace integer type width detection with C99 fixed-width types.
Also remove some unused or obsolete code.
Thanks to Ruben Kerkhof for the patchset.
2017-05-09 13:45:26 +02:00
Ondrej Zajicek (work)
95639d9577
Device: Fix option 'primary'
2017-05-03 12:56:17 +02:00
Ondrej Zajicek (work)
92a85089b8
NEWS and version update
2017-04-29 21:49:13 +02:00
Ondrej Zajicek (work)
b644a490f0
BSD: Fix address scan on OpenBSD
2017-04-29 18:37:51 +02:00
Ondrej Zajicek (work)
1d21306785
Minor fixes
2017-04-29 01:24:30 +02:00
Jan Moskyto Matejka
97e48b6a18
Adding also our copy of struct rtvia.
2017-04-12 16:04:22 +02:00
Jan Moskyto Matejka
54635f435a
Include local lwtunnel.h unless found in system
2017-04-12 16:04:22 +02:00
Ondrej Zajicek (work)
bff21441dd
Netlink: Change default kernel metric to 32
...
This avoids collisions with non-BIRD routes in kernel tables.
2017-03-29 16:10:00 +02:00
Ondrej Zajicek (work)
ed6100441e
Netlink: Better handling of an error case
2017-03-29 15:55:39 +02:00
Ondrej Zajicek (work)
7074be22f1
Netlink: Fix device route delete
2017-03-28 18:27:08 +02:00
Ondrej Zajicek (work)
d1b8fe93f0
Netlink: Fix bug in RTA_PRIORITY handling
2017-03-28 16:05:40 +02:00
Ondrej Zajicek (work)
7a855725f2
Some autoconf cleanups
...
The patch allows to use autoreconf, replaces some long obsolete
constructs and does some other minor cleanups. Also, the file
configure.in is renamed to configure.ac, as the old name has been
deprecated for a long time.
Thanks to Ruben Kerkhof for the patchset.
2017-03-14 13:53:52 +01:00
Jan Moskyto Matejka
c609d03986
Merge branch 'int-new' into nexthop-merged
2017-02-22 11:58:04 +01:00
Ondrej Zajicek (work)
62e64905b7
Several minor fixes
2017-02-20 02:26:45 +01:00
Ondrej Zajicek (work)
c259669fa3
Merge branch 'master' into int-new
2017-02-08 14:34:48 +01:00
Ondrej Zajicek (work)
f6e6c3b5a5
Fix IP_HDRINCL usage on FreeBSD 11
...
FreeBSD 11 changed endianity of ip_len field from host order to network
order. Also DragonFly BSD allegedly expects network order here.
Thanks to Olivier Cochard-Labbé for the patch.
2017-01-17 13:21:25 +01:00
Jan Moskyto Matejka
d14f8c3c45
Netlink: MPLS routes in kernel
...
Anyway, Bird is now capable to insert both MPLS routes and MPLS encap
routes into kernel.
It was (among others) needed to define platform-specific AF_MPLS to 28
as this constant has been assigned in the linux kernel.
No support for BSD now, it may be added in the future.
2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka
5b208e296f
Removing (struct rta)->cast. Never used.
2016-12-22 13:09:59 +01:00
Jan Moskyto Matejka
4e276a8920
Merged multipath and single-path data structures.
...
Dropped struct mpnh and mpnh_*()
Now struct nexthop exists, nexthop_*(), and also included struct nexthop
into struct rta.
Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is needed
to distinguish between these two cases, RTD_DEVICE is equivalent to
IPA_ZERO(a->nh.gw), RTD_ROUTER is then IPA_NONZERO(a->nh.gw).
From now on, we also explicitely want C99 compatible compiler. We assume
that this 20-year norm should be known almost everywhere.
2016-12-22 13:01:06 +01:00
Ondrej Zajicek (work)
017da76b72
NEWS and version update
2016-12-21 16:46:47 +01:00
Jan Moskyto Matejka
2c33da5070
Netlink: fix occasional netlink hangs on busy machines
2016-12-20 20:36:56 +01:00
Ondrej Zajicek (work)
5546aad260
NEWS and version update
2016-12-07 19:56:42 +01:00
Jan Moskyto Matejka
ad88b94bca
Merge branch 'int-new-rpki-squashed' (early part) into int-new
2016-12-07 15:30:46 +01:00
Ondrej Zajicek (work)
d15b0b0a1b
BGP redesign
...
Integrated and extensible BGP with generalized AFI handling,
support for IPv4+IPv6 AFI and unicast+multicast SAFI.
2016-12-07 14:20:52 +01:00
Jan Moskyto Matejka
af62c0f9f1
LibSSH may be switched off together with RPKI
2016-12-07 14:15:35 +01:00
Jan Moskyto Matejka
cdbe1defa4
SSH: Commented quirk based on undocumented behavior of LibSSH
2016-12-07 09:35:24 +01:00
Pavel Tvrdík
65d2a88dd2
RPKI protocol with one cache server per protocol
...
The RPKI protocol (RFC 6810) using the RTRLib
(http://rpki.realmv6.org/ ) that is integrated inside
the BIRD's code.
Implemeted transports are:
- unprotected transport over TCP
- secure transport over SSHv2
Example configuration of bird.conf:
...
roa4 table r4;
roa6 table r6;
protocol rpki {
debug all;
# Import both IPv4 and IPv6 ROAs
roa4 { table r4; };
roa6 { table r6; };
# Set cache server (validator) address,
# overwrite default port 323
remote "rpki-validator.realmv6.org" port 8282;
# Overwrite default time intervals
retry 10; # Default 600 seconds
refresh 60; # Default 3600 seconds
expire 600; # Default 7200 seconds
}
protocol rpki {
debug all;
# Import only IPv4 routes
roa4 { table r4; };
# Set cache server address to localhost,
# use default ports tcp => 323 or ssh => 22
remote 127.0.0.1;
# Use SSH transport instead of unprotected transport over TCP
ssh encryption {
bird private key "/home/birdgeek/.ssh/id_rsa";
remote public key "/home/birdgeek/.ssh/known_hosts";
user "birdgeek";
};
}
...
2016-12-07 09:35:24 +01:00
Ondrej Zajicek (work)
9b0a0ba9e6
Unit Testing for BIRD
...
- Unit Testing Framework (BirdTest)
- Integration of BirdTest into the BIRD build system
- Tests for several BIRD modules
Based on squashed Pavel Tvrdik's int-test branch, updated for
current int-new branch.
2016-11-09 16:36:34 +01:00
Ondrej Zajicek (work)
8860e991f6
Merge branch 'master' into int-new
2016-11-08 19:27:58 +01:00
Ondrej Zajicek (work)
c8cafc8ebb
Minor code cleanups
2016-11-08 17:46:29 +01:00
Ondrej Zajicek (work)
cc5b93f72d
Merge tag 'v1.6.2' into int-new
2016-11-08 17:04:29 +01:00
Ondrej Zajicek (work)
7eec398875
BSD: Fix build on OpenBSD broken by previous commit
2016-11-01 16:20:04 +01:00
Jan Moskyto Matejka
3e236955c9
Build: switch on -Wextra, get rid of most of the warnings
...
There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.
2016-11-01 14:52:54 +01:00
Ondrej Zajicek (work)
17fe57d8dc
Log: Fix broken syslog name
...
BIRD passed string from configuration to openlog(), which kept it
internally. After reconfiguration the old string was freed, therefore
openlog had invalid copy.
Thanks to Chris Caputo for the original patch.
2016-11-01 11:37:49 +01:00
Ondrej Zajicek (work)
f51b1f5565
NEWS and version update
2016-09-29 15:06:19 +02:00
Jan Moskyto Matejka
ccd2a3eda2
Kernel socket missing err_hook fix
...
Thanks to Tim Weippert for bugreport.
2016-09-29 13:21:16 +02:00
Ondrej Zajicek (work)
79e2293ab2
NEWS and version update
2016-09-22 13:34:56 +02:00
Ondrej Zajicek (work)
6e75d0d27f
KRT: Add krt_scope attribute
...
Add a new route attribute, krt_scope, to expose the Linux kernel route
scope. Constants from /etc/iproute2/rt_scopes (prefixed by "ips_") are
expected to be used with the attribute. Both import and export are
supported.
Also, the patch fixes device route export to the kernel, by setting link
scope automatically.
2016-09-19 12:29:56 +02:00
Pavel Tvrdik
292f7858e6
Main: Improve BIRD help messages
2016-09-15 17:30:52 +02:00
Pavel Tvrdik
a290da25a1
rt-table: Fix kernel protocol export filter memory bug
...
Kernel protocol calls rt_export_merged(), which used @rte_update_pool for
temporary allocations, supposing it is called from other functions from
rt-table.c that handles locking and flushing of the linpool. Therefore,
linpool was not flushed properly and memory leaked.
Add linpool argument to rt_export_merged() and use @krt_filter_lp when
called from kernel protocol.
Thanks to Justin Cattle and Alexander Frolkin for the bugreport.
(Commit squashed and updated by Ondrej Zajicek)
2016-09-15 15:57:51 +02:00
Ondrej Zajicek (work)
4adcb9df1b
KRT: Add kernel metric protocol option
...
Kernel routes with different metrics do not clash with each other,
therefore using dedicated metric value is a reliable way to avoid
overwriting routes from other sources (e.g. kernel device routes).
Although kernel route metric could already be set as a route attribute by
filters, that is not consistent with the way how Linux kernel handles
route metric - not just a route attribute, but a part of a route key.
2016-09-15 14:59:06 +02:00
Ondrej Zajicek (work)
2feaa6931b
KRT: Support for IPv6 ECMP
...
Linux represents IPv6 ECMP routes as a sequence of unipath routes with
the same prefix. We have to translate between our representation (one
route with multipath next hop) and the Linux representation in both
directions.
Proper learning of alien IPv6 ECMP routes still not supported.
Thanks to Mikhail Sennikovskii for the original patch.
2016-09-14 11:53:54 +02:00
Ondrej Zajicek (work)
a1839f3c61
KRT: Fix trivial error
2016-08-31 14:02:41 +02:00
Ondrej Zajicek (work)
f9f2e280ea
KRT: Forbid path merging on BSD
...
We support ECMP routes only on Linux. Exported routes are checked in
krt_capable(), but a route generated during path merging avoids this
check.
2016-08-30 12:43:46 +02:00
Ondřej Surý
33d22f0e9e
whitespace fixes
2016-08-16 09:24:12 +02:00
Ondrej Zajicek (work)
a08a81c6b4
Netlink: Fix build with older headers missing IFA_FLAGS
2016-07-20 15:31:25 +02:00
Ondrej Zajicek (work)
e37d2e3e70
Netlink: Ignore tentative addresses
...
Ignore tentative IPv6 addresses and wait until finish of Duplicate
Address Detection (We got notification when an address is no longer
tentative) to avoid problems when protocols try to use interfaces
with tentative link-local addresses.
Based on patch from Jan Moskyto Matejka
2016-07-20 15:06:57 +02:00
Ondrej Zajicek (work)
f0b822a831
Log: Fix error handling of debug file open
...
Logging is not yet initialized, we have to use fprintf() here.
Thanks to Pavel Tvrdik for noticing and debugging it.
2016-07-11 20:22:55 +02:00
Pavel Tvrdík
8f01879c56
cppcheck: fix va_end() functions
2016-06-27 15:07:50 +02:00
Pavel Tvrdik
18c53c4567
Fix declaration of shared global variables async_*
...
In a header file write it with extern keyword. And in one of the *.c
file declare it without extern keyword.
2016-06-08 17:37:16 +02:00
Jan Moskyto Matejka
9dbcb11cb5
Unix IO: Tried to fix strange behavior after POLLHUP or POLLERR.
2016-05-30 14:28:22 +02:00
Jan Moskyto Matejka
925aa14912
After-master-merge simple fixes.
...
BSD lib/setkey.h and lib/sysio.h #include fixes.
OpenBSD's flex needs -o param without space.
V6ONLY for SK_IP fix.
2016-05-24 12:12:14 +02:00
Ondrej Zajicek (work)
379f995940
BSD: Fix setkey in int-new branch
2016-05-17 16:19:50 +02:00
Ondrej Zajicek (work)
08b3a24da5
IO: Minor changes in socket AF handing
...
AF can be specified implicitly by saddr or daddr, flags SKF_V4ONLY and
SKF_V6ONLY are to be removed.
2016-05-17 15:21:49 +02:00
Ondrej Zajicek (work)
af678af0d5
Merge remote-tracking branch 'origin/master' into int-new
2016-05-12 18:03:23 +02:00
Ondrej Zajicek (work)
286e2011d2
Miscellaneous minor fixes
2016-05-12 16:04:47 +02:00
Pavel Tvrdik
8e433d6a52
Prog Doc: Complete several missing parameters
2016-05-12 15:49:44 +02:00
Stijn Tintel
31e9e10144
netlink: update struct msghdr
...
The netlink code assumes an order for the members of struct msghdr.
This breaks recvmsg and sendmsg with musl libc on mips64. Fix this by
using designated initializers instead.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-05-10 16:05:16 +02:00
Jan Moskyto Matejka
0c6dfe5236
Merge branch 'int-new' into int-new-merged
2016-05-10 14:30:49 +02:00
Jan Moskyto Matejka
92912f063a
Merge remote-tracking branch 'origin/rte-update' into int-new
2016-05-10 14:21:15 +02:00
Jan Moskyto Matejka
a8caff322f
Portability: Fixed C extension error generated by CLang.
...
sysdep/linux/netlink.c:921:10: error: fields must have a constant size:
'variable length array in structure' extension will never be supported
char buf[128 + KRT_METRICS_MAX*8 + nh_bufsize(a->nexthops)];
^
1 error generated.
2016-05-10 14:08:49 +02:00
Jan Moskyto Matejka
7152e5efbb
Build system reworked to one global Makefile with includes and no nesting
...
Also removed the lib-dir merging with sysdep. Updated #include's
accordingly.
Fixed make doc on recent Debian together with moving generated doc into
objdir.
Moved Makefile.in into root dir
Retired all.o and birdlib.a
Linking the final binaries directly from all the .o files.
2016-05-10 14:07:34 +02:00
Pavel Tvrdik
f7a99acb4e
Initialize variable ifr in sk_setup()
...
==00:00:00:02.831 2468== Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s)
==00:00:00:02.831 2468== at 0x513BDEA: setsockopt (in /usr/lib/libc-2.23.so)
==00:00:00:02.831 2468== by 0x45C7AF: sk_setup (io.c:1216)
==00:00:00:02.831 2468== by 0x45CDFF: sk_open (io.c:1417)
==00:00:00:02.831 2468== by 0x44B562: rip_open_socket (packets.c:740)
==00:00:00:02.831 2468== by 0x4481A7: rip_iface_locked (rip.c:616)
==00:00:00:02.831 2468== by 0x4133E4: olock_run_event (locks.c:177)
==00:00:00:02.831 2468== by 0x45A6DE: ev_run (event.c:85)
==00:00:00:02.831 2468== by 0x45A7AD: ev_run_list (event.c:142)
==00:00:00:02.831 2468== by 0x45E0FC: io_loop (io.c:2066)
==00:00:00:02.831 2468== by 0x463B56: main (main.c:845)
==00:00:00:02.831 2468== Address 0xffefffd24 is on thread 1's stack
==00:00:00:02.831 2468== in frame #1 , created by sk_setup (io.c:1188)
==00:00:00:02.831 2468== Uninitialised value was created by a stack allocation
==00:00:00:02.831 2468== at 0x45C6BB: sk_setup (io.c:1188)
2016-05-03 11:02:48 +02:00
Ondrej Zajicek (work)
52bae25580
NEWS and version update
2016-04-29 13:07:21 +02:00
Ondrej Zajicek (work)
937e75d8f1
Add the Babel routing protocol (RFC 6126)
...
This patch implements the IPv6 subset of the Babel routing protocol.
Based on the patch from Toke Hoiland-Jorgensen, with some heavy
modifications and bugfixes.
Thanks to Toke Hoiland-Jorgensen for the original patch.
2016-04-28 18:01:40 +02:00
Ondrej Zajicek (work)
a7baa09862
BSD: Add the IPsec SA/SP database entries control
...
Add code for manipulation with TCP-MD5 keys in the IPsec SA/SP database
at FreeBSD systems. Now, BGP MD5 authentication (RFC 2385) keys are
handled automatically on both Linux and FreeBSD.
Based on patches from Pavel Tvrdik.
2016-04-13 14:37:09 +02:00
Jan Moskyto Matejka
2003a18407
Route update: move table lookup from protocols into rte_update2().
...
Many protocols do almost the same when creating a rte_update request
before calling rte_update2(). This commit should simplify the protocol
side of the route-creation routine.
2016-04-08 13:09:06 +02:00
Jan Moskyto Matejka
7a7ac65682
Merge branch 'master' into int-new-channels
2016-04-08 12:28:33 +02:00
Ondrej Zajicek (work)
f2ae2badff
Main: Add local option
...
Add option that changes default paths for config file and control socket
to the current working directory.
2016-04-07 12:39:49 +02:00
Jan Moskyto Matejka
4bdf1881dc
Channelize: rt_notify arg conversion table -> channel
2016-04-07 10:08:23 +02:00
Ondrej Zajicek (work)
bd22d7f41d
IO: Avoid multiple event cycles in one loop cycle.
...
Event cycle may took too much time and trigger next timer events, so
avoid cycling between timer and event cycles inside the loop cycle.
2016-04-06 11:57:28 +02:00
Ondrej Zajicek (work)
9e7b3ebdf9
IO: Replace RX priority heuristic with explicit mark
...
In BIRD, RX has lower priority than TX with the exception of RX from
control socket. The patch replaces heuristic based on socket type with
explicit mark and uses it for both control socket and BGP session waiting
to be established.
This should avoid an issue when during heavy load, outgoing connection
could connect (TX event), send open, but then failed to receive OPEN /
establish in time, not sending notifications between and therefore
got hold timer expired error from the neighbor immediately after it
finally established the connection.
2016-04-06 11:49:34 +02:00
Ondrej Zajicek (work)
e86cfd41d9
KRT: Fix route learn scan when route changed
...
When a kernel route changed, function krt_learn_scan() noticed that and
replaced the route in internal kernel FIB, but after that, function
krt_learn_prune() failed to propagate the new route to the nest, because
it confused the new route with the (removed) old best route and decided
that the best route did not changed.
Wow, the original code (and the bug) is almost 17 years old.
2016-04-06 11:46:25 +02:00
Jan Moskyto Matejka
ea0a8be2ff
IO/Poll: fix mistaken variable merge
...
The events variable is used in the short loop decision. The reasons are
not much clear, keeping this to keep the former behaviour.
2016-03-30 16:21:32 +02:00
Jan Moskyto Matejka
9c92f69272
Unix: Substituted select -> poll also in congestion checker
...
It does strange things when even one fd larger than FD_SETSIZE is
passed to select().
2016-03-18 11:47:13 +01:00
Jan Moskyto Matejka
fd926ed4ee
Poll: Prevent the improbable case of EAGAIN after POLLIN
2016-03-15 14:57:49 +01:00
Jan Moskyto Matejka
e1c13a5a7b
Unix: Rework of select-loop to poll-loop
...
This should lift the limit of FD_SETSIZE and allow more than 1024 fd's.
FD_SETSIZE limit doesn't matter now when creating new sockets.
2016-03-11 12:45:10 +01:00
Ondrej Zajicek (work)
c2106b674c
Unix: Fix bug in syslog name handling
...
Pointer to current_log_name has to be changed even if the name is the
same, because the old one will be invalid/freed after reconfiguration.
2016-02-11 21:53:55 +01:00
Jan Moskyto Matejka
ade389b326
BSD: compilation error fix
2016-02-01 10:28:50 +01:00
Ondrej Zajicek (work)
f4a60a9bc4
Channels - explicit links between protocols and tables
...
The patch adds support for channels, structures connecting protocols and
tables and handling most interactions between them. The documentation is
missing yet.
2016-02-01 10:28:50 +01:00
Pavel Tvrdík
966ca6143b
io.c: fix reads from uninitialized memory
2016-01-27 12:41:59 +01:00
Jan Moskyto Matejka
2fad92144e
BSD: fix no-return warning
2016-01-21 15:47:04 +01:00
Jan Moskyto Matejka
3f35816136
BSD: Explicitly dropping routes with mismatched AF's.
2016-01-21 14:55:33 +01:00
Pavel Tvrdík
259052199b
Add forgotten semicolon
2016-01-20 16:46:58 +01:00
Jan Moskyto Matejka
8109eb765f
BSD integration fixes
2016-01-20 12:05:16 +01:00
Jan Moskyto Matejka
6ffa8f5393
Hidden AF_INET* inside sysdep/
2016-01-11 09:29:51 +01:00
Ondrej Zajicek (work)
e691d16a63
Explicit ip4_addr / ip6_addr printf support
2015-12-29 17:12:47 +01:00
Jan Moskyto Matejka
9a70c8d6c3
Netlink: Removed forgotten if-stub (caused strange errors)
2015-12-29 13:02:45 +01:00
Ondrej Zajicek (work)
04632fd77f
Follow-up work on integration
2015-12-24 15:56:04 +01:00
Jan Moskyto Matejka
70b90dde23
Better fix of missing AF_INET6? definition in lib/socket.h
...
Moved the code to sysdep.
2015-12-22 09:45:09 +01:00
Ondrej Zajicek (work)
600998fcb1
Modify FIB_WALK() and FIB_ITERATE() to work with new FIB code
...
Returned user data pointers have offset relative to fib_node.
2015-12-21 20:28:44 +01:00
Ondrej Zajicek (work)
0bf95f99e6
Follow-up work on integration
...
Contains some patches from Jan Moskyto Matejka
2015-12-21 17:17:21 +01:00
Ondrej Zajicek (work)
23c212e7f1
Follow-up work on integration
2015-12-21 03:33:18 +01:00
Ondrej Zajicek (work)
d549b83fc2
Delete ipv6 option from configure
2015-12-20 19:47:36 +01:00
Ondrej Zajicek (work)
29a6416276
KRT: Integration of IPv4/IPv6 in sysdep/linux
2015-12-20 16:58:37 +01:00
Jan Moskyto Matejka
9656dce72e
ROA code switchoff
2015-12-20 13:04:07 +01:00
Jan Moskyto Matejka
d7661fbe9d
Removed BITS_PER_IP_ADDRESS, MAX_PREFIX_LENGTH, BIRD_AF
...
Explicit setting of AF_INET(6|) in IP socket creation. BFD set to listen
on v6, without setting the V6ONLY flag to catch both v4 and v6 traffic.
Squashing and minor changes by Ondrej Santiago Zajicek
2015-12-19 15:57:09 +01:00
Jan Moskyto Matejka
9b136840d9
Netlink and BSD: Integrating IPv4 and IPv6
...
Squashing and minor changes by Ondrej Santiago Zajicek
2015-12-18 20:03:47 +01:00
Ondrej Zajicek (work)
04ae8ddaa1
Merge branch 'master' into int-new
2015-11-25 14:24:35 +01:00
Jan Moskyto Matejka
ad27615760
Netlink: attribute validation before parsing
...
Wanted netlink attributes are defined in a table, specifying
their size and neediness. Removing the long conditions that did the
validation before.
Also parsing IPv4 and IPv6 versions regardless on the IPV6 macro.
2015-11-24 14:30:20 +01:00
Ondrej Zajicek (work)
1e4891e48e
Nest: Fix bug in device proto
...
If an interface address notification is received during device protocol
shutdown/restart, BIRD crashed.
Thanks to Wei Huang for the bugreport.
2015-11-23 11:13:40 +01:00
Ondrej Zajicek (work)
d44e686e9b
Follow-up commit on integrated BIRD
...
Use net_addr for interface address prefixes, support net_addr in
configuration parser.
2015-11-12 02:03:59 +01:00
Pavel Tvrdík
fce764f90e
Fix compiling with --enable-debug option
2015-11-11 11:46:38 +01:00
Jan Moskyto Matejka
9ddbfbddf8
Netlink: Allow more than 256 routing tables.
...
Since 2.6.19, the netlink API defines RTA_TABLE routing attribute to
allow 32-bit routing table IDs. Using this attribute to index routing
tables at Linux, instead of 8-bit rtm_table field.
2015-11-11 11:40:49 +01:00
Ondrej Zajicek (work)
9b9a7143c4
Conf: Fixes bug in symbol lookup during reconfiguration
...
Symbol lookup by cf_find_symbol() not only did the lookup but also added
new void symbols allocated from cfg_mem linpool, which gets broken when
lookups are done outside of config parsing, which may lead to crashes
during reconfiguration.
The patch separates lookup-only cf_find_symbol() and config-modifying
cf_get_symbol(), while the later is called only during parsing. Also
new_config and cfg_mem global variables are NULLed outside of parsing.
2015-11-09 00:42:02 +01:00
Ondrej Zajicek (work)
fe9f1a6ded
Initial commit on integrated BIRD
...
New data types net_addr and variants (in lib/net.h) describing
network addresses (prefix/pxlen). Modifications of FIB structures
to handle these data types and changing everything to use these
data types instead of prefix/pxlen pairs where possible.
The commit is WiP, some protocols are not yet updated (BGP, Kernel),
and the code contains some temporary scaffolding.
Comments are welcome.
2015-11-05 12:48:52 +01:00
Ondrej Zajicek (work)
3aed0a6ff7
IO: Fix the previous bugfix
...
I should check it after making some trivial changes. The original patch
from Alexander has it right.
2015-11-03 11:27:27 +01:00
Ondrej Zajicek (work)
338f85ca77
IO: Handle fd values too big for select()
...
If the number of sockets is too much for select(), we should at least
handle it with proper error messages and reject new sockets instead of
breaking the event loop.
Thanks to Alexander V. Chernikov for the patch.
2015-11-03 11:08:57 +01:00
Ondrej Zajicek (work)
acb04cfdc5
Minor changes
2015-10-17 14:43:37 +02:00
Ondrej Zajicek
641172c6e5
Netlink: Fixes uninitialized variable
...
Thanks to Pavel Tvrdik for the bugfix
2015-07-28 12:36:03 +02:00
Ondrej Zajicek
8d9eef1771
BGP multipath support
...
Kernel option 'merge paths' allows to merge routes exported to kernel
protocol (currently BGP and static routes) to multipath routes.
2015-06-08 02:24:08 +02:00
Ondrej Zajicek
78a2cc289f
KRT: Fixes some minor bugs in kernel protocol
2015-06-08 02:24:08 +02:00
Pavel Tvrdík
ae80a2de95
unsigned [int] -> uint
2015-06-08 02:24:08 +02:00
Pavel Tvrdík
e348ef01b4
unsgined char -> byte
2015-06-08 02:24:08 +02:00
Ondrej Zajicek
38e835dede
Fix in the last commit
2015-05-13 13:19:26 +02:00
Ondrej Zajicek
9fdf9d29b6
KRT: Add support for plenty of kernel route metrics
...
Linux kernel route metrics (RTA_METRICS netlink route attribute) are
represented and accessible as new route attributes:
krt_mtu, krt_window, krt_rtt, krt_rttvar, krt_sstresh, krt_cwnd, krt_advmss,
krt_reordering, krt_hoplimit, krt_initcwnd, krt_rto_min, krt_initrwnd,
krt_quickack, krt_lock_mtu, krt_lock_window, krt_lock_rtt, krt_lock_rttvar,
krt_lock_sstresh, krt_lock_cwnd, krt_lock_advmss, krt_lock_reordering,
krt_lock_hoplimit, krt_lock_rto_min, krt_feature_ecn, krt_feature_allfrag
2015-05-12 16:42:22 +02:00
Ondrej Zajicek
7069fc9e72
KRT: Fixes route reload
...
Did not really worked
2015-04-25 21:41:43 +02:00
Ondrej Zajicek
c5ff44a703
KRT: Fixes learning of preferred kernel routes.
...
When a new route was imported from kernel and chosen as preferred, then
the old best route was propagated as a withdraw to the kernel protocol.
Under some circumstances such withdraw propagated to the BSD kernel could
remove the new alien route and thus reverting the import.
2015-04-25 20:43:43 +02:00
Ondrej Zajicek
90097f4fb9
KRT: Support for RTM_CHANGE on BSD
2015-04-22 10:53:15 +02:00
Ondrej Zajicek
deec752ef9
NEWS and version update
2015-04-20 12:27:00 +02:00
Ondrej Zajicek
b867a87c2f
Fixes port range socket option
2015-04-19 00:31:59 +02:00
Ondrej Zajicek
304ac2e861
Minor fixes
2015-04-12 10:47:17 +02:00
Ondrej Zajicek
16a3254c4c
Understand IFF_MULTICAST flag on ifaces in Linux
...
Unfortunately, some interfaces support multicast but do not have
this flag set, so we use it only as a positive hint.
Thanks to Clint Armstrong for noticing the problem.
2015-03-31 23:59:40 +02:00
Ondrej Zajicek
9aed29e605
BGP: Enhanced route refresh (RFC 7313) support
...
Also hook feed_done is renamed to feed_end.
2015-03-29 18:29:49 +02:00
Ondrej Zajicek
af454f9b7c
Fixes bug in debug dumps
...
Using 'dump sockets' in IPv6 mode caused crash due to mismatched format string.
Thanks to Pavel Tvrdik for noticing it.
2015-03-02 09:42:44 +01:00
Ondrej Zajicek
8bcb5fb1e8
Implement latency tracking, internal event log and watchdog
2015-03-02 09:41:14 +01:00
Ondrej Zajicek
9c89560e6c
Use IP_PORTRANGE_HIGH for BFD where available
2015-02-22 20:14:14 +01:00
Ondrej Zajicek
86c3eea0f3
Use AF_UNSPEC for RTM_GETLINK
...
This value is specified in documentation.
2015-02-21 21:19:49 +01:00
Ondrej Zajicek
2bbc308321
Store protocol config size inside protocol structure
...
Make proto_config_new() use this info instead of supplied size.
Thanks to Alexander V. Chernikov for the patch.
2015-02-21 21:08:23 +01:00
Pavel Tvrdik
e598853e68
Add const to a param msg at functions log_msg, log_rl, die, bug and debug
2015-02-21 19:32:57 +01:00
Pavel Tvrdik
4a591d4b94
Replacing GNU old-style field designator extension
2015-02-21 19:31:36 +01:00
Ondrej Filip
ec2194fa7a
Version 1.5.0pre
2014-11-05 11:07:25 +01:00
Ondrej Zajicek
6f8bbaa10b
Fininshing integrated OSPF.
2014-11-03 10:42:55 +01:00
Ondrej Zajicek
88a183c6c9
Integrated IP functions.
2014-10-24 11:11:43 +02:00
Ondrej Zajicek
cfdea7b85f
NEWS and version update.
2014-10-05 23:59:18 +02:00
Ondrej Zajicek
1123e70740
Implements token bucket filter for rate limiting.
2014-10-02 12:52:50 +02:00
Ondrej Zajicek
252c7e4d0b
Refresh kernel protocol when interface disappears.
...
When an interface goes down, (Linux) kernel removes routes pointing to
that ifacem but does not send withdraws for them. We rescan the
kernel table to ensure synchronization.
Thanks to Alexander Demenshin for the bugreport.
2014-10-02 12:52:50 +02:00
Ondrej Zajicek
0479b44373
Fixes some warnings.
2014-10-02 12:52:50 +02:00
Ondrej Filip
7c00551749
Version 1.4.4.
2014-07-09 23:46:02 +02:00
Ondrej Zajicek
029ec22d0a
Fixes a bug in BSD kernel interfacing code.
...
The bug was introduced in 05476c4d04
.
2014-07-09 18:34:42 +02:00
Ondrej Zajicek
8945f73d94
Ensures that msg_controllen includes last padding.
...
Although RFC 3542 allows both cases, Theo de Raadt thinks
he knows better, and msg_controllen without last padding
fails on OpenBSD.
Thanks to Job Snijders for the bugreport.
2014-06-26 13:30:27 +02:00
Ondrej Zajicek
9eceab33f9
String constants could be used for string option values.
...
Thanks to Frederik Kriewitz for the patch.
2014-05-29 23:05:03 +02:00
Ondrej Zajicek
05476c4d04
IPv4/IPv6 integrated socket code.
2014-05-18 11:42:26 +02:00
Ondrej Zajicek
6c6ebd64c3
NEWS and version update.
2014-04-14 14:47:20 +02:00
Ondrej Zajicek
538fec7b1b
NEWS and version update.
2014-04-02 23:00:10 +02:00
Ondrej Zajicek
60442b1698
NEWS and version update.
2014-03-31 18:51:51 +02:00
Ondrej Zajicek
eb5ea6bdd6
Fixes build on some old systems.
2014-03-31 13:21:13 +02:00
Ondrej Zajicek
c980f8002e
Merge branch 'bgp-grace'
2014-03-24 12:41:43 +01:00
Ondrej Zajicek
0c791f873a
BGP graceful restart support.
...
Also significant core protocol state changes needed for that,
global graceful restart recovery state and kernel proto support
for recovery.
2014-03-20 14:07:12 +01:00
Ondrej Zajicek
3216eb03dd
Fixes longstanding issue with interfaces staying in IF_TMP_DOWN.
...
Thanks to Pierluigi Rolando and others for the bugreport.
2014-02-26 12:52:00 +01:00
Ondrej Zajicek
4e398e34bf
Workaround thread-unsafeness of cli_echo().
2014-02-07 13:09:55 +01:00
Ondrej Zajicek
48e5f32db6
Many changes in I/O and OSPF sockets and packet handling.
...
I/O:
- BSD: specify src addr on IP sockets by IP_HDRINCL
- BSD: specify src addr on UDP sockets by IP_SENDSRCADDR
- Linux: specify src addr on IP/UDP sockets by IP_PKTINFO
- IPv6: specify src addr on IP/UDP sockets by IPV6_PKTINFO
- Alternative SKF_BIND flag for binding to IP address
- Allows IP/UDP sockets without tx_hook, on these
sockets a packet is discarded when TX queue is full
- Use consistently SOL_ for socket layer values.
OSPF:
- Packet src addr is always explicitly set
- Support for secondary addresses in BSD
- Dynamic RX/TX buffers
- Fixes some minor buffer overruns
- Interface option 'tx length'
- Names for vlink pseudoifaces (vlinkX)
- Vlinks use separate socket for TX
- Vlinks do not use fixed associated iface
- Fixes TTL for direct unicast packets
- Fixes DONTROUTE for OSPF sockets
- Use ifa->ifname instead of ifa->iface->name
2014-02-06 17:46:01 +01:00
Ondrej Zajicek
283c7dfada
Merge branch 'master' into add-path
2013-11-25 18:42:47 +01:00
Ondrej Zajicek
e75520c455
NEWS and version update.
2013-11-25 13:46:29 +01:00
Ondrej Zajicek
90eb5e7a8b
Use ISO 8601 timeformats by default.
2013-11-25 13:44:07 +01:00
Ondrej Zajicek
e237b28a4d
Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.
...
Thanks to Alexander V. Chernikov for the original patch.
2013-11-25 01:21:39 +01:00
Ondrej Zajicek
65194bd1eb
Removes workaround related to import of kernel device routes.
...
Thanks to Benjamin Cama for notification.
2013-11-23 22:48:27 +01:00
Ondrej Zajicek
736e143fa5
Merge branch 'master' into add-path
...
Conflicts:
filter/filter.c
nest/proto.c
nest/rt-table.c
proto/bgp/bgp.h
proto/bgp/config.Y
2013-11-23 11:50:34 +01:00
Ondrej Zajicek
2b3d52aa42
NEWS and version update.
2013-11-23 01:56:16 +01:00
Ondrej Zajicek
56027b5cbd
Minor fix in log_commit() w.r.t. changes in BFD branch.
2013-11-22 21:58:43 +01:00
Ondrej Zajicek
0aeac9cb7f
Merge commit 'origin/bfd'
2013-11-22 02:48:44 +01:00
Ondrej Zajicek
8931425d02
Fixes problem with RIP on multiple ifaces on BSD.
...
RIP sockets for multiple ifaces collided, because we cannot bind to
a specific iface on BSD. Workarounded by SO_REUSEPORT.
Thanks to Eugene M. Zheganin for the bugreport.
2013-11-22 02:12:21 +01:00
Ondrej Zajicek
64534ea2f4
Fixes an issue when opposite address is mistaken for broadcast on ptp ifaces on BSDs.
...
Thanks to Lex van Roon for the bugreport and to Alexander V. Chernikov
for examining it and locating the problem.
2013-11-21 13:17:42 +01:00
Ondrej Zajicek
1ec522538f
BFD protocol, ready for release.
...
Supports OSPF and BGP and also statically configured sessions.
2013-11-19 22:33:48 +01:00
Ondrej Zajicek
f8cc7396cf
Forces KRT rescan on syncer startup with multi syncer config.
...
Thanks to Sergey Popovich for the patch.
2013-10-15 10:57:57 +02:00
Ondrej Filip
1cd198cf52
Flag -f "run in foreground" added as requested by a package maintainter.
2013-10-05 22:45:08 +02:00
Ondrej Zajicek
0e175f9f0f
Fixes some BFD bugs and makes logging thread-safe.
2013-10-05 20:12:28 +02:00
Ondrej Zajicek
e7c2380260
Implements PID file support.
...
Thanks to Thierry Fournier for the original patch.
2013-10-05 19:30:12 +02:00
Ondrej Zajicek
f83ce94d5e
Fixes missing unregister of kernel table handling code.
...
And some minor fixes.
Thanks to Sergey Popovich for the patch.
2013-09-26 17:33:00 +02:00
Ondrej Zajicek
f515e22924
Allows other than IA_PEER addresses on PtP ifaces on BSD.
...
Also fixes a potential problem with link-local dest_addrs
for IA_PEER addresses.
Thanks to Alexander V. Chernikov for the suggestion.
2013-09-22 19:15:39 +02:00
Ondrej Zajicek
6a8d3f1c1f
BFD work in progress.
...
Now it compiles and mostly works.
2013-09-16 23:57:40 +02:00
Ondrej Zajicek
2a0130f94d
Fixes a bug in kernel extended attribute processing.
...
The bug caused that krt_prefsrc attribute was not processed when a route
received from a kernel protocol was exported to another kernel protocol.
Thanks to Sergey Popovich for a bugreport.
2013-09-10 13:01:22 +02:00
Ondrej Zajicek
bf139664aa
Initial BFD commit, work in progress.
2013-09-10 12:09:36 +02:00
Ondrej Zajicek
643228bc1c
NEWS and version update.
2013-07-27 00:47:58 +02:00
Ondrej Zajicek
1103b32e83
Allows to define constants of all filter types.
2013-07-25 22:33:57 +02:00
Ondrej Zajicek
508d936078
Implements eval command and minor CLI cleanups.
...
Implemented eval command can be used to evaluate expressions.
The patch also documents echo command and allows to use log classes
instead of integer as a mask for echo.
2013-07-25 13:15:32 +02:00
Ondrej Zajicek
a0b176e3b2
Fixes header file name.
...
Thanks to Fritz Grimpen for the patch.
2013-07-24 14:20:46 +02:00
Ondrej Zajicek
354496ace8
Some fixes for TTL security.
2013-07-11 13:50:44 +02:00
Ondrej Zajicek
c01a94663c
Implements multiple routing table support for FreeBSD and OpenBSD.
...
Inspired by the patch from Alexander V. Chernikov.
2013-07-07 12:11:42 +02:00
Ondrej Zajicek
c6964c305b
Makes krt.c much more readable.
2013-07-04 18:02:22 +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 Zajicek
9810d05562
Fixes problems with routing table scans on some platforms.
...
Negative bit shifts are definitely undefined oprations.
2013-05-28 10:44:44 +02:00
Ondrej Zajicek
a2017200c7
NEWS and version update.
2013-04-29 22:33:50 +02:00
Ondrej Zajicek
a92cf57dd6
Implements undo command and optional timeout for configuration
...
Several new configure command variants:
configure undo - undo last reconfiguration
configure timeout - configure with scheduled undo if not confirmed in timeout
configure confirm - confirm last configuration
configure check - just parse and validate config file
2012-12-26 12:40:48 +01:00
Ondrej Zajicek
c93c02088a
NEWS and version update.
2012-11-16 13:30:54 +01:00
Ondrej Zajicek
cf98be7b67
Allows rejected routes to be kept and examined.
...
When 'import keep rejected' protocol option is activated, routes
rejected by the import filter are kept in the routing table, but they
are hidden and not propagated to other protocols. It is possible to
examine them using 'show route rejected'.
2012-11-10 14:26:13 +01:00
Ondrej Zajicek
0343d066da
Fixes a bug in primary IP selection.
2012-08-29 12:42:49 +02: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 Filip
d760229ab8
DragonFly support add - thanks to john@marino.st
2012-08-08 14:10:31 +02:00
Ondrej Zajicek
94e2f1c111
NEWS and version update.
2012-08-07 11:06:57 +02:00
Ondrej Zajicek
c06de722dd
Some minor fixes.
2012-08-06 11:09:13 +02:00
Ondrej Zajicek
c4b76d7b19
Rename sk_new() to avoid name collision with OpenSSL.
2012-07-18 19:35:30 +02:00
Ondrej Zajicek
4be266a983
Implements wildcard matching in config file include.
...
Also fixes some minor bugs in include.
Thanks Kelly Cochran for suggestion and draft patch.
2012-07-18 19:29:33 +02:00
Ondrej Zajicek
47c447c42e
Minor cleanups.
2012-05-11 12:10:21 +02:00
Ondrej Zajicek
95616c8202
Cleanup in sysdep KRT code, part 4.
...
Adding some files that was accidentally removed
(instead of moved) in cleanup part 2.
2012-05-04 16:38:25 +02:00
Ondrej Zajicek
e14bd38087
Fixes flushing of device routes.
2012-05-03 14:04:56 +02:00
Ondrej Zajicek
ab188fb76d
Implements build options to specify socket dir and suffix.
2012-05-03 12:25:15 +02:00
Ondrej Zajicek
7a2c48dafc
Cleanup in sysdep KRT code, part 3.
...
Just one more renaming, old krt_set_notify() to krt_replace_rte().
2012-04-30 22:34:06 +02:00
Ondrej Zajicek
f1aceff59b
Cleanup in sysdep KRT code, part 2.
...
Remove support for historic Linux kernels,
merge krt-iface, krt-set and krt-scan stub headers.
2012-04-30 22:25:24 +02:00
Ondrej Zajicek
396dfa9042
Cleanup in sysdep KRT code, part 1.
...
OS-dependent functions renamed to be more consistent,
prepared to merge krt-set and krt-scan headers.
Name changes:
struct krt_if_params -> struct kif_params
struct krt_if_status -> struct kif_status
struct krt_set/scan_params -> struct krt_params
struct krt_set/scan_status -> struct krt_status
krt_if_params_same -> kif_sys_reconfigure
krt_if_copy_params -> kif_sys_copy_config
krt_set/scan_params_same -> krt_sys_reconfigure
krt_set/scan_copy_params -> krt_sys_copy_config
krt_if_scan -> kif_do_scan
krt_set_notify -> krt_do_notify
krt_scan_fire -> krt_do_scan
krt_if_ -> kif_sys_
krt_scan_ -> krt_sys_
krt_set_ -> krt_sys_
2012-04-30 15:31:32 +02:00
Ondrej Zajicek
3589546af4
Merge commit 'origin/master'
2012-04-24 23:37:01 +02:00
Ondrej Zajicek
334a0ed24d
Fixes missing device attributes when exporting routes to kernel.
...
Thanks to Howden Nick for the bugreport.
2012-04-21 11:00:23 +02:00
Ondrej Filip
f93e6f338e
Small clean up in debug texts
2012-04-19 17:14:16 +02:00
Ondrej Zajicek
ebecb6f6a1
Implements generalized import hooks.
...
Thanks to Alexander V. Chernikov for the original patch.
2012-04-15 15:28:29 +02:00
Ondrej Zajicek
ae8b300164
Merge commit 'origin/master'
2012-04-15 15:15:05 +02:00
Ondrej Filip
ed7c4b0cd5
Small bugfix in error message related to reconfiguration.
2012-04-09 14:19:28 +02:00
Ondrej Zajicek
bf2abe2f51
Merge branch 'soon'
...
Conflicts:
nest/proto.c
nest/rt-table.c
2012-03-30 11:04:12 +02:00
Ondrej Zajicek
c9df01d321
Fixes several minor bugs in kernel syncer.
2012-03-25 19:44:14 +02:00
Ondrej Zajicek
9ba2798c65
Adds krt_metric linux route attribute.
2012-03-23 17:22:13 +01:00
Ondrej Zajicek
72aed1a00b
Adds krt_source route attribute.
...
Thanks Jeremie Dimino for the original patch.
2012-03-23 00:26:26 +01:00
Ondrej Zajicek
89647357af
NEWS and version update.
2012-03-22 12:29:02 +01:00
Ondrej Zajicek
df27911880
Fixes problem with dirname().
...
Thanks Henrique de Moraes Holschuh for the original patch.
2012-03-19 13:00:00 +01:00
Ondrej Zajicek
af582c4811
Route Origin Authorization basics.
...
- ROA tables, which are used as a basic part for RPKI.
- Commands for examining and modifying ROA tables.
- Filter operators based on ROA tables consistent with RFC 6483.
2012-03-18 17:32:30 +01:00
Ondrej Zajicek
46c1a583a5
Fixes a bug causing crash during soft reconfiguration of export to kernel proto.
2012-02-03 11:50:51 +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
09686693d3
Implements handling of BSD iface arrival/departure notifications.
...
Thanks to Alexander V. Chernikov for original patch.
2012-01-23 03:15:12 +01:00
Ondrej Zajicek
732a0a257d
Fixes problems with creating/removing/renaming ifaces on BSD.
2012-01-23 01:26:40 +01:00
Ondrej Zajicek
b573755df4
Fixes a bug in BSD iface scan.
...
if_update() should be called always, because periodic iface scan code
removes all not-updated ifaces.
2012-01-21 22:41:31 +01:00
Ondrej Zajicek
544f2e1b36
NEWS and version update.
2012-01-20 18:16:35 +01:00
Ondrej Filip
2c5ca47ad4
New version 1.3.5
2012-01-10 13:48:53 +01:00
root
4b3a8ff8c6
Extend buffer for netlink messages.
2012-01-09 16:57:45 +01:00
Ondrej Zajicek
d7f469c15c
Some minor fixes.
2012-01-09 02:41:13 +01:00
Ondrej Zajicek
3f58437405
Fix for IPv6 addresses on non-multiaccess ifaces on BSD.
...
Thanks Matthias Schiffer for the patch.
2012-01-08 16:32:28 +01:00
Ondrej Zajicek
eb1451a3a0
Better support for link-local addresses in IO code.
2012-01-08 15:27:04 +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
00a124e3fc
NEWS and version update.
2011-10-10 02:33:11 +02:00
Ondrej Zajicek
9b7fdfc84a
Fixes for include.
2011-10-10 01:41:08 +02:00
Ondrej Zajicek
1cb97af419
Extend the error message.
2011-10-09 17:01:01 +02:00
Ondrej Zajicek
32f95476a8
Signal problems with route installation to kernel tables.
2011-10-06 22:48:49 +02:00
Ondrej Filip
48ec367aab
Configuration can include other files.
2011-09-11 21:21:47 +02:00
Ondrej Zajicek
a98995273b
NEWS and version update.
2011-09-04 13:23:26 +02:00
Ondrej Zajicek
cb2b586f00
NetBSD compile fix.
2011-09-04 10:39:10 +02:00
Ondrej Zajicek
b1b1943360
The generalized TTL security mechanism (RFC 5082) support.
...
Thanks to Alexander V. Chernikov for the patch.
2011-08-16 23:13:05 +02:00
Ondrej Zajicek
a209d5d8e1
A minor fix in BSD.
2011-08-15 02:06:56 +02:00
Ondrej Zajicek
42a0c05408
BGP Extended communities.
2011-08-14 13:55:02 +02:00
root
aca0e79faa
Handles missing macro.
2011-07-29 14:52:28 +02:00
Ondrej Zajicek
14272097df
Fixes crash on BSD.
2011-07-28 13:50:02 +02:00
Ondrej Zajicek
c49490f8c0
NEWS and version update.
2011-07-08 08:58:50 +02:00
Ondrej Zajicek
beeda6af44
Removes timers for stub interfaces. Also fixes some minor bugs.
2011-07-08 01:14:52 +02:00
Ondrej Zajicek
e8b89a6104
Update and document the privilege restriction.
2011-05-15 16:29:44 +02:00
Ondrej Zajicek
1bc2695744
Allows run with restricted privileges.
...
Adds option -u and -g to specify user and group.
When different user (than root) is specified,
linux capabilities CAP_NET_* are kept.
2011-05-10 02:42:17 +02:00
Ondrej Zajicek
409e8a6e21
NEWS and version update.
2011-05-02 02:06:03 +02:00
Ondrej Zajicek
acc93efd4c
Use constants from /etc/iproute2/rt_* files.
2011-04-28 00:31:37 +02:00
Ondrej Zajicek
71ca77169d
Adds support for several Linux kernel route attributes.
2011-04-13 12:32:27 +02:00
Ondrej Zajicek
4aef102be1
Fixes KRT sync in BSD.
...
When buffer is too small (because of change between sysctls()),
needed is *not* changed.
2011-04-07 11:42:13 +02:00
Ondrej Zajicek
eb3786e4ea
NEWS and version update.
...
(and minor changes in documentation)
2011-03-30 02:00:56 +02:00
Ondrej Zajicek
83696b3913
Hide 6to4 route warnings.
2011-03-29 02:44:39 +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
d0e9b36d30
Added header file.
2011-03-23 17:15:11 +01:00
Ondrej Zajicek
93e868c730
Implements Router Advertisement protocol.
2011-03-13 11:33:50 +01:00
Ondrej Zajicek
d32a071da9
Some cleanups in krt_read_ifinfo().
2011-01-08 11:31:12 +01:00
Ondrej Zajicek
dad7ee70c1
Fixes interface names on BSD systems.
2011-01-08 11:22:38 +01:00
Ondrej Zajicek
32b4972834
Multipath support for linux kernel protocol.
2010-12-07 23:36:11 +01:00
Ondrej Zajicek
01427d3f2b
Remove some runaway debug messages and typos.
2010-11-19 18:03:27 +01:00
Ondrej Zajicek
f25cb0ef9f
Implements link state detection.
...
Also changes some symbol names (IFF_ADMIN_DOWN -> IFF_SHUTDOWN,
IFF_LINK_UP -> IFF_ADMIN_UP).
2010-11-11 10:03:02 +01:00
Ondrej Zajicek
0d1b3c4c0e
Changes print-like filter commands to use a log instead of a stderr.
...
And extends the log subsystem to better handle that.
2010-09-20 13:01:01 +02:00
Ondrej Zajicek
f428631cd6
Ignore warning when BGP peer is unreachable.
2010-08-03 01:12:43 +02:00
Ondrej Zajicek
f038f0a638
Fixes missing check in reconfiguration.
2010-07-12 21:39:10 +02:00
Ondrej Zajicek
9be9a26413
Implements proper multihop BGP.
...
Also does some incompatible changes to config file syntax,
like removing 'via IP' from multihop option.
2010-07-12 17:39:39 +02:00
Ondrej Zajicek
cfe34a316e
Implements hostcache and recursive next hops.
...
Hostcache is a structure for monitoring changes in a routing table that
is used for routes with dynamic/recursive next hops. This is needed for
proper iBGP next hop handling.
2010-07-05 17:50:19 +02:00
Ondrej Zajicek
acb60628f5
Implements command that shows memory usage.
2010-06-02 22:20:40 +02:00
Ondrej Zajicek
9ef239946b
NEWS and version update.
2010-05-31 20:41:40 +02:00
Ondrej Zajicek
9b061f7ea5
Minor fixes.
2010-05-28 11:16:39 +02:00
Ondrej Zajicek
691057f033
Support loopback/dummy addresses.
2010-05-26 16:09:22 +02:00
Ondrej Zajicek
87a9abeac9
Fixes interface scan on Linux 2.4.x in IPv6 mode.
2010-05-21 15:17:49 +02:00
Ondrej Zajicek
002b642318
Fixes bug on Linux 2.4.x - kernel sync does not work until restart of kernel protocol.
...
Which was, actually, a bug in timers - on older kernel, monotonic timer
is missing and the other implementation started with now == 0, which
collides with usage 0 as a special value in timer->expires field.
2010-05-21 12:00:53 +02:00
Ondrej Zajicek
475977242a
Handle EPIPE as a common connection close event.
2010-05-14 16:54:39 +02:00
Ondrej Zajicek
ba32170657
Better support for /31 networks.
2010-04-28 00:39:57 +02:00
Ondrej Zajicek
1d44ddf20f
Merge commit 'origin/master' into new
2010-04-21 21:52:10 +02:00
Ondrej Filip
6bc414d619
It seems that prefixes /31 and /127 are valid and used in this strange world.
2010-04-19 16:10:20 +02:00
Ondrej Zajicek
607d991424
Fixes build on newer Linux systems.
2010-04-14 15:35:08 +02:00
Ondrej Zajicek
dcc6049444
Fixes IPv6 build on older systems.
2010-04-14 14:46:21 +02:00
Ondrej Zajicek
d759c1a6f8
NEWS and version update.
2010-04-09 17:42:39 +02:00
Ondrej Zajicek
de14a7c7aa
Ignore routes with next-hop 127.0.0.1 on BSD.
2010-04-09 00:56:47 +02:00
Ondrej Zajicek
a9f380fe83
On BSD, consider unmarked non-device routes as alien.
2010-04-08 18:41:17 +02:00
Ondrej Zajicek
646b24d932
Minor changes.
2010-04-08 17:45:50 +02:00
Ondrej Zajicek
44d4ab7a96
Configurable syslog name.
...
Also fixes a bug in syslog initialization.
2010-04-07 15:34:45 +02:00
Ondrej Zajicek
c429d4a4ba
Restrict export of device routes to the kernel protocol.
...
In usual configuration, such export is already restricted
with the aid of the direct protocol but there are some
races that can circumvent it. This makes it harder to
break kernel device routes. Also adds an option to
disable this restriction.
2010-04-04 15:41:31 +02:00
Ondrej Zajicek
d2d2b5d2ae
Ignore some kernel messages.
2010-04-03 16:51:33 +02:00
Ondrej Zajicek
44aa101cd0
Fixes related to routes with link-local gw on BSD.
2010-04-03 11:42:18 +02:00
Ondrej Zajicek
46a82e9c2c
Fixes missing header.
2010-04-03 10:45:21 +02:00
Ondrej Zajicek
e7b09e4ab9
Use SO_BINDTODEVICE also in Linux/IPv6.
2010-04-02 16:11:46 +02:00
Ondrej Zajicek
97ab4c3498
Fixes link-local addresses on BSD.
2010-04-02 11:36:38 +02:00
Ondrej Zajicek
bed417288e
Minor fixes to previous patches.
2010-04-02 11:31:20 +02:00
Ondrej Zajicek
eb0f129fce
Merge branch 'socket2' into new
2010-03-26 18:53:31 +01:00
Ondrej Zajicek
af157fa3db
Disable multiple OSPF pseudointerfaces on BSD.
2010-03-26 14:48:01 +01:00
Ondrej Zajicek
97e46d28ff
Adds check for no protocol and some minor CLI fixes.
...
- Adds check to deny config file with no specified protocol to prevent
loading of empty config file.
- Moves CLI init before config parse to receive immediate error message
when cannot open control socket.
- Fixes socket name path check and other error handling in CLI init.
2010-03-17 12:19:22 +01:00
Ondrej Zajicek
0aad2b9292
Temporary OSPF commit - sockets.
2010-03-14 16:36:59 +01:00
Ondrej Zajicek
54305181f6
Merge branch 'new' into socket2
2010-03-11 18:55:59 +01:00
Ondrej Zajicek
afa9f66c27
Adds support for PTP links on BSD.
2010-03-10 01:04:09 +01:00
Ondrej Zajicek
53434e44a9
Better flushing of interfaces.
...
When device protocol goes down, interfaces should be flushed
asynchronously (in the same way like routes from protocols are flushed),
when protocol goes to DOWN/HUNGRY.
This fixes the problem with static routes staying in kernel routing
table after BIRD shutdown.
2010-02-27 16:00:07 +01:00
Ondrej Zajicek
ff2857b03d
Many changes in (mainly) kernel syncers.
...
- BSD kernel syncer is now self-conscious and can learn alien routes
- important bugfix in BSD kernel syncer (crash after protocol restart)
- many minor changes and bugfixes in kernel syncers and neighbor cache
- direct protocol does not generate host and link local routes
- min_scope check is removed, all routes have SCOPE_UNIVERSE by default
- also fixes some remaining compiler warnings
2010-02-26 10:55:58 +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
e0a45fb421
Restricted read-only CLI.
...
Also adds support for executing commands using birdc <cmd>.
2010-02-21 09:57:26 +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
2af25a971a
Fixes a crash caused by missing error hook on BGP listening socket.
...
Error happened when too many BGP connections arrived in one moment
(ECONNABORTED).
2010-02-11 11:12:58 +01:00
Ondrej Zajicek
353729f513
Temporary OSPF commit - socket changes.
2010-02-11 10:23:35 +01:00
Ondrej Zajicek
75f8861898
NEWS and version update.
2010-02-10 16:18:17 +01:00
Ondrej Zajicek
7d1966689f
RTF_CLONING is removed in FreeBSD 8.
2010-02-10 14:57:16 +01:00
Ondrej Zajicek
76b53a4e20
Adds some log messages related to configure.
...
Also fixes a bug in the previous patch.
2010-02-06 22:57:51 +01:00
Ondrej Zajicek
c37e78510f
Makes date/time formats configurable.
2010-02-03 00:19:24 +01:00
Ondrej Zajicek
861f223a53
BSD compatibility fix.
2010-01-06 23:20:43 +01:00
Ondrej Zajicek
0c75411bec
NEWS, version and documentation update.
2010-01-06 16:57:20 +01:00
Ondrej Zajicek
cf31112f0d
Implements MRTdump feature.
2010-01-03 12:17:52 +01:00
Ondrej Zajicek
c4199e3031
Merge branch 'dev' into ospf3
2009-12-20 22:56:09 +01:00
Ondrej Zajicek
6877ff73a6
NEWS and version update.
2009-12-19 18:45:46 +01:00
Ondrej Zajicek
63542845df
Merge branch 'dev' into ospf3
...
Conflicts:
proto/ospf/lsreq.c
proto/ospf/lsupd.c
proto/ospf/rt.c
2009-12-14 20:37:32 +01:00
Ondrej Zajicek
a6250a7d10
Fix -p option.
2009-11-26 23:23:29 +01:00
Ondrej Zajicek
6a72a276f6
New version.
2009-11-19 12:53:55 +01:00
Ondrej Zajicek
a4644ed6ab
Implement option to exit after config file parsing.
2009-11-19 11:44:17 +01:00
Ondrej Zajicek
653b4015f1
After shutdown, BIRD should have exit code 0.
2009-11-13 14:54:43 +01:00
Ondrej Zajicek
d3f36e5978
Fixes BIRD socket unlink.
2009-11-13 14:43:29 +01:00
Ondrej Zajicek
4ac7c8341c
Use IPv6 checksums in OSPFv3.
2009-11-09 23:22:53 +01:00
Ondrej Zajicek
3f22fa9e74
Merge branch 'dev' into ospf3
2009-11-09 22:54:39 +01:00
Ondrej Zajicek
9d4d38d1a5
Fixes some problems related to link-local routes in KRT interface.
2009-10-28 22:39:24 +01:00
Ondrej Zajicek
b5332824ea
New version.
2009-10-28 20:33:08 +01:00
Ondrej Zajicek
bff74c7aa3
Allows importing 'onlink' routes.
2009-10-20 19:04:28 +02:00
Ondrej Zajicek
ea89da381f
Workaround for stupid callback scheduler.
...
There is no reak callback scheduler and previous behavior causes
bad things during hard congestion (like BGP hold timeouts).
Smart callback scheduler is still missing, but main loop was
changed such that it first processes all tx callbacks (which
are fast enough) (but max 4* per socket) + rx callbacks for CLI,
and in the second phase it processes one rx callback per
socket up to four sockets (as rx callback can be slow when
there are too many protocols, because route redistribution
is done synchronously inside rx callback). If there is event
callback ready, second phase is skipped in 90% of iterations
(to speed up CLI during congestion).
2009-10-11 18:56:16 +02:00
Ondrej Zajicek
43c7a1ffa0
New version.
2009-09-30 18:48:38 +02:00
Ondrej Zajicek
aa7088fe26
Fixes one previous commit.
2009-09-30 16:34:47 +02:00
Ondrej Zajicek
2d507e64b7
Do not allow gateway routes with NULL iface.
2009-09-24 19:08:14 +02:00
Ondrej Filip
5eb4d0180e
New release 1.1.3
2009-09-11 12:20:30 +02:00
Ondrej Zajicek
be86240662
Temporary OSPFv3 development commit.
...
Finally, it is working.
2009-09-08 13:45:02 +02:00
Ondrej Zajicek
daeeb8e982
Clear memory allocated by ralloc().
...
This also fixes bug that timer->recurrent was not cleared
in tm_new() and unexpected recurrence of startup timer
in BGP confused state machine and caused crash.
2009-09-04 11:24:08 +02:00
Ondrej Zajicek
f9c799a00e
Temporary OSPFv3 development commit (changing multicast support).
2009-09-04 11:06:51 +02:00
Ondrej Zajicek
061ab802a6
Temporary OSPFv3 development commit
2009-08-27 18:25:46 +02:00
Ondrej Zajicek
b49e6f5a65
Temporary OSPFv3 development commit
2009-08-25 16:42:14 +02:00
Ondrej Filip
a0c405501f
Version 1.1.2
2009-08-23 23:04:59 +02:00
Ondrej Zajicek
86975e584e
Allow more kernel routing tables in IPv6.
2009-08-21 09:43:31 +02:00
Ondrej Zajicek
c5be5a163c
NEWS and version update.
2009-08-12 10:26:42 +02:00
Ondrej Zajicek
6baef17ecf
Fixes bug in CLI TX buffer management.
2009-07-14 14:18:54 +02:00
Ondrej Filip
f1684ae6c0
New release 1.1.0!
2009-06-28 09:43:29 +02:00
Ondrej Filip
ef86b8465f
Unused file removed.
2009-06-27 18:56:26 +02:00
Ondrej Zajicek
2d785e8d6a
Fixes bug on TCP passive socket binding on BSD.
...
BGP on BSD was bound to random port. I am surprised that
nobody noticed it already.
2009-06-26 13:33:41 +02:00
Ondrej Zajicek
5004d02cb9
Merge branch 'master' into dev
2009-06-26 01:06:12 +02:00
Ondrej Zajicek
1876e18d32
Minor bugfix.
2009-06-25 15:44:43 +02:00
Ondrej Zajicek
200ede8226
NEWS and version update.
2009-06-25 14:42:25 +02:00
Ondrej Zajicek
4323099da9
Fixes bug in scheduling of callback by main loop.
...
If other side of a socket is sending data faster than
BIRD is processing, BIRD does not schedule any other
callbacks (events, timers, rx/tx callbacks).
2009-06-20 00:59:32 +02:00
Ondrej Zajicek
bf1aec970e
Adds support for soft reconfiguration.
2009-06-19 23:49:34 +02:00
Ondrej Zajicek
789772ed45
Implements option that changes BGP listening socket parametres.
2009-06-18 19:20:07 +02:00
Ondrej Filip
dc16584ac2
Small change to make BIRD's IPv6 packaging easier
2009-06-02 00:28:08 +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
874b868544
Implements primary address selection base on 'primary' option.
2009-05-29 22:49:30 +02:00
Ondrej Zajicek
51f4469f03
Fixes problems with rewriting of kernel device routes.
2009-05-29 17:36:37 +02:00
Ondrej Zajicek
6f68f066b6
Add 'primary' configuration option.
2009-05-29 13:32:24 +02:00
Ondrej Zajicek
050ceb867f
Update versions.
2009-05-22 18:41:52 +02:00
Ondrej Zajicek
80f0d6764a
Fixes type mismatch on BSD systems.
2009-05-22 13:37:07 +02:00
Ondrej Zajicek
6c84554b67
Merge branch 'master' into dev
2009-05-21 09:26:59 +02:00
Ondrej Filip
ef9c9ab9b6
OpenBSD port related changes.
2009-05-11 01:32:49 +02:00
Ondrej Zajicek
19e10907c1
Fixes communication on netlink sockets
...
Independent sessions on netlink sockets mixed state
in some common variables.
2009-05-08 14:37:06 +02:00
Ondrej Filip
2b70f0742e
Linux specific TCP-MD5 handling moved to sysdep/linux/sysio.h
...
FreeBSD coded added. BSD cannot set BGP passwords itself.
This has to be done by external command.
2009-05-04 18:17:46 +02:00
Ondrej Filip
1bc4b2cc84
Syntax error fix for systems without CONFIG_SELF_CONSCIOUS (KRT_ALLOW_LEARN)
2009-05-04 17:49:56 +02:00
Ondrej Zajicek
11e0568f8b
NEWS and version update
2009-04-28 09:46:59 +02:00
Ondrej Zajicek
e366625c0e
Fixes mixed-up messages on netlink socket
...
Under specific circumstances there might be two mixed-up
netlink sessions (one for scan, the other for route change
request). This patch separates netlink scans and requests
to two fds (and seq counters).
This should fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428865
2009-04-17 18:43:11 +02:00
Ondrej Zajicek
4d7d0cb137
Fixes minor bug in pipe.
...
Missing macro leads to not calling some of protocol's
callbacks.
2009-03-25 18:29:17 +01:00
Ondrej Zajicek
3d574679b8
Fix bugs related to kernel table synchronization.
...
KRF_INSTALLED flag was not cleared during reconfiguration
that lead to not removing routes during reconfigure when
export rules changed.
We also should not try to remove routes we didi not installed,
on Linux this leads to warnings (as kernel checks route source
field and do not allow to remove non-bird routes) but we should
not rely on it.
2009-03-20 12:58:21 +01:00
Ondrej Zajicek
cb53039271
Rate limit for most abundant log messages
2009-02-26 14:23:54 +01:00
Ondrej Zajicek
11ec0f1a51
Fixes compilation on older systems.
...
Older kernel headers (the ones in Debian Sarge) does not
have __kernel_sockaddr_storage .
2009-01-16 12:49:51 +01:00
Ondrej Zajicek
35164c5017
rx_hook may be cleaned in some callback so we check it before
...
executing sk_read().
2008-12-12 17:48:03 +01:00
Ondrej Zajicek
35f983f889
Fixes segfault with multiple routing tables.
2008-11-21 18:17:03 +01:00
Ondrej Zajicek
eac21b46f7
This is bug, isn't it?
2008-11-21 13:01:05 +01:00
Ondrej Zajicek
fd91ae3325
Fix problem with local time changes.
2008-11-05 22:36:49 +01:00
Ondrej Zajicek
1389f3699f
Fixes bugs in IPv6 code caused by recent commits.
2008-11-05 21:39:04 +01:00
Ondrej Zajicek
6c8102e3a8
Ignore messages related to wireless extensions.
2008-11-04 14:51:45 +01:00
Ondrej Zajicek
a39b165e45
Multihop BGP was completely broken, because listening socket has always
...
ttl 1.
2008-11-01 16:58:40 +01:00
Ondrej Zajicek
a98fbf0f12
Merge branch 'dev' into out
2008-10-27 00:20:22 +01:00
Ondrej Zajicek
68fa95cfec
Check of socket name length
2008-10-26 23:55:38 +01:00
Ondrej Zajicek
4c94a6c7e7
Do not repeat 'Invalid broadcast address' error message.
...
'Invalid broadcast address' error is reported only once for
an interface and not during every interface scan.
2008-10-26 23:23:09 +01:00
Ondrej Zajicek
d7f3b30649
Ignore unknown netlink events.
...
Bird sometimes reported 'bird: nl_parse_link: Malformed message received'.
The cause is that bird asynchronously received netlink packet from
wireless driver about some wireless event on its link layer. In that
case bird shouldn't complain.
2008-10-26 23:20:50 +01:00
Ondrej Zajicek
1567edea8d
Bugfix for routing table breaking bug.
...
Here is a patch fixing a bug that causes breakage of a local routing
table during shutdown of Bird. The problem was caused by shutdown
of 'device' protocol before shutdown of 'kernel' protocol. When
'device' protocol went down, the route (with local network prefix)
From different protocol (BGP or OSPF) became preferred and installed
to the kernel routing table. Such routes were broken (like
192.168.1.0/24 via 192.168.1.2). I think it is also the cause
of problem reported by Martin Kraus.
The patch disables updating of kernel routing table during shutdown of
Bird. I am not sure whether this is the best way to fix it, I would
prefer to forbid 'kernel' protocol to overwrite routes with
'proto kernel'.
The patch also fixes a problem that during shutdown sometimes routes
created by Bird remained in the kernel routing table.
2008-10-26 23:09:46 +01:00
Ondrej Zajicek
d51aa28190
Implementation of MD5 authentication of BGP sessions.
2008-10-26 22:42:39 +01:00
Ondrej Filip
97c6fa02e0
Previous patch reverted. :-(
2008-08-25 12:06:20 +00:00
Ondrej Filip
030e3a79cb
Buffer overflow fix.
2008-08-25 11:57:46 +00:00
Martin Mares
057021df0d
Fix behavior of ipa_opposite().
...
It was giving wrong results on /30 networks.
2008-08-25 11:19:49 +00:00
Ondrej Filip
3c3271d9fc
Close fd of config file after reconfiguration.
2008-08-24 23:24:14 +00:00
Martin Mares
8411a37e7d
Detach from the TTY properly.
2007-06-20 07:33:26 +00:00
Ondrej Filip
c81b4ec361
Yes, we will go for 1.0.12
2005-03-16 16:08:40 +00:00
Ondrej Filip
028a4cfc02
Let's go for 1.0.11.
2005-02-20 04:28:55 +00:00
Ondrej Filip
c025b85273
Real write is only in sk_maybe_write. Previous change partially reverted.
...
Thank you MJ.
2005-02-14 23:15:04 +00:00
Ondrej Filip
7c49f71559
Added s->err_hook wrapper that empties socket.
2005-02-14 21:28:51 +00:00
Ondrej Filip
030d3b387e
Small changed to reduce the number of warnings.
2005-02-14 11:58:46 +00:00
Ondrej Filip
75c1c58519
Yes, I'd like to go to 1.0.10
2005-02-14 11:37:40 +00:00
Ondrej Filip
0d3effcf8c
Time added in password management.
2005-02-12 22:27:55 +00:00
Ondrej Filip
777acf91bb
Everything is tested and works. I thins it's right time to go to 1.0.9.
2004-07-14 21:47:39 +00:00
Ondrej Filip
09e4117cc1
sk_write bugfix for BSD.
2004-06-18 12:54:53 +00:00
Ondrej Filip
b7e9c74cba
Used parameter can be marked as unused. :-) Thanx MJ.
2004-06-07 16:51:23 +00:00
Ondrej Filip
282997f21e
Some new warnings eliminated.
2004-06-07 10:00:29 +00:00
Ondrej Filip
19d9e30336
Marked unused parameters as unused.
2004-06-07 09:52:15 +00:00
Ondrej Filip
fb257e43fc
Deleted some unused code.
2004-06-07 09:09:14 +00:00
Ondrej Filip
41c8976e29
Test old instance of BIRD.
2004-06-06 17:05:25 +00:00
Martin Mares
9831e5916f
Staticized lots of local functions.
2004-06-05 09:58:23 +00:00
Martin Mares
6578a60493
Marked unused parameters in sysdep code as such.
2004-06-05 09:11:07 +00:00
Martin Mares
e98bc2ea9b
Renamed log() to log_msg(), but still keeping the old name as a macro.
...
This is done to avoid clashes with gcc-3.3 which has built-in logarithms :)
2004-06-05 09:05:12 +00:00
Martin Mares
4da25acb0a
Cleaned up sk_reallocate() and friends.
...
Also, removed the `if (s)' test, because I believe that as the whole
socket interface doesn't accent NULL pointers, sk_reallocate() shouldn't
be the only exception.
2004-06-05 08:56:43 +00:00
Ondrej Filip
e7ef86a58c
OSPF is ready for changing MTU.
2004-06-04 18:51:29 +00:00
Ondrej Filip
85305e5d8f
typo in README
2004-06-04 17:32:38 +00:00
Ondrej Filip
7d72aadb8a
CONFIG_SKIP_MC_BIND added.
...
BSD hates it, Linux needs it.
2004-06-03 08:18:14 +00:00
Ondrej Filip
cb4dd4e2f7
Deleted useless rfree. (Socked was freed by cli_free())
2004-06-02 15:14:49 +00:00
Ondrej Filip
7048461df1
Code clean up.
2004-06-01 13:58:39 +00:00
Ondrej Filip
8281ff201e
Reverting last patch.
2004-06-01 12:57:13 +00:00
Ondrej Filip
77772dbc65
Caching loopback interface.
2004-06-01 10:55:10 +00:00
Ondrej Filip
a8bb459a3f
log->DBG
2004-06-01 10:53:30 +00:00
Ondrej Filip
1554cc0282
Minor changes caused by MJ's comment.
2004-06-01 10:45:28 +00:00
Ondrej Filip
b613b9928b
#ifdef CONFIG_UNIX_DONTROUTE added.
2004-06-01 10:32:02 +00:00
Ondrej Filip
402a9fa78a
Useles log()s deleted.
2004-06-01 09:10:11 +00:00
Ondrej Filip
e85bd57a0e
bzero has 2 arguments.
2004-06-01 09:07:16 +00:00
Ondrej Filip
b88a1d4040
memset -> bzero
2004-06-01 08:59:47 +00:00
Martin Mares
ea0ac8f69a
Move CLI socket to the newly created CLI's pool.
...
(thanks to Andreas for the original idea)
2004-05-31 22:00:18 +00:00
Martin Mares
38a608c55a
Rewritten the I/O loop. All socket operations are now safe, meaning that
...
you can delete the socket from anywhere in the hooks and nothing should break.
Also, the receive/transmit buffers are now regular xmalloc()'ed buffers,
not separate resources which would need shuffling around between pools.
sk_close() is gone, use rfree() instead.
2004-05-31 21:48:19 +00:00
Martin Mares
5f2a6a9ff3
Fix handling on full pipe to client in bird. Prevent packet overflows
...
for even only medium sized route table output. Fix a strange garbled
output problem in the client. The latter seems to be caused by some
library doing tcflush while there is still command output pending. So
the best fix here is to do fflush and then tcdrain. Note that this
problem occurs only under certain load situations and is not too easy to
reproduce.
(by Andreas)
2004-05-31 17:55:30 +00:00
Ondrej Filip
c222500d8e
Previous change was mistake.
2004-05-31 17:00:22 +00:00
Ondrej Filip
b1a1fabac7
*BSD port added. (Tested on FreeBSD and NetBSD)
2004-05-31 13:25:00 +00:00
Ondrej Filip
bf135bcb1f
Prepared for release 1.0.8.
2003-09-01 08:46:07 +00:00
Martin Mares
c197d44e17
This probably IS the memory leak we're looking for. Alien routes weren't
...
correctly disposed of.
2003-08-13 22:07:55 +00:00
Martin Mares
f240a133b3
Releasing version 1.0.6.
2003-04-06 19:42:28 +00:00
Martin Mares
abf06173a3
Current Linux kernels don't remember rtm_protocol for IPv6 routes and supply RTPROT_BOOT instead.
...
Work around that.
2003-02-22 23:06:32 +00:00
Martin Mares
8001948b43
Report link-scope addresses as well.
2003-02-22 22:38:15 +00:00
Martin Mares
7d875e094b
Added missing includes.
2002-11-13 08:47:06 +00:00
Martin Mares
a19cd81100
Added missing #include and wondering how could it ever compile.
2002-11-13 08:30:56 +00:00
Martin Mares
5fc7c5c513
Don't loop forever when trying to skip an out-sequence netlink reply.
2001-08-03 08:44:51 +00:00
Ondrej Filip
c48b33292b
Yes, 1.0.5 released.
2001-06-09 15:13:38 +00:00
Martin Mares
01b776e117
Fixed <time.h> vs. <sys/time.h> problems.
2001-03-06 13:40:39 +00:00
Ondrej Filip
fdb1998202
Serious bug in ext lsa origination found. Going for 1.0.4.
2000-09-03 22:18:40 +00:00
Ondrej Filip
19e930a9bb
Version 1.0.3 released.
2000-09-03 17:53:12 +00:00
Ondrej Filip
a24e315762
Released as version 1.0.2.
2000-08-23 06:51:26 +00:00
Martin Mares
fc12a680b1
Released as version 1.0.1.
2000-06-21 22:08:46 +00:00
Martin Mares
2836ce3951
Check broadcast address sanity before believing it.
2000-06-21 09:58:09 +00:00
Martin Mares
f9eb8f7e06
If compiled with --enable-debug, don't even try to log to syslog unless
...
the user forces it in the config file.
2000-06-19 23:50:02 +00:00
Martin Mares
ca00d4a13a
Fix numbering of routing tables in IPv6 version.
2000-06-18 19:49:32 +00:00
Martin Mares
4daf03e513
Use our own SUN_LEN if libc doesn't provide it.
2000-06-16 23:12:47 +00:00
Martin Mares
5ddf4a58f9
During initialization, log to both syslog and stderr. When a configuration
...
file has been read and it doesn't specify any logging, log to syslog only
(if syslog is not available, then stderr).
2000-06-09 07:32:57 +00:00
Martin Mares
0b3bf4b1d8
Use SUN_LEN() for length of UNIX domain addresses. This should fix problems
...
with connection to clients on libc5 machines.
2000-06-09 07:30:22 +00:00
Martin Mares
2d176ac5d2
Released as 1.0.0, but marked it as a BETA version.
2000-06-09 06:45:48 +00:00
Martin Mares
725270cb1d
Fixes for the programmer's manual.
2000-06-08 12:37:21 +00:00
Martin Mares
c62d1c19a9
... as well there.
2000-06-08 10:48:51 +00:00
Martin Mares
ec423cc725
Updated CLI helps.
2000-06-08 10:25:02 +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
Martin Mares
73275d855d
Documented all the sysdeps (only briefly, I admit).
...
Except for Filters, RIP and OSPF, the progdocs are complete.
2000-06-05 12:49:04 +00:00
Martin Mares
525fa2c1f0
Documented sockets, events and timers.
2000-06-05 12:19:12 +00:00
Martin Mares
10304bed43
Split random number functions off io.c, so that they can be documented
...
separately.
2000-06-05 11:46:40 +00:00
Martin Mares
df49d4e14b
Removed lots of trailing newlines in log messages.
...
Please note that the only calls which don't add newlines automatically
(i.e., don't print a full line of output) are debug() and DBG().
2000-06-04 19:56:06 +00:00
Martin Mares
b594ad2386
tm_format_reltime() works with both past and future timestamps.
2000-06-01 15:13:23 +00:00
Martin Mares
4a91150175
Updated for new scope handling.
...
Also, provide proper address scopes in struct ifa.
2000-06-01 12:58:41 +00:00
Martin Mares
2f5e5ff9d6
Before configuration file is read, log to _both_ syslog and stderr.
2000-05-31 22:28:36 +00:00
Martin Mares
fcb5f4a725
Updated all the Doc files to new format.
2000-05-31 11:30:18 +00:00
Martin Mares
4761efdb43
Tracing of CLI connections/commands can be now controlled
...
by `debug commands <level>' in the configuration. Level 0 means
no tracing, 1 means connections only, 2 includes all commands.
2000-05-29 22:10:18 +00:00
Martin Mares
e67af42805
Support --version and --help.
2000-05-29 21:58:35 +00:00
Martin Mares
f990fc61e0
When in persist mode, don't delete routes from kernel tables even if
...
they cease to exist in our routing tables due to protocols having shut down.
2000-05-16 13:36:38 +00:00
Martin Mares
02bd064ab7
Adapted to new rt_notify semantics.
2000-05-13 11:02:02 +00:00
Martin Mares
0e5aa966cc
Multicast problems should be gone, although the fix is Linux only and we'll
...
need to figure out something better when working on new ports.
2000-05-11 16:30:56 +00:00
Martin Mares
109c2f6cf3
If a broadcast address is missing, go fake one.
2000-05-11 12:30:06 +00:00
Martin Mares
5ff0a270cb
In non-debug mode, set default logging to syslog only, not stderr.
2000-05-08 22:31:58 +00:00
Martin Mares
4524331a3d
Fixed type in daemonization code.
2000-05-08 22:31:34 +00:00
Martin Mares
0bcba21e89
When not debugging, daemonize automatically.
2000-05-08 19:10:36 +00:00
Martin Mares
cd44b46651
Forgot to add a spiky comment :)
2000-05-08 14:24:19 +00:00
Martin Mares
f9254d2349
Autoconf is *evil*. The sysconfdir and similar variables are unusable in
...
C includes as they contain substitutions specific to make.
Worked around by creating sysconf/paths.h which is created from
the Makefile instead of by the configure script.
2000-05-08 14:19:47 +00:00
Martin Mares
818ff1e2b7
When reporting a bug(), call abort() instead of exit(), so that we
...
can analyse the core.
2000-05-08 12:38:00 +00:00
Martin Mares
c304392e65
Some less socket error messages.
2000-05-08 12:37:39 +00:00
Martin Mares
9cbf43eb8a
Don't report refused connections.
2000-05-08 12:09:10 +00:00
Martin Mares
b6c9d8eb2e
Removed the `async' switch which was used for debugging only anyway.
...
Don't moan when netlink reports lost packets.
2000-05-08 12:05:55 +00:00
Martin Mares
94e935d8a2
Incoming buffer must be at least 8KB long.
2000-05-08 11:02:53 +00:00
Martin Mares
916c8c0aba
Use preferences properly.
2000-05-08 10:40:00 +00:00
Martin Mares
1151401e2b
Don't crash when reporting deleted routes.
...
Set preferences correctly.
2000-05-08 10:38:51 +00:00
Martin Mares
84f0700205
IPv6 support compiles on both glibc 2.0 and 2.1.
2000-05-06 21:46:09 +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
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
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
e1ddd99377
Changed handling of incoming connections, so that we can send data
...
from the send hook without worrying about existence of socket buffers.
Also, don't forget to copy peer addresses.
2000-04-26 13:26:11 +00:00
Martin Mares
0cadd5f531
Removed several FIXME's.
2000-04-26 12:33:37 +00:00
Martin Mares
00c0c18aea
Allow sk_close(NULL).
2000-04-25 23:07:47 +00:00
Martin Mares
f380aa60fa
IPv6 compiles with glibc 2.1.
2000-04-20 23:05:41 +00:00
Martin Mares
f2cb1d708d
Dropped CPU_NEEDS_ALIGN_* as unaligned.h no longer uses them.
2000-04-10 12:38:15 +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
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
Martin Mares
320f417357
Defined sk_close() which closes the socket safely even if called from
...
socket hook. Replaces the SK_DELETED hack.
Squashed a couple of bugs in handling of TCP sockets.
2000-03-30 10:43:37 +00:00
Martin Mares
1cf716f075
Handle EINPROGRESS properly.
...
Set IP_DONTROUTE sockopt only if sk->ttl == 1.
2000-03-20 21:49:21 +00:00
Martin Mares
f098e072be
Fixed a bunch of FIXME's by removing them :)
2000-03-12 22:53:05 +00:00
Martin Mares
7a88832e78
Added tm_format_datetime().
2000-03-12 22:43:13 +00:00
Martin Mares
a92bebe0ec
Yet another LOCAL_DEBUG turned off.
2000-03-12 21:58:51 +00:00
Martin Mares
832fa033b7
Cleaned up debugging in kernel syncer. Netlink has still LOCAL_DEBUG
...
turned on, but after some testing I'll gag it.
2000-03-12 21:54:39 +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
c801e1fbab
Renamed command shutdown' to
down', so that `s' can be used as an
...
abbreviation for `show'.
2000-03-07 20:09:35 +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
d07bab3997
ipa_opposite hack is not applicable in IPv6.
2000-03-01 11:29:30 +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
9fac310d1a
Put client on a stony ground. The whole client is going to be system-specific
...
(the current version UNIX-specific) anyway, so it's useless to try splitting it
to sysdep and generic part. Instead of this, configure script decides (based on
system type and user's wish) what (if any) client should be built and what
autoconfiguration it requires. Also, the client provides its own die/bug/...
functions.
2000-01-19 15:07:00 +00:00