tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import nd6_output_ifp routing function from FreeBSD
Hi tech-net/kern
I am currently working on policy based routing (based on outgoing interface)
there’ a previously written code for ipv6 which I’ve taken from Jonathan A. Kollasch long time ago.
and he used nd6_output function which appears to be removed from netbsd.
+ if (IN6_IS_SCOPE_EMBEDDABLE(&dst.v6.sin6_addr))
+ dst.v6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
+
+ if (m->m_pkthdr.len <= ifp->if_mtu) {
+ error = nd6_output(ifp, ifp, m, &dst.v6, NULL);
+ } else {
+ in6_ifstat_inc(ifp, ifs6_in_toobig);
+ icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu);
+ }
freeBSD now uses nd6_output_ifp for a similar job. and i want to import it to netbsd so we can use it for that.
https://github.com/freebsd/freebsd-src/blob/main/sys/netinet6/nd6.c#L2184
Emmanuel
Home |
Main Index |
Thread Index |
Old Index