diff options
| -rwxr-xr-x | configure.ac | 13 | ||||
| -rw-r--r-- | doc/user/installation.rst | 10 | ||||
| -rw-r--r-- | isisd/isis_tlvs.c | 6 | ||||
| -rwxr-xr-x[-rw-r--r--] | tests/topotests/bgp-evpn-vxlan_topo1/test_bgp_evpn_vxlan.py | 15 | ||||
| -rw-r--r-- | zebra/rt_netlink.c | 49 |
5 files changed, 54 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac index bda9a34504..237552c140 100755 --- a/configure.ac +++ b/configure.ac @@ -451,6 +451,11 @@ fi AC_SUBST([AC_LDFLAGS]) AM_CONDITIONAL([STATIC_BIN], [test "$enable_static_bin" = "yes"]) +AC_ARG_ENABLE([rpath], + [AS_HELP_STRING([--enable-rpath], [set hardcoded rpaths in the executable @<:@default=yes@:>@])], + [], + [enable_rpath=yes]) + dnl $AR and $RANLIB are set by LT_INIT above AC_MSG_CHECKING([whether $AR supports D option]) if $AR crD conftest.a >/dev/null 2>/dev/null; then @@ -2527,6 +2532,14 @@ AS_IF([test "$with_pkg_git_version" = "yes"], [ ## It's already in CVS until texinfo 4.7 is more common. AC_OUTPUT +if test "$enable_rpath" = "yes" ; then + true +else + # See https://old-en.opensuse.org/openSUSE:Packaging_Guidelines#Removing_Rpath + sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool + sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +fi + echo " FRRouting configuration ------------------------------ diff --git a/doc/user/installation.rst b/doc/user/installation.rst index ee06578b7c..5d5dfa5cc5 100644 --- a/doc/user/installation.rst +++ b/doc/user/installation.rst @@ -273,15 +273,15 @@ options from the list below. With this option, we provide a way to strip out these characters for APK dev package builds. -..option:: --disable-version-build-config +.. option:: --disable-version-build-config Remove the "configuerd with" field that has all of the build configuration arguments when reporting the version string in `show version` command. -..option:: --with-pkg-extra-version=VER +.. option:: --with-pkg-extra-version=VER Add extra version field, for packagers/distributions -..option:: --with-pkg-git-version +.. option:: --with-pkg-git-version Add git information to MOTD and build version string @@ -355,6 +355,10 @@ options from the list below. Turn on the usage of PCRE Posix libs for regex functionality. +.. option:: --enable-rpath + + Set hardcoded rpaths in the executable [default=yes]. + You may specify any combination of the above options to the configure script. By default, the executables are placed in :file:`/usr/local/sbin` and the configuration files in :file:`/usr/local/etc`. The :file:`/usr/local/` diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index a5c2fd5894..3cb2ce02ca 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -2400,11 +2400,11 @@ static int unpack_tlv_threeway_adj(enum isis_tlv_context context, } /* Functions related to TLVs 236/237 IPv6/MT-IPv6 reach */ - static struct isis_item *copy_item_ipv6_reach(struct isis_item *i) { struct isis_ipv6_reach *r = (struct isis_ipv6_reach *)i; struct isis_ipv6_reach *rv = XCALLOC(MTYPE_ISIS_TLV, sizeof(*rv)); + rv->metric = r->metric; rv->down = r->down; rv->external = r->external; @@ -2573,11 +2573,13 @@ out: static struct isis_router_cap *copy_tlv_router_cap( const struct isis_router_cap *router_cap) { - struct isis_router_cap *rv = XMALLOC(MTYPE_ISIS_TLV, sizeof(*rv)); + struct isis_router_cap *rv; if (!router_cap) return NULL; + rv = XMALLOC(MTYPE_ISIS_TLV, sizeof(*rv)); + memcpy(rv, router_cap, sizeof(*rv)); return rv; diff --git a/tests/topotests/bgp-evpn-vxlan_topo1/test_bgp_evpn_vxlan.py b/tests/topotests/bgp-evpn-vxlan_topo1/test_bgp_evpn_vxlan.py index 2a14105383..5098808d55 100644..100755 --- a/tests/topotests/bgp-evpn-vxlan_topo1/test_bgp_evpn_vxlan.py +++ b/tests/topotests/bgp-evpn-vxlan_topo1/test_bgp_evpn_vxlan.py @@ -197,8 +197,12 @@ def mac_learn_test(host, local): host_output = host.vtysh_cmd("show interface {}-eth0".format(host.name)) int_lines = host_output.splitlines() - line_items = int_lines[7].split(": ") - mac = line_items[1] + for line in int_lines: + line_items = line.split(": ") + if "HWaddr" in line_items[0]: + mac = line_items[1] + break + mac_output = local.vtysh_cmd("show evpn mac vni 101 mac {} json".format(mac)) mac_output_json = json.loads(mac_output) assertmsg = "Local MAC output does not match interface mac {}".format(mac) @@ -287,8 +291,11 @@ def ip_learn_test(tgen, host, local, remote, ip_addr): "check the host IP gets learned by the VNI" host_output = host.vtysh_cmd("show interface {}-eth0".format(host.name)) int_lines = host_output.splitlines() - mac_line = int_lines[7].split(": ") - mac = mac_line[1] + for line in int_lines: + line_items = line.split(": ") + if "HWaddr" in line_items[0]: + mac = line_items[1] + break print(host_output) # check we have a local association between the MAC and IP diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index da0eeb364e..19fe7b5180 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2097,6 +2097,8 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd, int num_labels = 0; uint32_t id = dplane_ctx_get_nhe_id(ctx); int type = dplane_ctx_get_nhe_type(ctx); + struct rtattr *nest; + uint16_t encap; if (!id) { flog_err( @@ -2225,34 +2227,21 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd, */ if (req->nhm.nh_family == AF_MPLS) goto nexthop_done; -#if 0 - if (!nl_attr_put(&req->n, buflen, NHA_NEWDST, - &out_lse, - num_labels - * sizeof(mpls_lse_t))) - return 0; -#endif - else { - struct rtattr *nest; - uint16_t encap = LWTUNNEL_ENCAP_MPLS; - - if (!nl_attr_put16(&req->n, buflen, - NHA_ENCAP_TYPE, - encap)) - return 0; - nest = nl_attr_nest(&req->n, buflen, - NHA_ENCAP); - if (!nest) - return 0; - if (!nl_attr_put( - &req->n, buflen, - MPLS_IPTUNNEL_DST, &out_lse, - num_labels - * sizeof( - mpls_lse_t))) - return 0; - nl_attr_nest_end(&req->n, nest); - } + + encap = LWTUNNEL_ENCAP_MPLS; + if (!nl_attr_put16(&req->n, buflen, + NHA_ENCAP_TYPE, encap)) + return 0; + nest = nl_attr_nest(&req->n, buflen, NHA_ENCAP); + if (!nest) + return 0; + if (!nl_attr_put( + &req->n, buflen, MPLS_IPTUNNEL_DST, + &out_lse, + num_labels * sizeof(mpls_lse_t))) + return 0; + + nl_attr_nest_end(&req->n, nest); } nexthop_done: @@ -2262,9 +2251,9 @@ nexthop_done: __func__, id, nh, nh->ifindex, vrf_id_to_name(nh->vrf_id), nh->vrf_id, label_buf); -} + } -req->nhm.nh_protocol = zebra2proto(type); + req->nhm.nh_protocol = zebra2proto(type); } else if (cmd != RTM_DELNEXTHOP) { flog_err( |
