svn commit: r274317 - in projects/routing/sys: dev/iicbus dev/lmc dev/ppbus dev/usb/net dev/wtap net net80211 netgraph netinet netinet6 netpfil/ipfw netpfil/pf ofed/drivers/infiniband/ulp/ipoib
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Nov 9 16:33:17 UTC 2014
Author: melifaro
Date: Sun Nov 9 16:33:04 2014
New Revision: 274317
URL: https://svnweb.freebsd.org/changeset/base/274317
Log:
Replace 'struct route *' if_output() argument with 'struct nhop_info *'.
Leave 'struct route' as is for legacy routing api users.
Remove most of rtalloc_ign*-derived functions.
Modified:
projects/routing/sys/dev/iicbus/if_ic.c
projects/routing/sys/dev/lmc/if_lmc.c
projects/routing/sys/dev/lmc/if_lmc.h
projects/routing/sys/dev/ppbus/if_plip.c
projects/routing/sys/dev/usb/net/if_usie.c
projects/routing/sys/dev/usb/net/uhso.c
projects/routing/sys/dev/wtap/if_wtapvar.h
projects/routing/sys/net/ethernet.h
projects/routing/sys/net/if_arc.h
projects/routing/sys/net/if_arcsubr.c
projects/routing/sys/net/if_atm.h
projects/routing/sys/net/if_atmsubr.c
projects/routing/sys/net/if_dead.c
projects/routing/sys/net/if_disc.c
projects/routing/sys/net/if_enc.c
projects/routing/sys/net/if_ethersubr.c
projects/routing/sys/net/if_faith.c
projects/routing/sys/net/if_fddisubr.c
projects/routing/sys/net/if_fwsubr.c
projects/routing/sys/net/if_gif.c
projects/routing/sys/net/if_gif.h
projects/routing/sys/net/if_gre.c
projects/routing/sys/net/if_iso88025subr.c
projects/routing/sys/net/if_lagg.c
projects/routing/sys/net/if_lagg.h
projects/routing/sys/net/if_loop.c
projects/routing/sys/net/if_me.c
projects/routing/sys/net/if_spppsubr.c
projects/routing/sys/net/if_stf.c
projects/routing/sys/net/if_tun.c
projects/routing/sys/net/if_var.h
projects/routing/sys/net/iso88025.h
projects/routing/sys/net/radix_mpath.c
projects/routing/sys/net/route.c
projects/routing/sys/net/route.h
projects/routing/sys/net/rt_nhops.c
projects/routing/sys/net/rt_nhops.h
projects/routing/sys/net/rtsock.c
projects/routing/sys/net80211/ieee80211.c
projects/routing/sys/net80211/ieee80211_output.c
projects/routing/sys/net80211/ieee80211_proto.h
projects/routing/sys/net80211/ieee80211_var.h
projects/routing/sys/netgraph/ng_iface.c
projects/routing/sys/netinet/ip_var.h
projects/routing/sys/netinet6/in6_rmx.c
projects/routing/sys/netinet6/in6_var.h
projects/routing/sys/netinet6/nd6.c
projects/routing/sys/netinet6/nd6_nbr.c
projects/routing/sys/netpfil/ipfw/ip_fw_log.c
projects/routing/sys/netpfil/pf/if_pflog.c
projects/routing/sys/netpfil/pf/if_pfsync.c
projects/routing/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
Modified: projects/routing/sys/dev/iicbus/if_ic.c
==============================================================================
--- projects/routing/sys/dev/iicbus/if_ic.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/iicbus/if_ic.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -101,7 +101,7 @@ static int icattach(device_t);
static int icioctl(struct ifnet *, u_long, caddr_t);
static int icoutput(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
static int icintr(device_t, int, char *);
@@ -352,7 +352,7 @@ icintr(device_t dev, int event, char *pt
*/
static int
icoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct ic_softc *sc = ifp->if_softc;
device_t icdev = sc->ic_dev;
Modified: projects/routing/sys/dev/lmc/if_lmc.c
==============================================================================
--- projects/routing/sys/dev/lmc/if_lmc.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/lmc/if_lmc.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -3637,7 +3637,7 @@ lmc_ifnet_start(struct ifnet *ifp)
/* Called from a syscall (user context; no spinlocks). */
static int
lmc_raw_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
{
softc_t *sc = IFP2SC(ifp);
int error = 0;
Modified: projects/routing/sys/dev/lmc/if_lmc.h
==============================================================================
--- projects/routing/sys/dev/lmc/if_lmc.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/lmc/if_lmc.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -1365,7 +1365,7 @@ static int lmc_raw_ioctl(struct ifnet *,
static int lmc_ifnet_ioctl(struct ifnet *, u_long, caddr_t);
static void lmc_ifnet_start(struct ifnet *);
static int lmc_raw_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static void setup_ifnet(struct ifnet *);
static int lmc_ifnet_attach(softc_t *);
static void lmc_ifnet_detach(softc_t *);
Modified: projects/routing/sys/dev/ppbus/if_plip.c
==============================================================================
--- projects/routing/sys/dev/ppbus/if_plip.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/ppbus/if_plip.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -175,7 +175,7 @@ static u_char *ctxmith;
static int lpinittables(void);
static int lpioctl(struct ifnet *, u_long, caddr_t);
static int lpoutput(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
static void lpstop(struct lp_data *);
static void lp_intr(void *);
static int lp_module_handler(module_t, int, void *);
@@ -683,7 +683,7 @@ lpoutbyte(u_char byte, int spin, device_
static int
lpoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct lp_data *sc = ifp->if_softc;
device_t dev = sc->sc_dev;
Modified: projects/routing/sys/dev/usb/net/if_usie.c
==============================================================================
--- projects/routing/sys/dev/usb/net/if_usie.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/usb/net/if_usie.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -126,7 +126,7 @@ static void usie_if_status_cb(void *, in
static void usie_if_start(struct ifnet *);
static int usie_if_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static void usie_if_init(void *);
static void usie_if_stop(struct usie_softc *);
static int usie_if_ioctl(struct ifnet *, u_long, caddr_t);
@@ -1187,7 +1187,7 @@ usie_if_start(struct ifnet *ifp)
static int
usie_if_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
int err;
Modified: projects/routing/sys/dev/usb/net/uhso.c
==============================================================================
--- projects/routing/sys/dev/usb/net/uhso.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/usb/net/uhso.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -471,7 +471,7 @@ static void uhso_if_start(struct ifnet *
static void uhso_if_stop(struct uhso_softc *);
static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t);
static int uhso_if_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static void uhso_if_rxflush(void *);
static device_probe_t uhso_probe;
@@ -1883,7 +1883,7 @@ uhso_if_init(void *priv)
static int
uhso_if_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
int error;
Modified: projects/routing/sys/dev/wtap/if_wtapvar.h
==============================================================================
--- projects/routing/sys/dev/wtap/if_wtapvar.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/dev/wtap/if_wtapvar.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -138,7 +138,8 @@ struct wtap_softc {
(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]);
void (*sc_node_free)(struct ieee80211_node *);
int (*if_output) /* output routine (enqueue) */
- (struct ifnet *, struct mbuf *, struct sockaddr *, struct route *);
+ (struct ifnet *, struct mbuf *, struct sockaddr *,
+ struct nhop_info *);
void (*if_input) (struct ifnet *, struct mbuf *);/* from h/w driver */
int (*if_transmit)(struct ifnet *, struct mbuf *);/* output routine */
struct mtx sc_mtx; /* master lock (recursive) */
Modified: projects/routing/sys/net/ethernet.h
==============================================================================
--- projects/routing/sys/net/ethernet.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/ethernet.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -365,7 +365,7 @@ struct ether_addr {
struct ifnet;
struct mbuf;
-struct route;
+struct nhop_info;
struct sockaddr;
struct bpf_if;
@@ -376,7 +376,7 @@ extern void ether_ifattach(struct ifnet
extern void ether_ifdetach(struct ifnet *);
extern int ether_ioctl(struct ifnet *, u_long, caddr_t);
extern int ether_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
extern int ether_output_frame(struct ifnet *, struct mbuf *);
extern char *ether_sprintf(const u_int8_t *);
void ether_vlan_mtap(struct bpf_if *, struct mbuf *,
Modified: projects/routing/sys/net/if_arc.h
==============================================================================
--- projects/routing/sys/net/if_arc.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_arc.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -133,7 +133,7 @@ void arc_storelladdr(struct ifnet *, u_i
int arc_isphds(u_int8_t);
void arc_input(struct ifnet *, struct mbuf *);
int arc_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
int arc_ioctl(struct ifnet *, u_long, caddr_t);
void arc_frag_init(struct ifnet *);
Modified: projects/routing/sys/net/if_arcsubr.c
==============================================================================
--- projects/routing/sys/net/if_arcsubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_arcsubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -96,7 +96,7 @@ u_int8_t arcbroadcastaddr = 0;
*/
int
arc_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct arc_header *ah;
int error;
Modified: projects/routing/sys/net/if_atm.h
==============================================================================
--- projects/routing/sys/net/if_atm.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_atm.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -293,7 +293,7 @@ void atm_ifdetach(struct ifnet *);
void atm_input(struct ifnet *, struct atm_pseudohdr *,
struct mbuf *, void *);
int atm_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
struct atmio_vcctable *atm_getvccs(struct atmio_vcc **, u_int, u_int,
struct mtx *, int);
Modified: projects/routing/sys/net/if_atmsubr.c
==============================================================================
--- projects/routing/sys/net/if_atmsubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_atmsubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -123,7 +123,7 @@ static MALLOC_DEFINE(M_IFATM, "ifatm", "
*/
int
atm_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
u_int16_t etype = 0; /* if using LLC/SNAP */
int error = 0, sz;
Modified: projects/routing/sys/net/if_dead.c
==============================================================================
--- projects/routing/sys/net/if_dead.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_dead.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
static int
ifdead_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa,
- struct route *ro)
+ struct nhop_info *ni)
{
m_freem(m);
Modified: projects/routing/sys/net/if_disc.c
==============================================================================
--- projects/routing/sys/net/if_disc.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_disc.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -67,7 +67,7 @@ struct disc_softc {
};
static int discoutput(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static int discioctl(struct ifnet *, u_long, caddr_t);
static int disc_clone_create(struct if_clone *, int, caddr_t);
static void disc_clone_destroy(struct ifnet *);
@@ -174,7 +174,7 @@ DECLARE_MODULE(if_disc, disc_mod, SI_SUB
static int
discoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
u_int32_t af;
Modified: projects/routing/sys/net/if_enc.c
==============================================================================
--- projects/routing/sys/net/if_enc.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_enc.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -89,7 +89,7 @@ struct enc_softc {
static int enc_ioctl(struct ifnet *, u_long, caddr_t);
static int enc_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro);
+ const struct sockaddr *dst, struct nhop_info *ni);
static int enc_clone_create(struct if_clone *, int, caddr_t);
static void enc_clone_destroy(struct ifnet *);
static struct if_clone *enc_cloner;
@@ -190,7 +190,7 @@ DECLARE_MODULE(if_enc, enc_mod, SI_SUB_P
static int
enc_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
m_freem(m);
return (0);
Modified: projects/routing/sys/net/if_ethersubr.c
==============================================================================
--- projects/routing/sys/net/if_ethersubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_ethersubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -121,7 +121,7 @@ static void ether_reassign(struct ifnet
#endif
int ether_output_full(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro);
+ const struct sockaddr *dst, struct nhop_info *ni);
int ether_output2(struct ifnet *ifp, struct mbuf *m, struct nhop_prepend *nh,
int af);
@@ -151,13 +151,12 @@ update_mbuf_csumflags(struct mbuf *src,
int
ether_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
{
- if (ro != NULL && (ro->ro_flags & RT_NHOP))
- return (ether_output2(ifp, m, (struct nhop_prepend *)ro->ro_lle,
- (ro->ro_flags >> 8) & 0xFF));
+ if (ni != NULL && (ni->ni_flags & RT_NHOP))
+ return (ether_output2(ifp, m, ni->ni_nh, ni->ni_family));
- return (ether_output_full(ifp, m, dst, ro));
+ return (ether_output_full(ifp, m, dst, NULL));
}
/*
@@ -168,7 +167,7 @@ ether_output(struct ifnet *ifp, struct m
*/
int
ether_output_full(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
{
short type;
int error = 0, hdrcmplt = 0;
@@ -180,11 +179,13 @@ ether_output_full(struct ifnet *ifp, str
int loop_copy = 1;
int hlen; /* link layer header length */
+#if 0
if (ro != NULL) {
if (!(m->m_flags & (M_BCAST | M_MCAST)))
lle = ro->ro_lle;
rt0 = ro->ro_rt;
}
+#endif
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error)
Modified: projects/routing/sys/net/if_faith.c
==============================================================================
--- projects/routing/sys/net/if_faith.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_faith.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -87,7 +87,7 @@ struct faith_softc {
static int faithioctl(struct ifnet *, u_long, caddr_t);
static int faithoutput(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
#ifdef INET6
static int faithprefix(struct in6_addr *);
#endif
@@ -187,7 +187,7 @@ faith_clone_destroy(ifp)
static int
faithoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
int isr;
u_int32_t af;
@@ -195,8 +195,6 @@ faithoutput(struct ifnet *ifp, struct mb
M_ASSERTPKTHDR(m);
- if (ro != NULL)
- rt = ro->ro_rt;
/* BPF writes need to be handled specially. */
if (dst->sa_family == AF_UNSPEC)
bcopy(dst->sa_data, &af, sizeof(af));
Modified: projects/routing/sys/net/if_fddisubr.c
==============================================================================
--- projects/routing/sys/net/if_fddisubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_fddisubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -82,7 +82,7 @@ static const u_char fddibroadcastaddr[FD
static int fddi_resolvemulti(struct ifnet *, struct sockaddr **,
struct sockaddr *);
static int fddi_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
static void fddi_input(struct ifnet *ifp, struct mbuf *m);
#define senderr(e) do { error = (e); goto bad; } while (0)
@@ -95,7 +95,7 @@ static void fddi_input(struct ifnet *ifp
*/
static int
fddi_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
u_int16_t type;
int loop_copy = 0, error = 0, hdrcmplt = 0;
@@ -121,11 +121,8 @@ fddi_output(struct ifnet *ifp, struct mb
switch (dst->sa_family) {
#ifdef INET
case AF_INET: {
- struct rtentry *rt0 = NULL;
-
- if (ro != NULL)
- rt0 = ro->ro_rt;
- error = arpresolve(ifp, rt0, m, dst, edst, &lle);
+ /* XXX: Pass is_gw flag */
+ error = arpresolve(ifp, NULL, m, dst, edst, &lle);
if (error)
return (error == EWOULDBLOCK ? 0 : error);
type = htons(ETHERTYPE_IP);
Modified: projects/routing/sys/net/if_fwsubr.c
==============================================================================
--- projects/routing/sys/net/if_fwsubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_fwsubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -77,7 +77,7 @@ struct fw_hwaddr firewire_broadcastaddr
static int
firewire_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct fw_com *fc = IFP2FWC(ifp);
int error, type;
@@ -140,7 +140,8 @@ firewire_output(struct ifnet *ifp, struc
* doesn't fit into the arp model.
*/
if (unicast) {
- error = arpresolve(ifp, ro ? ro->ro_rt : NULL, m, dst, (u_char *) destfw, &lle);
+ /* XXX: Pass is_gw flag */
+ error = arpresolve(ifp, NULL, m, dst, (u_char *) destfw, &lle);
if (error)
return (error == EWOULDBLOCK ? 0 : error);
}
Modified: projects/routing/sys/net/if_gif.c
==============================================================================
--- projects/routing/sys/net/if_gif.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_gif.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -450,7 +450,7 @@ gif_qflush(struct ifnet *ifp __unused)
int
gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct m_tag *mtag;
uint32_t af;
Modified: projects/routing/sys/net/if_gif.h
==============================================================================
--- projects/routing/sys/net/if_gif.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_gif.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -112,7 +112,7 @@ struct etherip_header {
/* Prototypes */
void gif_input(struct mbuf *, struct ifnet *, int, uint8_t);
int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
int gif_encapcheck(const struct mbuf *, int, int, void *);
#endif /* _KERNEL */
Modified: projects/routing/sys/net/if_gre.c
==============================================================================
--- projects/routing/sys/net/if_gre.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_gre.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -112,7 +112,7 @@ static void gre_qflush(struct ifnet *);
static int gre_transmit(struct ifnet *, struct mbuf *);
static int gre_ioctl(struct ifnet *, u_long, caddr_t);
static int gre_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static void gre_updatehdr(struct gre_softc *);
static int gre_set_tunnel(struct ifnet *, struct sockaddr *,
@@ -785,7 +785,7 @@ gre_check_nesting(struct ifnet *ifp, str
static int
gre_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
uint32_t af;
int error;
Modified: projects/routing/sys/net/if_iso88025subr.c
==============================================================================
--- projects/routing/sys/net/if_iso88025subr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_iso88025subr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -203,7 +203,7 @@ iso88025_ioctl(struct ifnet *ifp, u_long
*/
int
iso88025_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
u_int16_t snap_type = 0;
int loop_copy = 0, error = 0, rif_len = 0;
Modified: projects/routing/sys/net/if_lagg.c
==============================================================================
--- projects/routing/sys/net/if_lagg.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_lagg.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -110,7 +110,7 @@ static void lagg_linkstate(struct lagg_s
static void lagg_port_state(struct ifnet *, int);
static int lagg_port_ioctl(struct ifnet *, u_long, caddr_t);
static int lagg_port_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static void lagg_port_ifdetach(void *arg __unused, struct ifnet *);
#ifdef LAGG_PORT_STACKING
static int lagg_port_checkstacking(struct lagg_softc *);
@@ -1065,14 +1065,14 @@ lagg_get_counter(struct ifnet *ifp, ift_
*/
static int
lagg_port_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
{
struct lagg_port *lp = ifp->if_lagg;
switch (dst->sa_family) {
case pseudo_AF_HDRCMPLT:
case AF_UNSPEC:
- return ((*lp->lp_output)(ifp, m, dst, ro));
+ return ((*lp->lp_output)(ifp, m, dst, ni));
}
/* drop any other frames */
Modified: projects/routing/sys/net/if_lagg.h
==============================================================================
--- projects/routing/sys/net/if_lagg.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_lagg.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -260,7 +260,7 @@ struct lagg_port {
/* Redirected callbacks */
int (*lp_ioctl)(struct ifnet *, u_long, caddr_t);
int (*lp_output)(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
struct lagg_counters port_counters; /* ifp counters copy */
SLIST_ENTRY(lagg_port) lp_entries;
Modified: projects/routing/sys/net/if_loop.c
==============================================================================
--- projects/routing/sys/net/if_loop.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_loop.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -54,7 +54,6 @@
#include <net/if_types.h>
#include <net/netisr.h>
#include <net/route.h>
-#include <net/route_internal.h>
#include <net/bpf.h>
#include <net/vnet.h>
@@ -71,6 +70,8 @@
#include <netinet/ip6.h>
#endif
+#include <net/rt_nhops.h>
+
#include <security/mac/mac_framework.h>
#ifdef TINY_LOMTU
@@ -90,7 +91,7 @@
int loioctl(struct ifnet *, u_long, caddr_t);
int looutput(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro);
+ const struct sockaddr *dst, struct nhop_info *ni);
static int lo_clone_create(struct if_clone *, int, caddr_t);
static void lo_clone_destroy(struct ifnet *);
@@ -200,18 +201,24 @@ DECLARE_MODULE(if_lo, loop_mod, SI_SUB_P
int
looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
- u_int32_t af;
- struct rtentry *rt = NULL;
+ uint32_t af;
+ uint32_t nh_flags;
#ifdef MAC
int error;
#endif
M_ASSERTPKTHDR(m); /* check if we have the packet header */
- if (ro != NULL)
- rt = ro->ro_rt;
+ nh_flags = 0;
+ af = AF_UNSPEC;
+ if (ni != NULL && ni->ni_nh != NULL) {
+ nh_flags = ni->ni_nh->nh_flags;
+ af = ni->ni_family;
+ } else if (dst != NULL)
+ af = dst->sa_family;
+
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error) {
@@ -220,20 +227,18 @@ looutput(struct ifnet *ifp, struct mbuf
}
#endif
- if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
+ if (nh_flags & (NHF_REJECT | NHF_BLACKHOLE)) {
m_freem(m);
- return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
- rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
+ /* XXX: RTF_HOST */
+ return (nh_flags & NHF_BLACKHOLE ? 0 : EHOSTUNREACH);
}
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);
/* BPF writes need to be handled specially. */
- if (dst->sa_family == AF_UNSPEC)
+ if (af == AF_UNSPEC && dst != NULL)
bcopy(dst->sa_data, &af, sizeof(af));
- else
- af = dst->sa_family;
#if 1 /* XXX */
switch (af) {
Modified: projects/routing/sys/net/if_me.c
==============================================================================
--- projects/routing/sys/net/if_me.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_me.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -120,7 +120,7 @@ static void me_qflush(struct ifnet *);
static int me_transmit(struct ifnet *, struct mbuf *);
static int me_ioctl(struct ifnet *, u_long, caddr_t);
static int me_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
static int me_input(struct mbuf **, int *, int);
static int me_set_tunnel(struct ifnet *, struct sockaddr_in *,
@@ -500,7 +500,7 @@ me_check_nesting(struct ifnet *ifp, stru
static int
me_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
uint32_t af;
int error;
Modified: projects/routing/sys/net/if_spppsubr.c
==============================================================================
--- projects/routing/sys/net/if_spppsubr.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_spppsubr.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -257,7 +257,7 @@ static const u_short interactive_ports[8
int debug = ifp->if_flags & IFF_DEBUG
static int sppp_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro);
+ const struct sockaddr *dst, struct nhop_info *ni);
static void sppp_cisco_send(struct sppp *sp, int type, long par1, long par2);
static void sppp_cisco_input(struct sppp *sp, struct mbuf *m);
@@ -767,7 +767,7 @@ sppp_ifstart(struct ifnet *ifp)
*/
static int
sppp_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct sppp *sp = IFP2SP(ifp);
struct ppp_header *h;
Modified: projects/routing/sys/net/if_stf.c
==============================================================================
--- projects/routing/sys/net/if_stf.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_stf.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -176,7 +176,7 @@ static int stfmodevent(module_t, int, vo
static int stf_encapcheck(const struct mbuf *, int, int, void *);
static int stf_getsrcifa6(struct ifnet *, struct in6_addr *, struct in6_addr *);
static int stf_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
static int isrfc1918addr(struct in_addr *);
static int stf_checkaddr4(struct stf_softc *, struct in_addr *,
struct ifnet *);
@@ -405,7 +405,7 @@ stf_getsrcifa6(struct ifnet *ifp, struct
static int
stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct stf_softc *sc;
const struct sockaddr_in6 *dst6;
Modified: projects/routing/sys/net/if_tun.c
==============================================================================
--- projects/routing/sys/net/if_tun.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_tun.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -126,7 +126,7 @@ static int tunifioctl(struct ifnet *, u_
static void tuninit(struct ifnet *);
static int tunmodevent(module_t, int, void *);
static int tunoutput(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *ro);
+ const struct sockaddr *, struct nhop_info *ni);
static void tunstart(struct ifnet *);
static int tun_clone_create(struct if_clone *, int, caddr_t);
@@ -571,7 +571,7 @@ tunifioctl(struct ifnet *ifp, u_long cmd
*/
static int
tunoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
- struct route *ro)
+ struct nhop_info *ni)
{
struct tun_softc *tp = ifp->if_softc;
u_short cached_tun_flags;
Modified: projects/routing/sys/net/if_var.h
==============================================================================
--- projects/routing/sys/net/if_var.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/if_var.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -64,7 +64,7 @@ struct socket;
struct carp_if;
struct carp_softc;
struct ifvlantrunk;
-struct route; /* if_output */
+struct nhop_info; /* if_output */
struct vnet;
struct ifmedia;
struct netmap_adapter;
@@ -213,7 +213,7 @@ struct ifnet {
/* Various procedures of the layer2 encapsulation and drivers. */
int (*if_output) /* output routine (enqueue) */
(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct route *);
+ struct nhop_info *);
void (*if_input) /* input routine (from h/w driver) */
(struct ifnet *, struct mbuf *);
if_start_fn_t if_start; /* initiate output routine */
Modified: projects/routing/sys/net/iso88025.h
==============================================================================
--- projects/routing/sys/net/iso88025.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/iso88025.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -167,7 +167,7 @@ void iso88025_ifattach (struct ifnet *,
void iso88025_ifdetach (struct ifnet *, int);
int iso88025_ioctl (struct ifnet *, u_long, caddr_t );
int iso88025_output (struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
void iso88025_input (struct ifnet *, struct mbuf *);
#endif /* _KERNEL */
Modified: projects/routing/sys/net/radix_mpath.c
==============================================================================
--- projects/routing/sys/net/radix_mpath.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/radix_mpath.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -198,6 +198,7 @@ rt_mpath_conflict(struct radix_node_head
return (0);
}
+#if 0
void
rtalloc_mpath_fib(struct route *ro, uint32_t hash, u_int fibnum)
{
@@ -257,6 +258,7 @@ rtalloc_mpath_fib(struct route *ro, uint
}
RT_UNLOCK(ro->ro_rt);
}
+#endif
extern int in6_inithead(void **head, int off);
extern int in_inithead(void **head, int off);
Modified: projects/routing/sys/net/route.c
==============================================================================
--- projects/routing/sys/net/route.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/route.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -364,19 +364,10 @@ sys_setfib(struct thread *td, struct set
/*
* Packet routing routines.
*/
-void
-rtalloc(struct route *ro)
-{
-
- rtalloc_ign_fib(ro, 0UL, RT_DEFAULT_FIB);
-}
-
-void
-rtalloc_fib(struct route *ro, u_int fibnum)
-{
- rtalloc_ign_fib(ro, 0UL, fibnum);
-}
+/*
+ * Legacy function for SCTP support.
+ */
void
rtalloc_ign(struct route *ro, u_long ignore)
{
@@ -393,21 +384,6 @@ rtalloc_ign(struct route *ro, u_long ign
RT_UNLOCK(ro->ro_rt);
}
-void
-rtalloc_ign_fib(struct route *ro, u_long ignore, u_int fibnum)
-{
- struct rtentry *rt;
-
- if ((rt = ro->ro_rt) != NULL) {
- if (rt->rt_ifp != NULL && rt->rt_flags & RTF_UP)
- return;
- RTFREE(rt);
- ro->ro_rt = NULL;
- }
- ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, fibnum);
- if (ro->ro_rt)
- RT_UNLOCK(ro->ro_rt);
-}
/*
* Look up the route that matches the address given
Modified: projects/routing/sys/net/route.h
==============================================================================
--- projects/routing/sys/net/route.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/route.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -44,10 +44,7 @@
*/
/*
- * A route consists of a destination address, a reference
- * to a routing entry, and a reference to an llentry.
- * These are often held by protocols in their control
- * blocks, e.g. inpcb.
+ * Legacy structure.
*/
struct route {
struct rtentry *ro_rt;
@@ -57,10 +54,6 @@ struct route {
struct sockaddr ro_dst;
};
-#define RT_CACHING_CONTEXT 0x1 /* XXX: not used anywhere */
-#define RT_NORTREF 0x2 /* doesn't hold reference on ro_rt */
-#define RT_NHOP 0x4
-
struct rt_metrics {
u_long rmx_locks; /* Kernel must leave these values alone */
u_long rmx_mtu; /* MTU for this path */
@@ -109,6 +102,22 @@ VNET_DECLARE(u_int, rt_add_addr_allfibs)
struct rib_head;
struct rtentry;
+struct nhop_prepend;
+
+/*
+ * Structure used to pass prepend information
+ * to if_output() routines.
+ */
+struct nhop_info {
+ struct nhop_prepend *ni_nh; /* MUST be non-NULL */
+ uint32_t ni_flags;
+ uint8_t ni_family;
+ uint8_t spare[3];
+};
+
+#define RT_NHOP 0x01
+#define RT_NORTREF 0x2 /* doesn't hold reference on ro_rt */
+
#if !defined(_KERNEL) || defined(_WANT_RTENTRY)
/* This structure is kept for compatibility reasons only */
struct rtentry {
@@ -316,8 +325,6 @@ int rtsock_routemsg(int, struct ifnet *i
/*
* Note the following locking behavior:
*
- * rtalloc_ign() and rtalloc() return ro->ro_rt unlocked
- *
* rtalloc1() returns a locked rtentry
*
* rtfree() and RTFREE_LOCKED() require a locked rtentry
@@ -338,7 +345,6 @@ void rt_flushifroutes(struct ifnet *ifp)
/* Thes are used by old code not yet converted to use multiple FIBS */
int rt_getifa(struct rt_addrinfo *);
void rtalloc_ign(struct route *ro, u_long ignflags);
-void rtalloc(struct route *ro); /* XXX deprecated, use rtalloc_ign(ro, 0) */
struct rtentry *rtalloc1(struct sockaddr *, int, u_long);
int rtinit(struct ifaddr *, int, int);
int rtioctl(u_long, caddr_t);
@@ -352,8 +358,6 @@ int rtrequest(int, struct sockaddr *,
* but this will change..
*/
int rt_getifa_fib(struct rt_addrinfo *, u_int fibnum);
-void rtalloc_ign_fib(struct route *ro, u_long ignflags, u_int fibnum);
-void rtalloc_fib(struct route *ro, u_int fibnum);
struct rtentry *rtalloc1_fib(struct sockaddr *, int, u_long, u_int);
int rtioctl_fib(u_long, caddr_t, u_int);
void rtredirect_fib(struct sockaddr *, struct sockaddr *,
Modified: projects/routing/sys/net/rt_nhops.c
==============================================================================
--- projects/routing/sys/net/rt_nhops.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/rt_nhops.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -369,18 +369,19 @@ fib4_sendmbuf(struct ifnet *ifp, struct
* TODO: Make special ifnet
* 'if_output_frame' handler for that.
*/
- struct route_compat rc;
+ struct nhop_info ni;
struct ether_header *eh;
- rc.ro_flags = AF_INET << 8 | RT_NHOP;
- rc.ro_nh = nh;
+ bzero(&ni, sizeof(ni));
+ ni.ni_flags = RT_NHOP;
+ ni.ni_family = AF_INET;
+ ni.ni_nh = nh;
M_PREPEND(m, nh->nh_count, M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
eh = mtod(m, struct ether_header *);
memcpy(eh, nh->d.data, nh->nh_count);
- error = (*ifp->if_output)(ifp, m,
- NULL, (struct route *)&rc);
+ error = (*ifp->if_output)(ifp, m, NULL, &ni);
} else {
struct sockaddr_in gw_out;
memset(&gw_out, 0, sizeof(gw_out));
@@ -869,18 +870,19 @@ fib6_sendmbuf(struct ifnet *ifp, struct
* TODO: Make special ifnet
* 'if_output_frame' handler for that.
*/
- struct route_compat rc;
+ struct nhop_info ni;
struct ether_header *eh;
- rc.ro_flags = AF_INET6 << 8 | RT_NHOP;
- rc.ro_nh = nh;
+ bzero(&ni, sizeof(ni));
+ ni.ni_family = AF_INET6;
+ ni.ni_flags = RT_NHOP;
+ ni.ni_nh = nh;
M_PREPEND(m, nh->nh_count, M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
eh = mtod(m, struct ether_header *);
memcpy(eh, nh->d.data, nh->nh_count);
- error = (*ifp->if_output)(ifp, m,
- NULL, (struct route *)&rc);
+ error = (*ifp->if_output)(ifp, m, NULL, &ni);
} else {
/* We need to perform ND lookup */
struct sockaddr_in6 gw_out;
Modified: projects/routing/sys/net/rt_nhops.h
==============================================================================
--- projects/routing/sys/net/rt_nhops.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/rt_nhops.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -113,10 +113,6 @@ struct nhop_multi {
uint16_t nh_nhops[30]; /* Nexthop indexes */
};
-/* Control plane nexthop data */
-struct nhop_info {
-};
-
/* Per-AF per-fib nhop table */
struct nhops_descr {
uint32_t nhop_size; /* Nehthop data size */
@@ -220,13 +216,6 @@ struct route_info {
uint32_t scopeid; /* Desired scope id to use */
};
-struct route_compat {
- struct nhop_prepend *ro_nh;
- void *spare0;
- void *spare1;
- int ro_flags;
-};
-
int fib4_lookup_nh_ifp(uint32_t fibnum, struct in_addr dst, uint32_t flowid,
struct nhop4_basic *pnh4);
int fib4_lookup_nh_basic(uint32_t fibnum, struct in_addr dst, uint32_t flowid,
Modified: projects/routing/sys/net/rtsock.c
==============================================================================
--- projects/routing/sys/net/rtsock.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net/rtsock.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -615,11 +615,13 @@ route_output(struct mbuf *m, struct sock
*/
if (info.rti_info[RTAX_GATEWAY] != NULL &&
info.rti_info[RTAX_GATEWAY]->sa_family != AF_LINK) {
- struct route gw_ro;
-
- bzero(&gw_ro, sizeof(gw_ro));
- gw_ro.ro_dst = *info.rti_info[RTAX_GATEWAY];
- rtalloc_ign_fib(&gw_ro, 0, fibnum);
+ struct rtentry *rt;
+ /* XXX-ME: Is this enough? */
+ struct sockaddr dst;
+
+ bzero(&dst, sizeof(dst));
+ dst = *info.rti_info[RTAX_GATEWAY];
+ rt = rtalloc1_fib(&dst, 0, 0, fibnum);
/*
* A host route through the loopback interface is
* installed for each interface adddress. In pre 8.0
@@ -630,14 +632,13 @@ route_output(struct mbuf *m, struct sock
* AF_LINK sa_family type of the rt_gateway, and the
* rt_ifp has the IFF_LOOPBACK flag set.
*/
- if (gw_ro.ro_rt != NULL &&
- gw_ro.ro_rt->rt_gateway->sa_family == AF_LINK &&
- gw_ro.ro_rt->rt_ifp->if_flags & IFF_LOOPBACK) {
+ if (rt != NULL && rt->rt_gateway->sa_family == AF_LINK &&
+ rt->rt_ifp->if_flags & IFF_LOOPBACK) {
info.rti_flags &= ~RTF_GATEWAY;
info.rti_flags |= RTF_GWFLAG_COMPAT;
}
- if (gw_ro.ro_rt != NULL)
- RTFREE(gw_ro.ro_rt);
+ if (rt != NULL)
+ RTFREE_LOCKED(rt);
}
switch (rtm->rtm_type) {
Modified: projects/routing/sys/net80211/ieee80211.c
==============================================================================
--- projects/routing/sys/net80211/ieee80211.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net80211/ieee80211.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -245,11 +245,11 @@ null_transmit(struct ifnet *ifp, struct
#if __FreeBSD_version >= 1000031
static int
null_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
#else
static int
null_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct route *ro)
+ struct sockaddr *dst, struct nhop_info *ni)
#endif
{
if_printf(ifp, "discard raw packet\n");
Modified: projects/routing/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/routing/sys/net80211/ieee80211_output.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net80211/ieee80211_output.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -510,7 +510,7 @@ ieee80211_raw_output(struct ieee80211vap
#if __FreeBSD_version >= 1000031
int
ieee80211_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni_rt)
#else
int
ieee80211_output(struct ifnet *ifp, struct mbuf *m,
@@ -543,7 +543,7 @@ ieee80211_output(struct ifnet *ifp, stru
* a raw 802.11 frame.
*/
if (dst->sa_family != AF_IEEE80211)
- return vap->iv_output(ifp, m, dst, ro);
+ return vap->iv_output(ifp, m, dst, ni_rt);
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error)
Modified: projects/routing/sys/net80211/ieee80211_proto.h
==============================================================================
--- projects/routing/sys/net80211/ieee80211_proto.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net80211/ieee80211_proto.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -98,7 +98,7 @@ int ieee80211_raw_xmit(struct ieee80211_
const struct ieee80211_bpf_params *);
#if __FreeBSD_version >= 1000031
int ieee80211_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *ro);
+ const struct sockaddr *, struct nhop_info *ni);
#else
int ieee80211_output(struct ifnet *, struct mbuf *,
struct sockaddr *, struct route *ro);
Modified: projects/routing/sys/net80211/ieee80211_var.h
==============================================================================
--- projects/routing/sys/net80211/ieee80211_var.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/net80211/ieee80211_var.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -498,7 +498,7 @@ struct ieee80211vap {
/* 802.3 output method for raw frame xmit */
#if __FreeBSD_version >= 1000031
int (*iv_output)(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct route *);
+ const struct sockaddr *, struct nhop_info *);
#else
int (*iv_output)(struct ifnet *, struct mbuf *,
struct sockaddr *, struct route *);
Modified: projects/routing/sys/netgraph/ng_iface.c
==============================================================================
--- projects/routing/sys/netgraph/ng_iface.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/netgraph/ng_iface.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -120,7 +120,7 @@ typedef struct ng_iface_private *priv_p;
static void ng_iface_start(struct ifnet *ifp);
static int ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
static int ng_iface_output(struct ifnet *ifp, struct mbuf *m0,
- const struct sockaddr *dst, struct route *ro);
+ const struct sockaddr *dst, struct nhop_info *ni);
static void ng_iface_bpftap(struct ifnet *ifp,
struct mbuf *m, sa_family_t family);
static int ng_iface_send(struct ifnet *ifp, struct mbuf *m,
@@ -350,7 +350,7 @@ ng_iface_ioctl(struct ifnet *ifp, u_long
static int
ng_iface_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct route *ro)
+ const struct sockaddr *dst, struct nhop_info *ni)
{
struct m_tag *mtag;
uint32_t af;
Modified: projects/routing/sys/netinet/ip_var.h
==============================================================================
--- projects/routing/sys/netinet/ip_var.h Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/netinet/ip_var.h Sun Nov 9 16:33:04 2014 (r274317)
@@ -171,7 +171,6 @@ void kmod_ipstat_dec(int statnum);
struct ip;
struct inpcb;
-struct route;
struct route_info;
struct sockopt;
Modified: projects/routing/sys/netinet6/in6_rmx.c
==============================================================================
--- projects/routing/sys/netinet6/in6_rmx.c Sun Nov 9 16:20:27 2014 (r274316)
+++ projects/routing/sys/netinet6/in6_rmx.c Sun Nov 9 16:33:04 2014 (r274317)
@@ -292,20 +292,6 @@ in6_rtrequest(int req, struct sockaddr *
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list