summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormks <mks@FreeBSD.org>1999-01-19 23:16:11 +0000
committermks <mks@FreeBSD.org>1999-01-19 23:16:11 +0000
commit299738cfe463bd576897811afa3500cf4071ca1f (patch)
tree4a86968264404e345ac31c29456e8087247f65f0
parent921f53138df8152d31da7b9760f85e9dccf137b4 (diff)
downloadFreeBSD-src-299738cfe463bd576897811afa3500cf4071ca1f.zip
FreeBSD-src-299738cfe463bd576897811afa3500cf4071ca1f.tar.gz
Prevent duplicate output lines from 'atm show arpserver' command on systems
with multiple ATM physical interfaces.
-rw-r--r--sys/netatm/atm_usrreq.c18
-rw-r--r--sys/netatm/uni/uniarp.c9
2 files changed, 16 insertions, 11 deletions
diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c
index f5699ce..278d9f8 100644
--- a/sys/netatm/atm_usrreq.c
+++ b/sys/netatm/atm_usrreq.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_usrreq.c,v 1.1 1998/09/15 08:22:59 phk Exp $
+ * @(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $
*
*/
@@ -38,7 +38,7 @@
#include <netatm/kern_include.h>
#ifndef lint
-__RCSID("@(#) $Id: atm_usrreq.c,v 1.1 1998/09/15 08:22:59 phk Exp $");
+__RCSID("@(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
#endif
@@ -547,11 +547,17 @@ atm_dgram_info(data)
for (pip = atm_interface_head; pip;
pip = pip->pif_next) {
if (smp = pip->pif_sigmgr) {
- err = (*smp->sm_ioctl)(AIOCS_INF_ASV,
- data, NULL);
+ for (nip = pip->pif_nif; nip;
+ nip = nip->nif_pnext) {
+ err = (*smp->sm_ioctl)
+ (AIOCS_INF_ASV, data,
+ (caddr_t)nip);
+ if (err)
+ break;
+ }
+ if (err)
+ break;
}
- if (err)
- break;
}
}
break;
diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c
index 9aae374..2d6006f 100644
--- a/sys/netatm/uni/uniarp.c
+++ b/sys/netatm/uni/uniarp.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp.c,v 1.3 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -43,7 +43,7 @@
#include <netatm/uni/uniip_var.h>
#ifndef lint
-__RCSID("@(#) $Id: uniarp.c,v 1.3 1998/10/31 20:07:00 phk Exp $");
+__RCSID("@(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
#endif
@@ -1137,14 +1137,14 @@ updbuf:
* Get ARP server information
*/
aip = (struct atminfreq *)data;
+ nip = (struct atm_nif *)arg1;
buf_addr = aip->air_buf_addr;
buf_len = aip->air_buf_len;
for (uip = uniip_head; uip; uip = uip->uip_next) {
- if ((arg1 != NULL) &&
- (uip->uip_ipnif->inf_nif != (struct atm_nif *)arg1))
+ if (uip->uip_ipnif->inf_nif != nip)
continue;
/*
@@ -1158,7 +1158,6 @@ updbuf:
/*
* Fill in info to be returned
*/
- nip = uip->uip_ipnif->inf_nif;
(void) snprintf(asr.asp_intf,
sizeof(asr.asp_intf), "%s%d",
nip->nif_if.if_name, nip->nif_if.if_unit);
OpenPOWER on IntegriCloud