Commit graph

108 commits

Author SHA1 Message Date
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
71ca77169d Adds support for several Linux kernel route attributes. 2011-04-13 12:32:27 +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
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
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
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
ba32170657 Better support for /31 networks. 2010-04-28 00:39:57 +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
646b24d932 Minor changes. 2010-04-08 17:45:50 +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
e7b09e4ab9 Use SO_BINDTODEVICE also in Linux/IPv6. 2010-04-02 16:11:46 +02:00
Ondrej Zajicek
bed417288e Minor fixes to previous patches. 2010-04-02 11:31:20 +02: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
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
353729f513 Temporary OSPF commit - socket changes. 2010-02-11 10:23:35 +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
bff74c7aa3 Allows importing 'onlink' routes. 2009-10-20 19:04:28 +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 Zajicek
be86240662 Temporary OSPFv3 development commit.
Finally, it is working.
2009-09-08 13:45:02 +02:00
Ondrej Zajicek
f9c799a00e Temporary OSPFv3 development commit (changing multicast support). 2009-09-04 11:06:51 +02:00
Ondrej Zajicek
b49e6f5a65 Temporary OSPFv3 development commit 2009-08-25 16:42:14 +02:00
Ondrej Zajicek
86975e584e Allow more kernel routing tables in IPv6. 2009-08-21 09:43:31 +02:00
Ondrej Zajicek
51f4469f03 Fixes problems with rewriting of kernel device routes. 2009-05-29 17:36:37 +02:00
Ondrej Zajicek
6c84554b67 Merge branch 'master' into dev 2009-05-21 09:26:59 +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 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
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
6c8102e3a8 Ignore messages related to wireless extensions. 2008-11-04 14:51:45 +01:00
Ondrej Zajicek
a98fbf0f12 Merge branch 'dev' into out 2008-10-27 00:20:22 +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
Martin Mares
057021df0d Fix behavior of ipa_opposite().
It was giving wrong results on /30 networks.
2008-08-25 11:19:49 +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
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
5fc7c5c513 Don't loop forever when trying to skip an out-sequence netlink reply. 2001-08-03 08:44:51 +00:00
Martin Mares
2836ce3951 Check broadcast address sanity before believing it. 2000-06-21 09:58:09 +00:00