1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Don't allow duplicate sticky routes.

This commit is contained in:
Brian Somers 1998-05-06 00:38:55 +00:00
parent c57a7a001f
commit 183df580c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35765

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: route.c,v 1.42.2.21 1998/05/01 19:25:46 brian Exp $
* $Id: route.c,v 1.42.2.22 1998/05/05 23:30:12 brian Exp $
*
*/
@ -485,7 +485,8 @@ route_Add(struct sticky_route **rp, int type, struct in_addr dst,
r = NULL;
while (*rp) {
if (dsttype && dsttype == ((*rp)->type & ROUTE_DSTANY)) {
if ((dsttype && dsttype == ((*rp)->type & ROUTE_DSTANY)) ||
(!dsttype && (*rp)->dst.s_addr == dst.s_addr)) {
r = *rp;
*rp = r->next;
} else