summaryrefslogtreecommitdiffstats
path: root/sys/net/if_iso88025subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_iso88025subr.c')
-rw-r--r--sys/net/if_iso88025subr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index 2170e0e..5e8382fa 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -243,7 +243,7 @@ iso88025_output(ifp, m, dst, rt0)
struct iso88025_header *th;
struct iso88025_header gen_th;
struct sockaddr_dl *sdl = NULL;
- struct rtentry *rt;
+ struct rtentry *rt = NULL;
#ifdef MAC
error = mac_check_ifnet_transmit(ifp, m);
@@ -260,10 +260,12 @@ iso88025_output(ifp, m, dst, rt0)
/* Calculate routing info length based on arp table entry */
/* XXX any better way to do this ? */
- error = rt_check(&rt, &rt0, dst);
- if (error)
- goto bad;
- RT_UNLOCK(rt);
+ if (rt0 != NULL) {
+ error = rt_check(&rt, &rt0, dst);
+ if (error)
+ goto bad;
+ RT_UNLOCK(rt);
+ }
if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway))
if (SDL_ISO88025(sdl)->trld_rcf != 0)
OpenPOWER on IntegriCloud