diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2009-01-27 12:45:53 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2009-01-27 12:45:53 +0000 |
commit | 8f2fc20f3ba00bb276645c2fcfbb9486df16dc66 (patch) | |
tree | 82f62065d59e5ca4d8e2096c89426e1e6c7be6e0 /usr.sbin/ospfd/rde.c | |
parent | 291d0f926abce78ea3f1927acfc6968297ee5fdc (diff) |
No need to check if neighbor exists before adding it
as it is already done in rde_nbr_new().
ok claudio@ stsp@
Diffstat (limited to 'usr.sbin/ospfd/rde.c')
-rw-r--r-- | usr.sbin/ospfd/rde.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index 11d782c1d64..2e90bb51ed9 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.76 2009/01/07 21:16:36 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.77 2009/01/27 12:45:52 michele Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -270,10 +270,9 @@ rde_dispatch_imsg(int fd, short event, void *bula) fatalx("invalid size of OE request"); memcpy(&rn, imsg.data, sizeof(rn)); - if (rde_nbr_find(imsg.hdr.peerid)) + if (rde_nbr_new(imsg.hdr.peerid, &rn) == NULL) fatalx("rde_dispatch_imsg: " "neighbor already exists"); - rde_nbr_new(imsg.hdr.peerid, &rn); break; case IMSG_NEIGHBOR_DOWN: rde_nbr_del(rde_nbr_find(imsg.hdr.peerid)); |