Commit graph

78 commits

Author SHA1 Message Date
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
Ondrej Zajicek (work)
62e64905b7 Several minor fixes 2017-02-20 02:26:45 +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)
8860e991f6 Merge branch 'master' into int-new 2016-11-08 19:27:58 +01:00
Ondrej Zajicek (work)
cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +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
Jan Moskyto Matejka
ccd2a3eda2 Kernel socket missing err_hook fix
Thanks to Tim Weippert for bugreport.
2016-09-29 13:21: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
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
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