diff options
author | fenner <fenner@FreeBSD.org> | 1997-02-04 03:14:35 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1997-02-04 03:14:35 +0000 |
commit | 7f032dd55e9623c58e9b189ba912e8abfb6270a4 (patch) | |
tree | f2489302f8cc8a921dcb718707645782430606b2 /sys/net | |
parent | e82ed605eae5965eb94555be9a71f76720235439 (diff) | |
download | FreeBSD-src-7f032dd55e9623c58e9b189ba912e8abfb6270a4.zip FreeBSD-src-7f032dd55e9623c58e9b189ba912e8abfb6270a4.tar.gz |
Make sure we have arguments to pass before calling ifaof_ifpforaddr
and ifa_ifwithroute.
This eliminates the panic seen in kern/2647, although it doesn't
address the fact that RTM_CHANGE can't change flags.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/rtsock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index b6684c4..a1fbc0d 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -278,12 +278,12 @@ route_output(m, so) flags may also be different; ifp may be specified by ll sockaddr when protocol address is ambiguous */ if (ifpaddr && (ifa = ifa_ifwithnet(ifpaddr)) && - (ifp = ifa->ifa_ifp)) + (ifp = ifa->ifa_ifp) && (ifaaddr || gate)) ifa = ifaof_ifpforaddr(ifaaddr ? ifaaddr : gate, ifp); else if ((ifaaddr && (ifa = ifa_ifwithaddr(ifaaddr))) || - (ifa = ifa_ifwithroute(rt->rt_flags, - rt_key(rt), gate))) + (gate && (ifa = ifa_ifwithroute(rt->rt_flags, + rt_key(rt), gate)))) ifp = ifa->ifa_ifp; if (ifa) { register struct ifaddr *oifa = rt->rt_ifa; |