net/quagga: add patches to fix IPv6, multi-segment AS_PATH UPDATE fix

- For the IPv6 problem description see also:
  https://bugzilla.quagga.net/show_bug.cgi?id=870
  https://lists.quagga.net/pipermail/quagga-dev/2017-December/033309.html
- Another part of the multi-segment AS_PATH UPDATE
  message length calculation fix

PR:		214481
Reported by:	dgilbert@eicat.ca
This commit is contained in:
Kurt Jaeger 2017-12-19 15:28:09 +00:00
parent b22594f22e
commit c833555fe1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=456724
5 changed files with 30 additions and 4 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= quagga
PORTVERSION= 1.2.2
PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= SAVANNAH

View File

@ -0,0 +1,11 @@
--- bgpd/bgp_aspath.c.orig 2017-10-03 14:57:10 UTC
+++ bgpd/bgp_aspath.c
@@ -901,7 +901,7 @@ aspath_put (struct stream *s, struct aspath *as, int u
while ( (seg->length - written) > AS_SEGMENT_MAX)
{
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
- assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
+ assegment_data_put (s, (seg->as+written), AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
bytes += ASSEGMENT_SIZE (AS_SEGMENT_MAX, use32bit);
}

View File

@ -0,0 +1,13 @@
--- bgpd/bgp_nht.c.orig 2017-10-03 16:57:10.000000000 +0200
+++ bgpd/bgp_nht.c 2017-12-15 21:12:37.058505000 +0100
@@ -409,8 +409,8 @@
break;
#ifdef HAVE_IPV6
case AFI_IP6:
- if (ri->attr->extra->mp_nexthop_len != 16
- || IN6_IS_ADDR_LINKLOCAL (&ri->attr->extra->mp_nexthop_global))
+ if (ri->attr->extra->mp_nexthop_len == 16
+ && IN6_IS_ADDR_LINKLOCAL (&ri->attr->extra->mp_nexthop_global))
return -1;
p->family = AF_INET6;

View File

@ -1,6 +1,7 @@
--- configure.orig 2016-10-18 13:06:39 UTC
--- configure.orig 2017-10-03 14:59:10 UTC
+++ configure
@@ -19874,7 +19874,7 @@ fi
@@ -22070,7 +22070,7 @@ fi
fi

View File

@ -1,4 +1,4 @@
--- doc/bgpd.8.orig 2016-10-18 13:03:52 UTC
--- doc/bgpd.8.orig 2017-10-03 14:57:10 UTC
+++ doc/bgpd.8
@@ -28,6 +28,8 @@ software
] [
@ -9,7 +9,7 @@
]
.SH DESCRIPTION
.B bgpd
@@ -79,6 +81,9 @@ Skip setting the process effective user
@@ -79,6 +81,9 @@ Skip setting the process effective user and group.
.TP
\fB\-v\fR, \fB\-\-version\fR
Print the version and exit.