diff options
author | msmith <msmith@FreeBSD.org> | 1997-07-17 09:21:34 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1997-07-17 09:21:34 +0000 |
commit | 7f923a8bb1df682ac7dc488d37da4e2ba54cc4c2 (patch) | |
tree | cbcbd7159bd5448638fddd3ba8f107fddd3b9c46 /sys/net/rtsock.c | |
parent | 9ed136eecde40f38c59cc8538606ba5d05b456d9 (diff) | |
download | FreeBSD-src-7f923a8bb1df682ac7dc488d37da4e2ba54cc4c2.zip FreeBSD-src-7f923a8bb1df682ac7dc488d37da4e2ba54cc4c2.tar.gz |
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!)
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); } } |