From 7e3d4432af8fdbe406cd29e0343bcd1b82b45ffc Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Tue, 5 Aug 2003 14:59:06 +0000 Subject: When adding a channel for INET failed at the device level (ioctl) the code used to call rtrequest(RTM_DELETE, ...). This is a problem, because the function that just has called us (route_output) is not really happy with the route it just is creating beeing ripped out from under it. Unfortunately we also cannot return an error from ifa_rtrequest. Therefore mark the route just as RTF_REJECT. --- sys/netinet/if_atm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c index 322484fe3c12..9156f9163bca 100644 --- a/sys/netinet/if_atm.c +++ b/sys/netinet/if_atm.c @@ -162,8 +162,10 @@ failed: rt->rt_flags &= ~RTF_LLINFO; } #endif - rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, - rt_mask(rt), 0, (struct rtentry **)0); + /* mark as invalid. We cannot RTM_DELETE the route from + * here, because the recursive call to rtrequest1 does + * not really work. */ + rt->rt_flags |= RTF_REJECT; break; case RTM_DELETE: -- cgit v1.3