Statistics
| Branch: | Revision:

iof-bird-daemon / sysdep / linux @ c8cafc8e

# Date Author Comment
c8cafc8e 11/08/2016 04:46 PM Ondrej Zajicek (work)

Minor code cleanups

3e236955 11/01/2016 01:52 PM Jan Moskyto Matejka

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.

ccd2a3ed 09/29/2016 11:21 AM Jan Moskyto Matejka

Kernel socket missing err_hook fix

Thanks to Tim Weippert for bugreport.

6e75d0d2 09/19/2016 10:29 AM Ondrej Zajicek (work)

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...

4adcb9df 09/15/2016 12:59 PM Ondrej Zajicek (work)

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...

2feaa693 09/14/2016 09:53 AM Ondrej Zajicek (work)

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....

f9f2e280 08/30/2016 10:43 AM Ondrej Zajicek (work)

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.

a08a81c6 07/20/2016 01:31 PM Ondrej Zajicek (work)

Netlink: Fix build with older headers missing IFA_FLAGS

e37d2e3e 07/20/2016 01:06 PM Ondrej Zajicek (work)

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....

31e9e101 05/10/2016 02:05 PM Stijn Tintel

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 <>

a7baa098 04/13/2016 12:37 PM Ondrej Zajicek (work)

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.

e86cfd41 04/06/2016 09:46 AM Ondrej Zajicek (work)

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...

ad276157 11/24/2015 01:30 PM Jan Moskyto Matejka

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.

1e4891e4 11/23/2015 10:13 AM Ondrej Zajicek (work)

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.

fce764f9 11/11/2015 10:46 AM Pavel Tvrdík

Fix compiling with --enable-debug option

9ddbfbdd 11/11/2015 10:40 AM Jan Moskyto Matejka

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.

acb04cfd 10/17/2015 12:43 PM Ondrej Zajicek (work)

Minor changes

641172c6 07/28/2015 10:36 AM Ondrej Zajicek

Netlink: Fixes uninitialized variable

Thanks to Pavel Tvrdik for the bugfix

78a2cc28 06/08/2015 12:24 AM Ondrej Zajicek

KRT: Fixes some minor bugs in kernel protocol

ae80a2de 06/08/2015 12:24 AM Pavel Tvrdík

unsigned [int] -> uint

38e835de 05/13/2015 11:19 AM Ondrej Zajicek

Fix in the last commit

9fdf9d29 05/12/2015 02:42 PM Ondrej Zajicek

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,...

16a3254c 03/31/2015 09:59 PM Ondrej Zajicek

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.

86c3eea0 02/21/2015 08:19 PM Ondrej Zajicek

Use AF_UNSPEC for RTM_GETLINK

This value is specified in documentation.

1123e707 10/02/2014 10:52 AM Ondrej Zajicek

Implements token bucket filter for rate limiting.

8945f73d 06/26/2014 11:30 AM Ondrej Zajicek

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.

05476c4d 05/18/2014 09:42 AM Ondrej Zajicek

IPv4/IPv6 integrated socket code.

eb5ea6bd 03/31/2014 11:21 AM Ondrej Zajicek

Fixes build on some old systems.

3216eb03 02/26/2014 11:52 AM Ondrej Zajicek

Fixes longstanding issue with interfaces staying in IF_TMP_DOWN.

Thanks to Pierluigi Rolando and others for the bugreport.

48e5f32d 02/06/2014 04:46 PM Ondrej Zajicek

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...

283c7dfa 11/25/2013 05:42 PM Ondrej Zajicek

Merge branch 'master' into add-path

e237b28a 11/25/2013 12:21 AM Ondrej Zajicek

Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.

Thanks to Alexander V. Chernikov for the original patch.

65194bd1 11/23/2013 09:48 PM Ondrej Zajicek

Removes workaround related to import of kernel device routes.

Thanks to Benjamin Cama for notification.

736e143f 11/23/2013 10:50 AM Ondrej Zajicek

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
f83ce94d 09/26/2013 03:33 PM Ondrej Zajicek

Fixes missing unregister of kernel table handling code.

And some minor fixes.

Thanks to Sergey Popovich for the patch.

c6964c30 07/04/2013 04:02 PM Ondrej Zajicek

Makes krt.c much more readable.

70e212f9 06/25/2013 01:39 PM Ondrej Zajicek

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.

ef4a50be 06/24/2013 02:37 PM Ondrej Zajicek

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.

9810d055 05/28/2013 08:44 AM Ondrej Zajicek

Fixes problems with routing table scans on some platforms.

Negative bit shifts are definitely undefined oprations.

094d2bdb 08/14/2012 02:46 PM Ondrej Zajicek

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.

c06de722 08/06/2012 09:09 AM Ondrej Zajicek

Some minor fixes.

47c447c4 05/11/2012 10:10 AM Ondrej Zajicek

Minor cleanups.

95616c82 05/04/2012 02:38 PM Ondrej Zajicek

Cleanup in sysdep KRT code, part 4.

Adding some files that was accidentally removed
(instead of moved) in cleanup part 2.

f1aceff5 04/30/2012 08:25 PM Ondrej Zajicek

Cleanup in sysdep KRT code, part 2.

Remove support for historic Linux kernels,
merge krt-iface, krt-set and krt-scan stub headers.

396dfa90 04/30/2012 01:31 PM Ondrej Zajicek

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...

3589546a 04/24/2012 09:37 PM Ondrej Zajicek

Merge commit 'origin/master'

334a0ed2 04/21/2012 09:00 AM Ondrej Zajicek

Fixes missing device attributes when exporting routes to kernel.

Thanks to Howden Nick for the bugreport.

f93e6f33 04/19/2012 03:14 PM Ondrej Filip

Small clean up in debug texts

c9df01d3 03/25/2012 05:44 PM Ondrej Zajicek

Fixes several minor bugs in kernel syncer.

9ba2798c 03/23/2012 04:22 PM Ondrej Zajicek

Adds krt_metric linux route attribute.

732a0a25 01/23/2012 12:26 AM Ondrej Zajicek

Fixes problems with creating/removing/renaming ifaces on BSD.

4b3a8ff8 01/09/2012 03:57 PM root

Extend buffer for netlink messages.

a7f23f58 11/06/2011 11:31 PM Ondrej Zajicek

Implements protocol templates.

Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.

32f95476 10/06/2011 08:48 PM Ondrej Zajicek

Signal problems with route installation to kernel tables.

b1b19433 08/16/2011 09:13 PM Ondrej Zajicek

The generalized TTL security mechanism (RFC 5082) support.

Thanks to Alexander V. Chernikov for the patch.

aca0e79f 07/29/2011 12:52 PM root

Handles missing macro.

e8b89a61 05/15/2011 02:29 PM Ondrej Zajicek

Update and document the privilege restriction.

1bc26957 05/10/2011 12:42 AM Ondrej Zajicek

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.

71ca7716 04/13/2011 10:32 AM Ondrej Zajicek

Adds support for several Linux kernel route attributes.

83696b39 03/29/2011 12:44 AM Ondrej Zajicek

Hide 6to4 route warnings.

52a43ae3 03/28/2011 08:46 PM Ondrej Zajicek

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.

32b49728 12/07/2010 10:36 PM Ondrej Zajicek

Multipath support for linux kernel protocol.

01427d3f 11/19/2010 05:03 PM Ondrej Zajicek

Remove some runaway debug messages and typos.

f25cb0ef 11/11/2010 09:03 AM Ondrej Zajicek

Implements link state detection.

Also changes some symbol names (IFF_ADMIN_DOWN -> IFF_SHUTDOWN,
IFF_LINK_UP -> IFF_ADMIN_UP).

cfe34a31 07/05/2010 03:50 PM Ondrej Zajicek

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.

691057f0 05/26/2010 02:09 PM Ondrej Zajicek

Support loopback/dummy addresses.

87a9abea 05/21/2010 01:17 PM Ondrej Zajicek

Fixes interface scan on Linux 2.4.x in IPv6 mode.

ba321706 04/27/2010 10:39 PM Ondrej Zajicek

Better support for /31 networks.

6bc414d6 04/19/2010 02:10 PM Ondrej Filip

It seems that prefixes /31 and /127 are valid and used in this strange world.

646b24d9 04/08/2010 03:45 PM Ondrej Zajicek

Minor changes.

c429d4a4 04/04/2010 01:41 PM Ondrej Zajicek

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...

e7b09e4a 04/02/2010 02:11 PM Ondrej Zajicek

Use SO_BINDTODEVICE also in Linux/IPv6.

bed41728 04/02/2010 09:31 AM Ondrej Zajicek

Minor fixes to previous patches.

0aad2b92 03/14/2010 03:36 PM Ondrej Zajicek

Temporary OSPF commit - sockets.

54305181 03/11/2010 05:55 PM Ondrej Zajicek

Merge branch 'new' into socket2

ff2857b0 02/26/2010 09:55 AM Ondrej Zajicek

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...

e81b440f 02/21/2010 01:34 PM Ondrej Zajicek

Fix configure to enable warnings and fix most of them.

353729f5 02/11/2010 09:23 AM Ondrej Zajicek

Temporary OSPF commit - socket changes.

3f22fa9e 11/09/2009 09:54 PM Ondrej Zajicek

Merge branch 'dev' into ospf3

9d4d38d1 10/28/2009 09:39 PM Ondrej Zajicek

Fixes some problems related to link-local routes in KRT interface.

bff74c7a 10/20/2009 05:04 PM Ondrej Zajicek

Allows importing 'onlink' routes.

aa7088fe 09/30/2009 02:34 PM Ondrej Zajicek

Fixes one previous commit.

2d507e64 09/24/2009 05:08 PM Ondrej Zajicek

Do not allow gateway routes with NULL iface.

be862406 09/08/2009 11:45 AM Ondrej Zajicek

Temporary OSPFv3 development commit.

Finally, it is working.

f9c799a0 09/04/2009 09:06 AM Ondrej Zajicek

Temporary OSPFv3 development commit (changing multicast support).

b49e6f5a 08/25/2009 02:42 PM Ondrej Zajicek

Temporary OSPFv3 development commit

86975e58 08/21/2009 07:43 AM Ondrej Zajicek

Allow more kernel routing tables in IPv6.

51f4469f 05/29/2009 03:36 PM Ondrej Zajicek

Fixes problems with rewriting of kernel device routes.

6c84554b 05/21/2009 07:26 AM Ondrej Zajicek

Merge branch 'master' into dev

19e10907 05/08/2009 12:37 PM Ondrej Zajicek

Fixes communication on netlink sockets

Independent sessions on netlink sockets mixed state
in some common variables.

2b70f074 05/04/2009 04:17 PM Ondrej Filip

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.

e366625c 04/17/2009 04:43 PM Ondrej Zajicek

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

cb530392 02/26/2009 01:23 PM Ondrej Zajicek

Rate limit for most abundant log messages

11ec0f1a 01/16/2009 11:49 AM Ondrej Zajicek

Fixes compilation on older systems.

Older kernel headers (the ones in Debian Sarge) does not
have __kernel_sockaddr_storage .

6c8102e3 11/04/2008 01:51 PM Ondrej Zajicek

Ignore messages related to wireless extensions.

a98fbf0f 10/26/2008 11:20 PM Ondrej Zajicek

Merge branch 'dev' into out

4c94a6c7 10/26/2008 10:23 PM Ondrej Zajicek

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.

d7f3b306 10/26/2008 10:20 PM Ondrej Zajicek

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.

1567edea 10/26/2008 10:09 PM Ondrej Zajicek

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)...

d51aa281 10/26/2008 09:42 PM Ondrej Zajicek

Implementation of MD5 authentication of BGP sessions.