diff options
author | harti <harti@FreeBSD.org> | 2003-07-15 15:48:10 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-15 15:48:10 +0000 |
commit | 3f80813372ee6100b0e58b5d0d3e7b89808eb003 (patch) | |
tree | 2916f5f4c5fa0cdfb36aae7f93f15715d4e80dcb /sys/netgraph/atm | |
parent | 9eb1765de539d648c26db8a73a120dbd0f6fae8b (diff) | |
download | FreeBSD-src-3f80813372ee6100b0e58b5d0d3e7b89808eb003.zip FreeBSD-src-3f80813372ee6100b0e58b5d0d3e7b89808eb003.tar.gz |
Test the OPEN flag to see whether a VCI is already open on the hook instead
to look for vci != 0. We can now open VCI 0 for monitoring purposes.
Diffstat (limited to 'sys/netgraph/atm')
-rw-r--r-- | sys/netgraph/atm/ng_atm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/atm/ng_atm.c b/sys/netgraph/atm/ng_atm.c index 8ef0f53..1a11ef9 100644 --- a/sys/netgraph/atm/ng_atm.c +++ b/sys/netgraph/atm/ng_atm.c @@ -612,7 +612,7 @@ ng_atm_cpcs_init(node_p node, const struct ngm_atm_cpcs_init *arg) break; if (vcc == NULL) return (ENOTCONN); - if (vcc->vci != 0) + if (vcc->flags & VCC_OPEN) return (EISCONN); /* @@ -770,7 +770,7 @@ ng_atm_cpcs_term(node_p node, const struct ngm_atm_cpcs_term *arg) break; if (vcc == NULL) return (ENOTCONN); - if (vcc->vci == 0) + if (!(vcc->flags & VCC_OPEN)) return (ENOTCONN); error = cpcs_term(priv, vcc->vpi, vcc->vci); |