diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-26 13:35:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-26 13:35:17 +0000 |
commit | 2148e07ae93d0aa4b2092b618b760504a72bb447 (patch) | |
tree | 84ca3bdc78d57befd7d6cd48a1b7caf39802c1e8 /usr.sbin/ospfd/ospfd.c | |
parent | 157fdfd36d3799a3e0ef51e8690303a3e4cdbff8 (diff) |
Implement the IMSG_CTL_IFINFO bits correctly. This is needed for
"ospfctl show fib interface".
OK henning@ norby@
Diffstat (limited to 'usr.sbin/ospfd/ospfd.c')
-rw-r--r-- | usr.sbin/ospfd/ospfd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index dc6ca68b070..c8967e66913 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.12 2005/03/26 11:04:28 henning Exp $ */ +/* $OpenBSD: ospfd.c,v 1.13 2005/03/26 13:35:16 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -338,10 +338,12 @@ main_dispatch_ospfe(int fd, short event, void *bula) kr_show_route(&imsg); break; case IMSG_CTL_IFINFO: - if (imsg.hdr.len != IMSG_HEADER_SIZE + IFNAMSIZ) - log_warnx("IFINFO request with wrong len"); + if (imsg.hdr.len == IMSG_HEADER_SIZE) + kr_ifinfo(NULL, imsg.hdr.pid); + else if (imsg.hdr.len == IMSG_HEADER_SIZE + IFNAMSIZ) + kr_ifinfo(imsg.data, imsg.hdr.pid); else - kr_ifinfo(imsg.data); + log_warnx("IFINFO request with wrong len"); break; default: log_debug("main_dispatch_ospfe: error handling imsg %d", |