Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2018 08:07:41 +0000 (UTC)
From:      Olivier Cochard <olivier@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474490 - in head/net/frr4: . files
Message-ID:  <201807120807.w6C87fBU084700@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: olivier
Date: Thu Jul 12 08:07:41 2018
New Revision: 474490
URL: https://svnweb.freebsd.org/changeset/ports/474490

Log:
  Remove compile-time-bomb code (#if CONFDATE > 20180828) and backport patches
  fixing crash with tunnel interfaces
  
  Reported by:	pkg-fallout
  Sponsored by:	Orange

Added:
  head/net/frr4/files/patch-lib_linklist.h   (contents, props changed)
  head/net/frr4/files/patch-lib_stream.h   (contents, props changed)
  head/net/frr4/files/patch-lib_zclient.h   (contents, props changed)
  head/net/frr4/files/patch-ospf6d_ospf6__top.c   (contents, props changed)
  head/net/frr4/files/patch-ospfd_ospf__vty.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_connected.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_connected.h   (contents, props changed)
  head/net/frr4/files/patch-zebra_if__ioctl.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_if__ioctl__solaris.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_if__netlink.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_ioctl.c   (contents, props changed)
  head/net/frr4/files/patch-zebra_kernel__socket.c   (contents, props changed)
Modified:
  head/net/frr4/Makefile
  head/net/frr4/pkg-message

Modified: head/net/frr4/Makefile
==============================================================================
--- head/net/frr4/Makefile	Thu Jul 12 07:57:54 2018	(r474489)
+++ head/net/frr4/Makefile	Thu Jul 12 08:07:41 2018	(r474490)
@@ -3,7 +3,7 @@
 PORTNAME=	frr
 PORTVERSION=	4.0
 DISTVERSIONPREFIX=	frr-
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net ipv6
 PKGNAMESUFFIX=	4
 

Added: head/net/frr4/files/patch-lib_linklist.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-lib_linklist.h	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,12 @@
+--- lib/linklist.h.orig	2018-07-12 06:56:52 UTC
++++ lib/linklist.h
+@@ -84,9 +84,6 @@ extern void *listnode_head(struct list *);
+  * and remove list_delete_original and the list_delete #define
+  * Additionally remove list_free entirely
+  */
+-#if CONFDATE > 20181001
+-CPP_NOTICE("list_delete without double pointer is deprecated, please fixup")
+-#endif
+ extern void list_delete_and_null(struct list **);
+ extern void list_delete_original(struct list *);
+ #define list_delete(X) list_delete_original((X))			\

Added: head/net/frr4/files/patch-lib_stream.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-lib_stream.h	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,12 @@
+--- lib/stream.h.orig	2018-07-12 06:57:53 UTC
++++ lib/stream.h
+@@ -123,9 +123,6 @@ struct stream_fifo {
+ #define STREAM_CONCAT_REMAIN(S1, S2, size) ((size) - (S1)->endp - (S2)->endp)
+ 
+ /* deprecated macros - do not use in new code */
+-#if CONFDATE > 20181128
+-CPP_NOTICE("lib: time to remove deprecated stream.h macros")
+-#endif
+ #define STREAM_PNT(S)   stream_pnt((S))
+ #define STREAM_REMAIN(S) STREAM_WRITEABLE((S))
+ 

Added: head/net/frr4/files/patch-lib_zclient.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-lib_zclient.h	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,24 @@
+--- lib/zclient.h.orig	2018-07-12 06:57:20 UTC
++++ lib/zclient.h
+@@ -353,10 +353,6 @@ struct zclient_options {
+ /* Prototypes of zebra client service functions. */
+ extern struct zclient *zclient_new(struct thread_master *);
+ 
+-#if CONFDATE > 20181101
+-CPP_NOTICE("zclient_new_notify can take over or zclient_new now");
+-#endif
+-
+ extern struct zclient_options zclient_options_default;
+ 
+ extern struct zclient *zclient_new_notify(struct thread_master *m,
+@@ -421,10 +417,6 @@ extern struct interface *zebra_interface_vrf_update_re
+ 							 vrf_id_t *new_vrf_id);
+ extern void zebra_interface_if_set_value(struct stream *, struct interface *);
+ extern void zebra_router_id_update_read(struct stream *s, struct prefix *rid);
+-
+-#if CONFDATE > 20180823
+-CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
+-#endif
+ 
+ extern int zapi_ipv4_route(u_char, struct zclient *, struct prefix_ipv4 *,
+ 			   struct zapi_ipv4 *) __attribute__((deprecated));

Added: head/net/frr4/files/patch-ospf6d_ospf6__top.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-ospf6d_ospf6__top.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,21 @@
+--- ospf6d/ospf6_top.c.orig	2018-07-12 06:58:31 UTC
++++ ospf6d/ospf6_top.c
+@@ -363,18 +363,12 @@ DEFUN(no_ospf6_router_id,
+ 	return CMD_SUCCESS;
+ }
+ 
+-#if CONFDATE > 20180828
+-CPP_NOTICE("ospf6: `router-id A.B.C.D` deprecated 2017/08/28")
+-#endif
+ ALIAS_HIDDEN(ospf6_router_id,
+ 	     ospf6_router_id_hdn_cmd,
+ 	     "router-id A.B.C.D",
+ 	     "Configure OSPF6 Router-ID\n"
+ 	     V4NOTATION_STR)
+ 
+-#if CONFDATE > 20180828
+-CPP_NOTICE("ospf6: `no router-id A.B.C.D` deprecated 2017/08/28")
+-#endif
+ ALIAS_HIDDEN(no_ospf6_router_id,
+ 	     no_ospf6_router_id_hdn_cmd,
+ 	     "no router-id [A.B.C.D]",

Added: head/net/frr4/files/patch-ospfd_ospf__vty.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-ospfd_ospf__vty.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,22 @@
+--- ospfd/ospf_vty.c.orig	2018-07-12 06:56:11 UTC
++++ ospfd/ospf_vty.c
+@@ -2337,9 +2337,6 @@ DEFUN (no_ospf_timers_lsa_min_arrival,
+ 	return CMD_SUCCESS;
+ }
+ 
+-#if CONFDATE > 20180708
+-CPP_NOTICE("ospf: `timers lsa arrival (0-1000)` deprecated 2017/07/08")
+-#endif
+ ALIAS_HIDDEN (ospf_timers_lsa_min_arrival,
+               ospf_timers_lsa_arrival_cmd,
+               "timers lsa arrival (0-1000)",
+@@ -2348,9 +2345,6 @@ ALIAS_HIDDEN (ospf_timers_lsa_min_arrival,
+               "ospf minimum arrival interval delay\n"
+               "delay (msec) between accepted lsas\n");
+ 
+-#if CONFDATE > 20180708
+-CPP_NOTICE("ospf: `no timers lsa arrival (0-1000)` deprecated 2017/07/08")
+-#endif
+ ALIAS_HIDDEN (no_ospf_timers_lsa_min_arrival,
+               no_ospf_timers_lsa_arrival_cmd,
+               "no timers lsa arrival (0-1000)",

Added: head/net/frr4/files/patch-zebra_connected.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_connected.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,61 @@
+--- zebra/connected.c.orig	2018-03-12 01:53:37.000000000 +0100
++++ zebra/connected.c	2018-07-12 09:11:27.490278000 +0200
+@@ -486,7 +486,9 @@
+ 
+ /* Add connected IPv6 route to the interface. */
+ void connected_add_ipv6(struct interface *ifp, int flags, struct in6_addr *addr,
+-			u_char prefixlen, const char *label)
++			struct in6_addr *broad, uint8_t prefixlen,
++			const char *label)
++
+ {
+ 	struct prefix_ipv6 *p;
+ 	struct connected *ifc;
+@@ -508,6 +510,19 @@
+ 	IPV6_ADDR_COPY(&p->prefix, addr);
+ 	p->prefixlen = prefixlen;
+ 	ifc->address = (struct prefix *)p;
++	if (broad) {
++		p = prefix_ipv6_new();
++		p->family = AF_INET6;
++		IPV6_ADDR_COPY(&p->prefix, broad);
++		p->prefixlen = prefixlen;
++		ifc->destination = (struct prefix *)p;
++	} else {
++		if (CHECK_FLAG(ifc->flags, ZEBRA_IFA_PEER)) {
++			zlog_warn("warning: %s called for interface %s with peer flag set, but no peer address supplied",
++				  __func__, ifp->name);
++			UNSET_FLAG(ifc->flags, ZEBRA_IFA_PEER);
++		}
++	}
+ 
+ 	/* Label of this address. */
+ 	if (label)
+@@ -527,9 +542,9 @@
+ }
+ 
+ void connected_delete_ipv6(struct interface *ifp, struct in6_addr *address,
+-			   u_char prefixlen)
++						struct in6_addr *broad, uint8_t prefixlen)
+ {
+-	struct prefix p;
++	struct prefix p, d;
+ 	struct connected *ifc;
+ 
+ 	memset(&p, 0, sizeof(struct prefix));
+@@ -537,7 +552,14 @@
+ 	memcpy(&p.u.prefix6, address, sizeof(struct in6_addr));
+ 	p.prefixlen = prefixlen;
+ 
+-	ifc = connected_check(ifp, &p);
++	if (broad) {
++		memset(&d, 0, sizeof(struct prefix));
++		d.family = AF_INET6;
++		IPV6_ADDR_COPY(&d.u.prefix, broad);
++		d.prefixlen = prefixlen;
++		ifc = connected_check_ptp(ifp, &p, &d);
++	} else
++		ifc = connected_check_ptp(ifp, &p, NULL);
+ 
+ 	connected_delete_helper(ifc, &p);
+ }

Added: head/net/frr4/files/patch-zebra_connected.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_connected.h	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,17 @@
+--- zebra/connected.h.orig	2018-03-12 00:53:37 UTC
++++ zebra/connected.h
+@@ -42,10 +42,11 @@ extern void connected_up(struct interface *ifp, struct
+ extern void connected_down(struct interface *ifp, struct connected *ifc);
+ 
+ extern void connected_add_ipv6(struct interface *ifp, int flags,
+-			       struct in6_addr *address, u_char prefixlen,
+-			       const char *label);
++			       struct in6_addr *address, struct in6_addr *broad,
++			       uint8_t prefixlen, const char *label);
+ extern void connected_delete_ipv6(struct interface *ifp,
+-				  struct in6_addr *address, u_char prefixlen);
++				  struct in6_addr *address,
++				  struct in6_addr *broad, uint8_t prefixlen);
+ 
+ extern int connected_is_unnumbered(struct interface *);
+ 

Added: head/net/frr4/files/patch-zebra_if__ioctl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_if__ioctl.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,11 @@
+--- zebra/if_ioctl.c.orig	2018-03-12 00:53:37 UTC
++++ zebra/if_ioctl.c
+@@ -249,7 +249,7 @@ static int if_getaddrs(void)
+ 			}
+ #endif
+ 
+-			connected_add_ipv6(ifp, flags, &addr->sin6_addr,
++			connected_add_ipv6(ifp, flags, &addr->sin6_addr, NULL,
+ 					   prefixlen, NULL);
+ 		}
+ 	}

Added: head/net/frr4/files/patch-zebra_if__ioctl__solaris.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_if__ioctl__solaris.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,11 @@
+--- zebra/if_ioctl_solaris.c.orig	2018-03-12 00:53:37 UTC
++++ zebra/if_ioctl_solaris.c
+@@ -315,7 +315,7 @@ static int if_get_addr(struct interface *ifp, struct s
+ 		connected_add_ipv4(ifp, flags, &SIN(addr)->sin_addr, prefixlen,
+ 				   (struct in_addr *)dest_pnt, label);
+ 	else if (af == AF_INET6)
+-		connected_add_ipv6(ifp, flags, &SIN6(addr)->sin6_addr,
++		connected_add_ipv6(ifp, flags, &SIN6(addr)->sin6_addr, NULL,
+ 				   prefixlen, label);
+ 
+ 	return 0;

Added: head/net/frr4/files/patch-zebra_if__netlink.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_if__netlink.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,14 @@
+--- zebra/if_netlink.c.orig	2018-03-12 00:53:37 UTC
++++ zebra/if_netlink.c
+@@ -985,9 +985,11 @@ int netlink_interface_addr(struct sockaddr_nl *snl, st
+ 			      & (IFA_F_DADFAILED | IFA_F_TENTATIVE)))
+ 				connected_add_ipv6(ifp, flags,
+ 						   (struct in6_addr *)addr,
++						   (struct in6_addr *)broad,
+ 						   ifa->ifa_prefixlen, label);
+ 		} else
+ 			connected_delete_ipv6(ifp, (struct in6_addr *)addr,
++					      (struct in6_addr *)broad,
+ 					      ifa->ifa_prefixlen);
+ 	}
+ 

Added: head/net/frr4/files/patch-zebra_ioctl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_ioctl.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,20 @@
+--- zebra/ioctl.c.orig	2018-03-12 00:53:37 UTC
++++ zebra/ioctl.c
+@@ -395,10 +395,13 @@ void if_get_flags(struct interface *ifp)
+ 		strncpy(ifmr.ifm_name, ifp->name, IFNAMSIZ);
+ 
+ 		/* Seems not all interfaces implement this ioctl */
+-		if (if_ioctl(SIOCGIFMEDIA, (caddr_t)&ifmr) < 0)
+-			zlog_err("if_ioctl(SIOCGIFMEDIA) failed: %s",
+-				 safe_strerror(errno));
+-		else if (ifmr.ifm_status & IFM_AVALID) /* Link state is valid */
++		if (if_ioctl(SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
++			/* Ignore EINVAL to avoid being too verbose */
++			if (errno != EINVAL)
++				zlog_err("if_ioctl(SIOCGIFMEDIA) failed: %s",
++					 safe_strerror(errno));
++		} else if (ifmr.ifm_status
++			   & IFM_AVALID) /* Link state is valid */
+ 		{
+ 			if (ifmr.ifm_status & IFM_ACTIVE)
+ 				SET_FLAG(ifreq.ifr_flags, IFF_RUNNING);

Added: head/net/frr4/files/patch-zebra_kernel__socket.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/frr4/files/patch-zebra_kernel__socket.c	Thu Jul 12 08:07:41 2018	(r474490)
@@ -0,0 +1,15 @@
+--- zebra/kernel_socket.c.orig	2018-03-12 00:53:37 UTC
++++ zebra/kernel_socket.c
+@@ -771,10 +771,11 @@ int ifam_read(struct ifa_msghdr *ifam)
+ 
+ 		if (ifam->ifam_type == RTM_NEWADDR)
+ 			connected_add_ipv6(ifp, flags, &addr.sin6.sin6_addr,
++					   NULL,
+ 					   ip6_masklen(mask.sin6.sin6_addr),
+ 					   (isalias ? ifname : NULL));
+ 		else
+-			connected_delete_ipv6(ifp, &addr.sin6.sin6_addr,
++			connected_delete_ipv6(ifp, &addr.sin6.sin6_addr, NULL,
+ 					      ip6_masklen(mask.sin6.sin6_addr));
+ 		break;
+ 	default:

Modified: head/net/frr4/pkg-message
==============================================================================
--- head/net/frr4/pkg-message	Thu Jul 12 07:57:54 2018	(r474489)
+++ head/net/frr4/pkg-message	Thu Jul 12 08:07:41 2018	(r474490)
@@ -4,5 +4,5 @@ messages like:
 To prevent such message kern.ipc.maxsockbuf can be increased:
 sysctl kern.ipc.maxsockbuf=16777216
 
-Error messages like "if_ioctl(SIOCGIFMEDIA) failed: Invalid argument" and
- crashs with tun,gre or gif interfaces are under investigation.
+Error messages like "if_ioctl(SIOCGIFMEDIA) failed: Invalid argument" are
+under investigation.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807120807.w6C87fBU084700>