In certain cases ip_output() can free our route, so check
for its presence before RTFREE(). Noticed by: ru
This commit is contained in:
parent
d2a09f901a
commit
5e5da86597
@ -210,7 +210,8 @@ in_gif_output(ifp, family, m)
|
||||
|
||||
error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL);
|
||||
|
||||
if ((sc->gif_if.if_flags & IFF_LINK0) == 0) {
|
||||
if (!(sc->gif_if.if_flags & IFF_LINK0) &&
|
||||
sc->gif_ro.ro_rt != NULL) {
|
||||
RTFREE(sc->gif_ro.ro_rt);
|
||||
sc->gif_ro.ro_rt = NULL;
|
||||
}
|
||||
|
@ -218,7 +218,8 @@ in6_gif_output(ifp, family, m)
|
||||
error = ip6_output(m, 0, &sc->gif_ro6, 0, 0, NULL, NULL);
|
||||
#endif
|
||||
|
||||
if ((sc->gif_if.if_flags & IFF_LINK0) == 0) {
|
||||
if (!(sc->gif_if.if_flags & IFF_LINK0) &&
|
||||
sc->gif_ro6.ro_rt != NULL) {
|
||||
RTFREE(sc->gif_ro6.ro_rt);
|
||||
sc->gif_ro6.ro_rt = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user