diff options
author | 2015-10-25 11:58:11 +0000 | |
---|---|---|
committer | 2015-10-25 11:58:11 +0000 | |
commit | dcb17c31bf7404748e80f11c1acaec2123371507 (patch) | |
tree | c478650cab74ff7f4d1a794f3afd8fdf9597587a /sys/net | |
parent | backout; many issues remain... (diff) | |
download | wireguard-openbsd-dcb17c31bf7404748e80f11c1acaec2123371507.tar.xz wireguard-openbsd-dcb17c31bf7404748e80f11c1acaec2123371507.zip |
Introduce if_rtrequest() the successor of ifa_rtrequest().
L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''. Not having to care about an ``ifa'' makes our life easier
in our MP effort. Fewer dependencies between data structures implies
fewer headaches.
Discussed with bluhm@, ok claudio@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 11 | ||||
-rw-r--r-- | sys/net/if_ethersubr.c | 20 | ||||
-rw-r--r-- | sys/net/if_gif.c | 5 | ||||
-rw-r--r-- | sys/net/if_gre.c | 5 | ||||
-rw-r--r-- | sys/net/if_loop.c | 10 | ||||
-rw-r--r-- | sys/net/if_ppp.c | 4 | ||||
-rw-r--r-- | sys/net/if_pppoe.c | 3 | ||||
-rw-r--r-- | sys/net/if_pppx.c | 5 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 5 | ||||
-rw-r--r-- | sys/net/if_var.h | 12 | ||||
-rw-r--r-- | sys/net/route.c | 18 | ||||
-rw-r--r-- | sys/net/rtsock.c | 10 |
13 files changed, 61 insertions, 51 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 2e24c4f5296..019b6d7d419 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.394 2015/10/24 10:52:05 reyk Exp $ */ +/* $OpenBSD: if.c,v 1.395 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -520,6 +520,7 @@ if_attach_common(struct ifnet *ifp) M_TEMP, M_WAITOK); TAILQ_INIT(ifp->if_detachhooks); + ifp->if_rtrequest = if_rtrequest_dummy; ifp->if_slowtimo = malloc(sizeof(*ifp->if_slowtimo), M_TEMP, M_WAITOK|M_ZERO); ifp->if_watchdogtask = malloc(sizeof(*ifp->if_watchdogtask), @@ -1273,14 +1274,18 @@ ifaof_ifpforaddr(struct sockaddr *addr, struct ifnet *ifp) return (ifa_maybe); } +void +if_rtrequest_dummy(struct ifnet *ifp, int req, struct rtentry *rt) +{ +} + /* * Default action when installing a local route on a point-to-point * interface. */ void -p2p_rtrequest(int req, struct rtentry *rt) +p2p_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt) { - struct ifnet *ifp = rt->rt_ifp; struct ifaddr *ifa, *lo0ifa; switch (req) { diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 0274d0009a1..9b4e7ada1f5 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.229 2015/10/22 15:37:47 bluhm Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.230 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -161,6 +161,23 @@ ether_ioctl(struct ifnet *ifp, struct arpcom *arp, u_long cmd, caddr_t data) return (error); } + +void +ether_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt) +{ + switch (rt_key(rt)->sa_family) { + case AF_INET: + arp_rtrequest(ifp, req, rt); + break; +#ifdef INET6 + case AF_INET6: + nd6_rtrequest(ifp, req, rt); + break; +#endif + default: + break; + } +} /* * Ethernet output routine. * Encapsulate a packet of type family for the local net. @@ -505,6 +522,7 @@ ether_ifattach(struct ifnet *ifp) ifp->if_hdrlen = ETHER_HDR_LEN; ifp->if_mtu = ETHERMTU; ifp->if_output = ether_output; + ifp->if_rtrequest = ether_rtrequest; if_ih_insert(ifp, ether_input, NULL); diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 65c8d08d123..92398947e40 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.80 2015/09/28 08:32:05 mpi Exp $ */ +/* $OpenBSD: if_gif.c,v 1.81 2015/10/25 11:58:11 mpi Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -120,6 +120,7 @@ gif_clone_create(struct if_clone *ifc, int unit) sc->gif_if.if_ioctl = gif_ioctl; sc->gif_if.if_start = gif_start; sc->gif_if.if_output = gif_output; + sc->gif_if.if_rtrequest = p2p_rtrequest; sc->gif_if.if_type = IFT_GIF; IFQ_SET_MAXLEN(&sc->gif_if.if_snd, IFQ_MAXLEN); IFQ_SET_READY(&sc->gif_if.if_snd); @@ -326,7 +327,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct gif_softc *sc = (struct gif_softc*)ifp; struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; int error = 0, size; struct sockaddr *dst, *src; struct sockaddr *sa; @@ -335,7 +335,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa->ifa_rtrequest = p2p_rtrequest; break; case SIOCSIFDSTADDR: diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 93035a15124..767e8fb886b 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.75 2015/07/16 16:12:15 mpi Exp $ */ +/* $OpenBSD: if_gre.c,v 1.76 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -132,6 +132,7 @@ gre_clone_create(struct if_clone *ifc, int unit) sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST; sc->sc_if.if_output = gre_output; sc->sc_if.if_ioctl = gre_ioctl; + sc->sc_if.if_rtrequest = p2p_rtrequest; sc->sc_if.if_collisions = 0; sc->sc_if.if_ierrors = 0; sc->sc_if.if_oerrors = 0; @@ -436,7 +437,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; struct if_laddrreq *lifr = (struct if_laddrreq *)data; struct ifkalivereq *ikar = (struct ifkalivereq *)data; struct gre_softc *sc = ifp->if_softc; @@ -450,7 +450,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch(cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - ifa->ifa_rtrequest = p2p_rtrequest; break; case SIOCSIFDSTADDR: break; diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 8caaf6a255a..be1e31f62e8 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.71 2015/09/12 13:34:12 mpi Exp $ */ +/* $OpenBSD: if_loop.c,v 1.72 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -168,6 +168,7 @@ loop_clone_create(struct if_clone *ifc, int unit) ifp->if_softc = NULL; ifp->if_mtu = LOMTU; ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST; + ifp->if_rtrequest = lortrequest; ifp->if_ioctl = loioctl; ifp->if_output = looutput; ifp->if_type = IFT_LOOP; @@ -217,7 +218,7 @@ looutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, /* ARGSUSED */ void -lortrequest(int cmd, struct rtentry *rt) +lortrequest(struct ifnet *ifp, int cmd, struct rtentry *rt) { if (rt && rt->rt_rmx.rmx_mtu == 0) rt->rt_rmx.rmx_mtu = LOMTU; @@ -230,7 +231,6 @@ lortrequest(int cmd, struct rtentry *rt) int loioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - struct ifaddr *ifa; struct ifreq *ifr; int error = 0; @@ -239,10 +239,6 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: ifp->if_flags |= IFF_RUNNING; if_up(ifp); /* send up RTM_IFINFO */ - - ifa = (struct ifaddr *)data; - if (ifa != 0) - ifa->ifa_rtrequest = lortrequest; /* * Everything else is done at a higher level. */ diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 4c85df2ab51..3d4827bba20 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.90 2015/10/12 13:17:58 dlg Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.91 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -223,6 +223,7 @@ ppp_clone_create(struct if_clone *ifc, int unit) sc->sc_if.if_ioctl = pppsioctl; sc->sc_if.if_output = pppoutput; sc->sc_if.if_start = ppp_ifstart; + sc->sc_if.if_rtrequest = p2p_rtrequest; IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN); mq_init(&sc->sc_inq, IFQ_MAXLEN, IPL_NET); IFQ_SET_MAXLEN(&sc->sc_fastq, IFQ_MAXLEN); @@ -593,7 +594,6 @@ pppsioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: if (ifa->ifa_addr->sa_family != AF_INET) error = EAFNOSUPPORT; - ifa->ifa_rtrequest = p2p_rtrequest; break; case SIOCSIFDSTADDR: diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index 33aab112b62..da2c09cc23c 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.48 2015/09/13 17:53:44 mpi Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.49 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -228,6 +228,7 @@ pppoe_clone_create(struct if_clone *ifc, int unit) sc->sc_sppp.pp_framebytes = PPPOE_HEADERLEN; /* framing added to ppp packets */ sc->sc_sppp.pp_if.if_ioctl = pppoe_ioctl; sc->sc_sppp.pp_if.if_start = pppoe_start; + sc->sc_sppp.pp_if.if_rtrequest = p2p_rtrequest; sc->sc_sppp.pp_tls = pppoe_tls; sc->sc_sppp.pp_tlf = pppoe_tlf; IFQ_SET_MAXLEN(&sc->sc_sppp.pp_if.if_snd, IFQ_MAXLEN); diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index d88e92f5008..c6a9d980191 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.43 2015/09/06 12:59:20 kettenis Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.44 2015/10/25 11:58:11 mpi Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -832,6 +832,7 @@ pppx_add_session(struct pppx_dev *pxd, struct pipex_session_req *req) ifp->if_start = pppx_if_start; ifp->if_output = pppx_if_output; ifp->if_ioctl = pppx_if_ioctl; + ifp->if_rtrequest = p2p_rtrequest; ifp->if_type = IFT_PPP; IFQ_SET_MAXLEN(&ifp->if_snd, 1); IFQ_SET_READY(&ifp->if_snd); @@ -1069,12 +1070,10 @@ pppx_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) { struct pppx_if *pxi = (struct pppx_if *)ifp->if_softc; struct ifreq *ifr = (struct ifreq *)addr; - struct ifaddr *ifa = (struct ifaddr *)addr; int error = 0; switch (cmd) { case SIOCSIFADDR: - ifa->ifa_rtrequest = p2p_rtrequest; break; case SIOCSIFFLAGS: diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index afaa7e9ed9f..f444339adf7 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.142 2015/10/24 11:58:46 mpi Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.143 2015/10/25 11:58:11 mpi Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -871,7 +871,6 @@ int sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct ifreq *ifr = data; - struct ifaddr *ifa = data; struct sppp *sp = (struct sppp*) ifp; int s, rv, going_up, going_down, newmode; @@ -884,7 +883,6 @@ sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data) case SIOCSIFADDR: if_up(ifp); - ifa->ifa_rtrequest = p2p_rtrequest; /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index d52dc4bb2b0..84041b75d64 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.157 2015/10/24 04:12:24 dlg Exp $ */ +/* $OpenBSD: if_tun.c,v 1.158 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -219,6 +219,7 @@ tun_create(struct if_clone *ifc, int unit, int flags) ifp->if_flags = IFF_POINTOPOINT; ifp->if_type = IFT_TUNNEL; ifp->if_hdrlen = sizeof(u_int32_t); + ifp->if_rtrequest = p2p_rtrequest; if_attach(ifp); if_alloc_sadl(ifp); @@ -506,8 +507,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) default: break; } - } else { - ifa->ifa_rtrequest = p2p_rtrequest; } break; case SIOCSIFDSTADDR: diff --git a/sys/net/if_var.h b/sys/net/if_var.h index af1c8a5b7d7..4c169c18dba 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.50 2015/10/24 10:52:05 reyk Exp $ */ +/* $OpenBSD: if_var.h,v 1.51 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -129,6 +129,8 @@ struct ifnet { /* and the entries */ struct hook_desc_head *if_addrhooks; /* address change callbacks */ struct hook_desc_head *if_linkstatehooks; /* link change callbacks */ struct hook_desc_head *if_detachhooks; /* detach callbacks */ + /* check or clean routes (+ or -)'d */ + void (*if_rtrequest)(struct ifnet *, int, struct rtentry *); char if_xname[IFNAMSIZ]; /* external name (name + unit) */ int if_pcount; /* number of promiscuous listeners */ caddr_t if_bpf; /* packet filter structure */ @@ -213,8 +215,6 @@ struct ifaddr { struct sockaddr *ifa_netmask; /* used to determine subnet */ struct ifnet *ifa_ifp; /* back-pointer to interface */ TAILQ_ENTRY(ifaddr) ifa_list; /* list of addresses for interface */ - /* check or clean routes (+ or -)'d */ - void (*ifa_rtrequest)(int, struct rtentry *); u_int ifa_flags; /* interface flags, see below */ u_int ifa_refcnt; /* number of `rt_ifa` references */ int ifa_metric; /* cost of going out this interface */ @@ -408,6 +408,8 @@ void if_start(struct ifnet *); int if_enqueue(struct ifnet *, struct mbuf *); void if_input(struct ifnet *, struct mbuf_list *); int if_input_local(struct ifnet *, struct mbuf *, sa_family_t); +void if_rtrequest_dummy(struct ifnet *, int, struct rtentry *); +void p2p_rtrequest(struct ifnet *, int, struct rtentry *); void ether_ifattach(struct ifnet *); void ether_ifdetach(struct ifnet *); @@ -415,6 +417,7 @@ int ether_ioctl(struct ifnet *, struct arpcom *, u_long, caddr_t); int ether_input(struct ifnet *, struct mbuf *, void *); int ether_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); +void ether_rtrequest(struct ifnet *, int, struct rtentry *); char *ether_sprintf(u_char *); struct ifaddr *ifa_ifwithaddr(struct sockaddr *, u_int); @@ -422,7 +425,6 @@ struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *, u_int); struct ifaddr *ifa_ifwithnet(struct sockaddr *, u_int); struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); void ifafree(struct ifaddr *); -void p2p_rtrequest(int, struct rtentry *); void if_clone_attach(struct if_clone *); void if_clone_detach(struct if_clone *); @@ -440,7 +442,7 @@ int loioctl(struct ifnet *, u_long, caddr_t); void loopattach(int); int looutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); -void lortrequest(int, struct rtentry *); +void lortrequest(struct ifnet *, int, struct rtentry *); void ifa_add(struct ifnet *, struct ifaddr *); void ifa_del(struct ifnet *, struct ifaddr *); diff --git a/sys/net/route.c b/sys/net/route.c index 804a33b4071..740cf242852 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.261 2015/10/25 10:05:09 bluhm Exp $ */ +/* $OpenBSD: route.c,v 1.262 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -782,8 +782,7 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio, rt->rt_parent = NULL; rt->rt_flags &= ~RTF_UP; - if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_DELETE, rt); + rt->rt_ifp->if_rtrequest(rt->rt_ifp, RTM_DELETE, rt); atomic_inc_int(&rttrash); if (ret_nrt != NULL) @@ -922,15 +921,14 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio, if ((*ret_nrt)->rt_ifa->ifa_ifp == NULL) { printf("rtrequest1 RTM_RESOLVE: wrong ifa (%p) " "was (%p)\n", ifa, (*ret_nrt)->rt_ifa); - if ((*ret_nrt)->rt_ifa->ifa_rtrequest) - (*ret_nrt)->rt_ifa->ifa_rtrequest( - RTM_DELETE, *ret_nrt); + (*ret_nrt)->rt_ifp->if_rtrequest(rt->rt_ifp, + RTM_DELETE, *ret_nrt); ifafree((*ret_nrt)->rt_ifa); (*ret_nrt)->rt_ifa = ifa; (*ret_nrt)->rt_ifp = ifa->ifa_ifp; ifa->ifa_refcnt++; - if (ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_ADD, *ret_nrt); + (*ret_nrt)->rt_ifp->if_rtrequest(rt->rt_ifp, + RTM_ADD, *ret_nrt); } /* * Copy both metrics and a back pointer to the cloned @@ -978,9 +976,7 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio, pool_put(&rtentry_pool, rt); return (EEXIST); } - - if (ifa->ifa_rtrequest) - ifa->ifa_rtrequest(req, rt); + rt->rt_ifp->if_rtrequest(rt->rt_ifp, req, rt); if ((rt->rt_flags & RTF_CLONING) != 0) { /* clean up any cloned children */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 79a09d8d152..f618995cebb 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.177 2015/10/25 10:05:09 bluhm Exp $ */ +/* $OpenBSD: rtsock.c,v 1.178 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -766,9 +766,8 @@ report: goto flush; if (ifa) { if (rt->rt_ifa != ifa) { - if (rt->rt_ifa->ifa_rtrequest) - rt->rt_ifa->ifa_rtrequest( - RTM_DELETE, rt); + rt->rt_ifp->if_rtrequest( + rt->rt_ifp, RTM_DELETE, rt); ifafree(rt->rt_ifa); rt->rt_ifa = ifa; ifa->ifa_refcnt++; @@ -832,8 +831,7 @@ report: rtm->rtm_index = rt->rt_ifidx; rtm->rtm_priority = rt->rt_priority & RTP_MASK; rtm->rtm_flags = rt->rt_flags; - if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest) - rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt); + rt->rt_ifp->if_rtrequest(rt->rt_ifp, RTM_ADD, rt); if (info.rti_info[RTAX_LABEL] != NULL) { char *rtlabel = ((struct sockaddr_rtlabel *) info.rti_info[RTAX_LABEL])->sr_label; |