From 7f923a8bb1df682ac7dc488d37da4e2ba54cc4c2 Mon Sep 17 00:00:00 2001 From: msmith Date: Thu, 17 Jul 1997 09:21:34 +0000 Subject: Fix Julian's fixed fix. Routing is weird. We need to accept at least one sockaddr with zero length, in order to be able to set the default route. Suggested by: Phone conversation with Julian (sleep well!) --- sys/net/rtsock.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/net/rtsock.c') diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index c7c4894..f9e1b06 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 - * $Id: rtsock.c,v 1.28 1997/07/15 23:25:32 julian Exp $ + * $Id: rtsock.c,v 1.29 1997/07/16 14:55:14 julian Exp $ */ @@ -529,6 +529,11 @@ rt_xaddrs(cp, cplim, rtinfo) */ if ( (cp + sa->sa_len) > cplim ) return; + + /* accept it */ + rtinfo->rti_info[i] = sa; + ADVANCE(cp, sa); + /* * there are no more.. quit now * If there are more bits, they are in error. @@ -537,8 +542,6 @@ rt_xaddrs(cp, cplim, rtinfo) */ if (sa->sa_len == 0) return; - rtinfo->rti_info[i] = sa; - ADVANCE(cp, sa); } } -- cgit v1.1