Commit graph

67 commits

Author SHA1 Message Date
Jan Moskyto Matejka
7a7ac65682 Merge branch 'master' into int-new-channels 2016-04-08 12:28:33 +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
ade389b326 BSD: compilation error fix 2016-02-01 10:28:50 +01:00
Jan Moskyto Matejka
3f35816136 BSD: Explicitly dropping routes with mismatched AF's. 2016-01-21 14:55:33 +01:00
Jan Moskyto Matejka
8109eb765f BSD integration fixes 2016-01-20 12:05:16 +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
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
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
Pavel Tvrdík
ae80a2de95 unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
Ondrej Zajicek
90097f4fb9 KRT: Support for RTM_CHANGE on BSD 2015-04-22 10:53:15 +02:00
Ondrej Zajicek
304ac2e861 Minor fixes 2015-04-12 10:47:17 +02:00
Ondrej Zajicek
88a183c6c9 Integrated IP functions. 2014-10-24 11:11:43 +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
05476c4d04 IPv4/IPv6 integrated socket code. 2014-05-18 11:42:26 +02: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
283c7dfada Merge branch 'master' into add-path 2013-11-25 18:42:47 +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
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
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
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
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
094d2bdb79 Implements ADD-PATH extension for BGP.
Allows to send and receive multiple routes for one network by one BGP
session. Also contains necessary core changes to support this (routing
tables accepting several routes for one network from one protocol).
It needs some more cleanup before merging to the master branch.
2012-08-14 16:46:43 +02:00
Ondrej Zajicek
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
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
c9df01d321 Fixes several minor bugs in kernel syncer. 2012-03-25 19:44:14 +02: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
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
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
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 Zajicek
a209d5d8e1 A minor fix in BSD. 2011-08-15 02:06:56 +02:00
Ondrej Zajicek
14272097df Fixes crash on BSD. 2011-07-28 13:50:02 +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
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
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
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
9b061f7ea5 Minor fixes. 2010-05-28 11:16:39 +02:00
Ondrej Zajicek
ba32170657 Better support for /31 networks. 2010-04-28 00:39:57 +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
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