Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 2019 13:45:49 +0100
From:      Sebastian Huber <sebastian.huber@embedded-brains.de>
To:        FreeBSD <freebsd-hackers@freebsd.org>
Subject:   What is the purpose of BURN_BRIDGES?
Message-ID:  <1fd4571d-0da1-e325-b6a1-a3cc12f2f05d@embedded-brains.de>

next in thread | raw e-mail | index | archive | help
Hello,

I turned on BURN_BRIDGES in my global kernel configuration and now I get=20
undefined references, e.g.

/build/rtems/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bi=
n/ld:=20
./libbsd.a(ip6_output.c.18.o): in function `_bsd_ip6_output':
/scratch/git-rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default/../=
../freebsd/sys/netinet6/ip6_output.c:548:=20
undefined reference to `_bsd_in6_selectroute_fib'
/build/rtems/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bi=
n/ld:=20
./libbsd.a(nd6.c.18.o): in function `nd6_llinfo_timer':
/scratch/git-rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default/../=
../freebsd/sys/netinet6/nd6.c:881:=20
undefined reference to `_bsd_nd6_ns_output'
/build/rtems/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bi=
n/ld:=20
./libbsd.a(nd6.c.18.o): in function `nd6_resolve_slow':
/scratch/git-rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default/../=
../freebsd/sys/netinet6/nd6.c:2461:=20
undefined reference to `_bsd_nd6_ns_output'
/build/rtems/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bi=
n/ld:=20
./libbsd.a(nd6_nbr.c.18.o): in function `nd6_dad_ns_output':
/scratch/git-rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default/../=
../freebsd/sys/netinet6/nd6_nbr.c:1513:=20
undefined reference to `_bsd_nd6_ns_output'

This is because of (in6_src.c):

#ifndef BURN_BRIDGES
int
in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opt=
s,
 =C2=A0=C2=A0=C2=A0 struct ip6_moptions *mopts, struct route_in6 *ro,
 =C2=A0=C2=A0=C2=A0 struct ifnet **retifp, struct rtentry **retrt, u_int =
fibnum)
{

 =C2=A0=C2=A0=C2=A0 return (selectroute(dstsock, opts, mopts, ro, retifp,
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 retrt, 0, fibnum));
}
#endif

And (ip6_output.c):

int
ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
 =C2=A0=C2=A0=C2=A0 struct route_in6 *ro, int flags, struct ip6_moptions =
*im6o,
 =C2=A0=C2=A0=C2=A0 struct ifnet **ifpp, struct inpcb *inp)
{
...
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (ro->ro_lle)
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 LLE_FREE(ro->ro=
_lle);=C2=A0=C2=A0=C2=A0 /* zeros ro_lle */
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 ro->ro_lle =3D NULL;
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (fwd_tag =3D=3D NULL) {
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 bzero(&dst_sa, =
sizeof(dst_sa));
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 dst_sa.sin6_fam=
ily =3D AF_INET6;
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 dst_sa.sin6_len=
 =3D sizeof(dst_sa);
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 dst_sa.sin6_add=
r =3D ip6->ip6_dst;
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 }
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 error =3D in6_selectroute_fib(&dst=
_sa, opt, im6o, ro, &ifp,
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 &rt, fibnum);
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (error !=3D 0) {
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (ifp !=3D NU=
LL)
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 in6_ifstat_inc(ifp, ifs6_out_discard);
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 goto bad;
 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 }

No BURN_BRIDGES conditional compilation. Is this option supposed to=20
work? What is its purpose? I enabled it to get rid of some legacy stuff=20
in bpf.c.

--=20
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG=
.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1fd4571d-0da1-e325-b6a1-a3cc12f2f05d>