diff options
author | remi <remi@cvs.openbsd.org> | 2019-11-19 09:55:56 +0000 |
---|---|---|
committer | remi <remi@cvs.openbsd.org> | 2019-11-19 09:55:56 +0000 |
commit | cea85d84ff22d7cf8a4adec920fd884f7fb9fa1e (patch) | |
tree | 809be98bf6167a38c8d084c84041a9864af9e4b1 /usr.sbin/ospfd/rde.c | |
parent | ae53f24837ad40760b9857c9b7d924e577dc69a9 (diff) |
Add point-to-point support for broadcast interfaces.
tested by Kapetanakis Giannis
ok claudio@
Diffstat (limited to 'usr.sbin/ospfd/rde.c')
-rw-r--r-- | usr.sbin/ospfd/rde.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index 6ff3edc9183..040ba4545a9 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.109 2018/02/05 12:11:28 remi Exp $ */ +/* $OpenBSD: rde.c,v 1.110 2019/11/19 09:55:55 remi Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -257,6 +257,7 @@ rde_dispatch_imsg(int fd, short event, void *bula) struct timespec tp; struct lsa *lsa; struct area *area; + struct in_addr addr; struct vertex *v; char *buf; ssize_t n; @@ -301,6 +302,17 @@ rde_dispatch_imsg(int fd, short event, void *bula) case IMSG_NEIGHBOR_DOWN: rde_nbr_del(rde_nbr_find(imsg.hdr.peerid)); break; + case IMSG_NEIGHBOR_ADDR: + if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(addr)) + fatalx("invalid size of OE request"); + memcpy(&addr, imsg.data, sizeof(addr)); + + nbr = rde_nbr_find(imsg.hdr.peerid); + if (nbr == NULL) + break; + + nbr->addr.s_addr = addr.s_addr; + break; case IMSG_NEIGHBOR_CHANGE: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(state)) fatalx("invalid size of OE request"); |