Commit graph

1280 commits

Author SHA1 Message Date
Ondrej Zajicek (work)
d3f4f92b0e OSPF: Support of address families in OSPFv3
OSPFv3-AF can handle multiple topologies of diferent address families
(IPv4, IPv6, both unicast and multicast) using separate instances
distinguished by instance ID ranges.
2017-10-10 16:10:02 +02:00
Ondrej Zajicek (work)
69f7399247 Merge branch 'master' into int-new 2017-08-09 12:46:27 +02:00
Ondrej Zajicek (work)
b3fae3a817 RAdv: Fix typo 2017-08-09 12:41:44 +02:00
Michal 'vorner' Vaner
1f182675c8 RAdv: Style updates
Adapt the naming conventions to be a bit closer to the other protocols.

proto_radv -> radv_proto
struct radv_proto *ra -> struct radv_proto *p
struct proto *p -> struct proto *P
2017-08-09 12:38:20 +02:00
Michal 'vorner' Vaner
5a41eed26d RAdv: Style updates
Adapt the naming conventions to be a bit closer to the other protocols.

proto_radv -> radv_proto
struct radv_proto *ra -> struct radv_proto *p
struct proto *p -> struct proto *P
2017-08-09 12:22:15 +02:00
Michal 'vorner' Vaner
637ed49868 radv: Fix RFC reference in comments 2017-08-09 11:59:36 +02:00
Michal 'vorner' Vaner
afd9845e26
radv: Fix RFC reference in comments 2017-08-04 10:52:57 +02:00
Ondrej Zajicek (work)
a1f5e514ef Implement onlink flag for nexthops
Add proper support for per-nexthop onlink flag in routes to handle next
hop addresses that are not covered by interface IP ranges. Supported by
kernel and static protocols.

Thanks to Vincent Bernat for the idea.
2017-07-04 23:36:21 +02:00
Ondrej Zajicek (work)
5220cb63e3 Babel: Fix pointer arithmetic in subtlv parsing
The subtlv parsing code was doing byte-based arithmetic with non-void pointers,
causing it to read beyond the end of the packet.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2017-06-14 12:34:43 +02:00
Ondrej Zajicek (work)
145ebfa1df Babel: Parse sub-TLVs and skip TLVs with mandatory sub-TLV
RFC6126bis formally introduces sub-TLVs to the Babel protocol, including
mandatory sub-TLVs. This adds support for parsing sub-TLVs to the Babel
protocol and skips TLVs that contain mandatory sub-TLVs, as per the spec.

For details, see section 4.4 of
https://tools.ietf.org/html/draft-ietf-babel-rfc6126bis-02

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-06-09 14:33:06 +02:00
Ondrej Zajicek (work)
b3c6273efa Babel: Implement IPv6 prefix compression on outgoing updates
Previously, the Babel protocol would never use prefix compression on outgoing
updates (but would parse it on incoming ones). This adds compression of IPv6
addresses of outgoing updates.

The compression only works to the extent that the FIB is walked in lexicographic
order; i.e. a prefix is only compressed if it shares bytes with the previous
prefix in the same packet.

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-06-09 13:00:20 +02:00
Ondrej Zajicek (work)
4324025f98 Babel: Add support for dual-stack IPv4/IPv6 operation
This adds support for dual-stack v4/v6 operation to the Babel protocol.
Routing messages will be exchanged over IPv6, but IPv4 routes can be
carried in the messages being exchanged. This matches how the reference
Babel implementation (babeld) works.

The nexthop address for v4 can be configured per interface, and will
default to the first available IPv4 address on the given interface. For
symmetry, a configuration option to configure the IPv6 nexthop address
is also added.

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-06-08 12:18:16 +02:00
Ondrej Zajicek (work)
6aaaa63519 Change parser to handle numbers as unsigned
Lexer always parsed numbers as unsigned, but parser handled them as
signed and grammar contained many unnecessary checks for negativity.
2017-05-23 17:40:19 +02:00
Ondrej Zajicek (work)
734e9fb8a9 Minor cleanups and fixes 2017-05-23 13:12:25 +02:00
Jan Moskyto Matejka
05d47bd53e Linpool: default allocation size 2017-05-16 15:34:57 +02:00
Ondrej Zajicek (work)
1d21306785 Minor fixes 2017-04-29 01:24:30 +02:00
Ondrej Zajicek (work)
e919601aaf Merge master into int-new 2017-04-28 11:19:12 +02:00
Ondrej Zajicek (work)
4278abfe27 Check validity of dest w.r.t. net_type
Allow to define static roa/flow routes without dest.
2017-04-18 13:56:40 +02:00
Ondrej Zajicek (work)
711d617dc1 BGP: Add support for SAFI 129 (VPN multicast)
Which, in contrast to SAFI 128, does not use MPLS labels.
2017-04-12 16:04:22 +02:00
Ondrej Zajicek (work)
ffb38dfb8b Static: Support for dual-AF IGP tables
When recursive routes with hybrid next hops (e.g. IPv6 route with IPv4 next
hop) are allowed, we need both IPv4 and IPv6 IGP tables.
2017-04-12 16:04:22 +02:00
Ondrej Zajicek (work)
6fe11c9941 BGP: Simplify igp table options 2017-03-29 15:31:04 +02:00
Ondrej Zajicek (work)
c49e4a6565 BGP: Update list of supported standards 2017-03-29 13:48:23 +02:00
Ondrej Zajicek (work)
ef57b70fa5 BGP: Support for routes with mixed-AF next hops
Covers IPv4/VPNv4 routes with IPv6 next hop (RFC 5549), IPv6 routes with
IPv4 next hop (RFC 4798) and VPNv6 routes with IPv4 next hop (RFC 4659).
Unfortunately it also makes next hop hooks more messy.

Each BGP channel now could have two IGP tables, one for IPv4 next hops,
the other for IPv6 next hops.
2017-03-26 19:20:15 +02:00
Ondrej Zajicek (work)
01111fc42c BGP: Bugfix in VPN NLRI encoding 2017-03-23 14:10:42 +01:00
Ondrej Zajicek (work)
1e37e35c3e BGP: Support for MPLS labels and VPN SAFI
Basic support for SAFI 4 and 128 (MPLS labeled IP and VPN) for IPv4 and
IPv6. Should work for route reflector, but does not properly handle
originating routes with next hop self.

Based on patches from Jan Matejka.
2017-03-22 18:16:49 +01:00
Jan Moskyto Matejka
ead7b8f498 Merge branch 'nexthop-merged' into int-new 2017-03-22 14:54:00 +01:00
Jan Moskyto Matejka
3c74416465 Nexthop: Fixed recursive route mpls label merging 2017-03-17 15:48:32 +01:00
Ondrej Zajicek (work)
33b6c292c3 BGP: Allow to specify interface for regular sessions
This may be useful if multple interfaces share the same network range.

Thanks to Fritz Grimpen for the original patch.
2017-03-14 12:56:47 +01:00
Ondrej Zajicek (work)
27f6ba651e BGP: Fix bug in ADD_PATH
When a BGP session with ADD_PATH is restarted and the neighbor do not
announce ADD_PATH capability during reconnect, the accept_ra_types is
still set to RA_ANY.

Thanks to Lennert Buytenhek for the bugreport
2017-03-14 12:56:12 +01:00
Ondrej Zajicek (work)
665be7f6bd Nest: Minor fixes in show route 2017-03-09 13:47:00 +01:00
Ondrej Zajicek (work)
7126cadf80 Static: Minor overhaul
The patch fixes several bugs introduced in previous changes, simplifies
the protocol by handing routes uniformly, introduces asynchronous route
processing to avoid issues with separate notifications for each next-hop
in ECMP routes, and makes reconfiguration faster by avoiding quadratic
complexity.
2017-03-09 13:47:00 +01:00
Ondrej Zajicek (work)
da3cf9eae3 Update OSPF and RIP protocol names and related documentation 2017-03-08 17:37:11 +01:00
Jan Moskyto Matejka
039a65d0e4 Nexthop: Fixed hostentry 2017-02-24 14:05:11 +01:00
Ondrej Zajicek (work)
1950a479c0 BGP: Allow exchanging LOCAL_PREF with eBGP peers
Adds option 'allow bgp_local_pref' to override the usual restriction of
LOCAL_PREF on eBGP sessions.

Thanks to Lennert Buytenhek for the patch.
2017-02-23 16:32:07 +01:00
Jan Moskyto Matejka
b2b84359ab Babel post-merge fixes 2017-02-22 12:02:28 +01:00
Jan Moskyto Matejka
c609d03986 Merge branch 'int-new' into nexthop-merged 2017-02-22 11:58:04 +01:00
Ondrej Zajicek (work)
2be9218a3b BGP: Update RFC references 2017-02-20 02:28:04 +01:00
Ondrej Zajicek (work)
62e64905b7 Several minor fixes 2017-02-20 02:26:45 +01:00
Ondrej Zajicek (work)
4e379bde60 BGP: Update RFC references 2017-02-19 12:02:39 +01:00
Ondrej Zajicek (work)
30c734fc73 Static: Fix bug in static route filter expressions
During reconfiguration, old and new filter expressions in static routes
are compared using i_same() function. When filter expressions contain
function calls, it is necessary that old filter expressions are the
second argument in i_same(), as it is internally modified by i_same().
Otherwise pointers to old (and freed) data appear in the config
structure.

Thanks to Lennert Buytenhek for tracking and reporting the bug.
2017-02-17 22:54:06 +01:00
Ondrej Zajicek (work)
c259669fa3 Merge branch 'master' into int-new 2017-02-08 14:34:48 +01:00
Ondrej Zajicek (work)
82f42ea091 BGP: Minor cleanups 2017-02-07 15:55:51 +01:00
Ondrej Zajicek (work)
d8022d26fc BGP: Partial support for IPv4 routes with IPv6 next hop (RFC 5549)
Mostly capability signalling
2017-01-24 02:00:35 +01:00
Ondrej Zajicek (work)
5509e17d0c BGP: Support for AS confederations (RFC 5065) 2017-01-22 16:32:42 +01:00
Ondrej Zajicek (work)
f8aad5d5b7 Minor cleanups 2017-01-03 16:30:27 +01:00
Jan Moskyto Matejka
d47c3d64b2 MPLS: Label stack concatenation for recursive routes 2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka
f2010f9c65 Static: Protocol rework wrt. struct nexthop changes; MPLS label support 2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka
ec5e5d23fa Nexthop: Support for label stack in nest 2016-12-22 13:23:52 +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