aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2017-01-22 15:22:17 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2017-01-22 15:22:17 +0000
commit70dfc01d71acb7daf4a39c6f91efb07e55a3f52a (patch)
tree569763d4a275671d303eedfa41a6696d1f297fdf /net
parent30a5de69223e17fbca13c24a5d96c02abd27e8d9 (diff)
downloadports-70dfc01d71acb7daf4a39c6f91efb07e55a3f52a.tar.gz
ports-70dfc01d71acb7daf4a39c6f91efb07e55a3f52a.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/bird/Makefile3
-rw-r--r--net/bird/distinfo6
-rw-r--r--net/bird/files/patch-bsd-sysdep.h23
-rw-r--r--net/bird/files/patch-proto-bgp-attrs.c62
-rw-r--r--net/bird/files/patch-sysdep-unix-io.c80
-rw-r--r--net/bird/files/sysdep-bsd-sysio.h23
6 files changed, 27 insertions, 170 deletions
diff --git a/net/bird/Makefile b/net/bird/Makefile
index 75ed0a951b91..bdf410bb1fdc 100644
--- a/net/bird/Makefile
+++ b/net/bird/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME?= bird
-PORTVERSION= 1.6.0
-PORTREVISION= 1
+PORTVERSION= 1.6.3
CATEGORIES= net
MASTER_SITES= ftp://bird.network.cz/pub/bird/ \
http://bird.mpls.in/distfiles/bird/
diff --git a/net/bird/distinfo b/net/bird/distinfo
index 1f2bc34a0844..9aaf1225b2da 100644
--- a/net/bird/distinfo
+++ b/net/bird/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1469633743
-SHA256 (bird-1.6.0.tar.gz) = db3dfe37deac73b38b7d6966e577985f7b8e23f246760cb095ad13b0d8010e13
-SIZE (bird-1.6.0.tar.gz) = 1273899
+TIMESTAMP = 1485093974
+SHA256 (bird-1.6.3.tar.gz) = 39c51cf57c3ba8b5978b2a657ffa2f647ec7f3ae643e91cf42ee5cb070cf7e7c
+SIZE (bird-1.6.3.tar.gz) = 1337198
diff --git a/net/bird/files/patch-bsd-sysdep.h b/net/bird/files/patch-bsd-sysdep.h
deleted file mode 100644
index d09aac02867b..000000000000
--- a/net/bird/files/patch-bsd-sysdep.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- sysdep/bsd/sysio.h 2014-07-10 01:40:13.000000000 +0400
-+++ sysdep/bsd/sysio.h 2014-09-27 12:12:09.000000000 +0400
-@@ -9,6 +9,9 @@
- #include <net/if_dl.h>
- #include <netinet/in_systm.h> // Workaround for some BSDs
- #include <netinet/ip.h>
-+#ifdef __FreeBSD__
-+#include <sys/param.h> // FreeBSD_version definition
-+#endif
-
-
- #ifdef __NetBSD__
-@@ -175,8 +178,8 @@
- ip->ip_src = ipa_to_in4(s->saddr);
- ip->ip_dst = ipa_to_in4(s->daddr);
-
--#ifdef __OpenBSD__
-- /* OpenBSD expects ip_len in network order, other BSDs expect host order */
-+#if defined __OpenBSD__ || (defined __FreeBSD__ && (__FreeBSD_version >= 1100030))
-+ /* OpenBSD and FreeBSD (since 11) expects ip_len in network order, other BSDs expect host order */
- ip->ip_len = htons(ip->ip_len);
- #endif
- }
diff --git a/net/bird/files/patch-proto-bgp-attrs.c b/net/bird/files/patch-proto-bgp-attrs.c
deleted file mode 100644
index 7c5fb93d117c..000000000000
--- a/net/bird/files/patch-proto-bgp-attrs.c
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git proto/bgp/attrs.c proto/bgp/attrs.c
-index d85afa8..b8371f3 100644
---- proto/bgp/attrs.c
-+++ proto/bgp/attrs.c
-@@ -118,7 +118,7 @@ validate_path(struct bgp_proto *p, int as_path, int bs, byte *idata, uint *ileng
- {
- int res = 0;
- u8 *a, *dst;
-- int len, plen, copy;
-+ int len, plen;
-
- dst = a = idata;
- len = *ilength;
-@@ -132,15 +132,20 @@ validate_path(struct bgp_proto *p, int as_path, int bs, byte *idata, uint *ileng
- if (len < plen)
- return -1;
-
-+ if (a[1] == 0)
-+ {
-+ log(L_WARN "%s: %s_PATH attribute contains empty segment, skipping it",
-+ p->p.name, as_path ? "AS" : "AS4");
-+ goto skip;
-+ }
-+
- switch (a[0])
- {
- case AS_PATH_SET:
-- copy = 1;
- res++;
- break;
-
- case AS_PATH_SEQUENCE:
-- copy = 1;
- res += a[1];
- break;
-
-@@ -154,20 +159,17 @@ validate_path(struct bgp_proto *p, int as_path, int bs, byte *idata, uint *ileng
-
- log(L_WARN "%s: %s_PATH attribute contains AS_CONFED_* segment, skipping segment",
- p->p.name, as_path ? "AS" : "AS4");
-- copy = 0;
-- break;
-+ goto skip;
-
- default:
- return -1;
- }
-
-- if (copy)
-- {
-- if (dst != a)
-- memmove(dst, a, plen);
-- dst += plen;
-- }
-+ if (dst != a)
-+ memmove(dst, a, plen);
-+ dst += plen;
-
-+ skip:
- len -= plen;
- a += plen;
- }
diff --git a/net/bird/files/patch-sysdep-unix-io.c b/net/bird/files/patch-sysdep-unix-io.c
deleted file mode 100644
index 8802bc3a2475..000000000000
--- a/net/bird/files/patch-sysdep-unix-io.c
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git sysdep/unix/io.c sysdep/unix/io.c
-index 486319f..8198743 100644
---- sysdep/unix/io.c
-+++ sysdep/unix/io.c
-@@ -1211,7 +1211,7 @@ sk_setup(sock *s)
- if (s->iface)
- {
- #ifdef SO_BINDTODEVICE
-- struct ifreq ifr;
-+ struct ifreq ifr = {};
- strcpy(ifr.ifr_name, s->iface->name);
- if (setsockopt(s->fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) < 0)
- ERR("SO_BINDTODEVICE");
-@@ -1854,6 +1854,20 @@ sk_write(sock *s)
- }
-
- void
-+sk_err(sock *s, int revents)
-+{
-+ int se = 0, sse = sizeof(se);
-+ if (revents & POLLERR)
-+ if (getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &se, &sse) < 0)
-+ {
-+ log(L_ERR "IO: Socket error: SO_ERROR: %m");
-+ se = 0;
-+ }
-+
-+ s->err_hook(s, se);
-+}
-+
-+void
- sk_dump_all(void)
- {
- node *n;
-@@ -2163,7 +2177,7 @@ io_loop(void)
- int steps;
-
- steps = MAX_STEPS;
-- if (s->fast_rx && (pfd[s->index].revents & (POLLIN | POLLHUP | POLLERR)) && s->rx_hook)
-+ if (s->fast_rx && (pfd[s->index].revents & POLLIN) && s->rx_hook)
- do
- {
- steps--;
-@@ -2185,6 +2199,7 @@ io_loop(void)
- goto next;
- }
- while (e && steps);
-+
- current_sock = sk_next(s);
- next: ;
- }
-@@ -2208,18 +2223,26 @@ io_loop(void)
- goto next2;
- }
-
-- if (!s->fast_rx && (pfd[s->index].revents & (POLLIN | POLLHUP | POLLERR)) && s->rx_hook)
-+ if (!s->fast_rx && (pfd[s->index].revents & POLLIN) && s->rx_hook)
- {
- count++;
- io_log_event(s->rx_hook, s->data);
- sk_read(s, pfd[s->index].revents);
- if (s != current_sock)
-- goto next2;
-+ goto next2;
-+ }
-+
-+ if (pfd[s->index].revents & (POLLHUP | POLLERR))
-+ {
-+ sk_err(s, pfd[s->index].revents);
-+ goto next2;
- }
-+
- current_sock = sk_next(s);
- next2: ;
- }
-
-+
- stored_sock = current_sock;
- }
- }
diff --git a/net/bird/files/sysdep-bsd-sysio.h b/net/bird/files/sysdep-bsd-sysio.h
new file mode 100644
index 000000000000..609fbef089ee
--- /dev/null
+++ b/net/bird/files/sysdep-bsd-sysio.h
@@ -0,0 +1,23 @@
+diff --git sysdep/bsd/sysio.h sysdep/bsd/sysio.h
+index 2610a47..9b10e6e 100644
+--- sysdep/bsd/sysio.h
++++ sysdep/bsd/sysio.h
+@@ -9,6 +9,7 @@
+ #include <net/if_dl.h>
+ #include <netinet/in_systm.h> // Workaround for some BSDs
+ #include <netinet/ip.h>
++#include <sys/param.h>
+
+
+ #ifdef __NetBSD__
+@@ -179,8 +180,8 @@ sk_prepare_ip_header(sock *s, void *hdr, int dlen)
+ ip->ip_src = ipa_to_in4(s->saddr);
+ ip->ip_dst = ipa_to_in4(s->daddr);
+
+-#ifdef __OpenBSD__
+- /* OpenBSD expects ip_len in network order, other BSDs expect host order */
++#if (defined __OpenBSD__) || (defined __DragonFly__) || (defined __FreeBSD__ && (__FreeBSD_version >= 1100030))
++ /* Different BSDs have different expectations of ip_len endianity */
+ ip->ip_len = htons(ip->ip_len);
+ #endif
+ }