diff options
author | rik <rik@FreeBSD.org> | 2004-12-23 22:03:32 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2004-12-23 22:03:32 +0000 |
commit | 9cd8396061808a32518fcb7e287437308d5ef937 (patch) | |
tree | 384e6aac5aabfc6cfffa0b5164fa0dc01909e623 | |
parent | ad001884ff6cbc05a9f5e58050acce3ffa92531a (diff) | |
download | FreeBSD-src-9cd8396061808a32518fcb7e287437308d5ef937.zip FreeBSD-src-9cd8396061808a32518fcb7e287437308d5ef937.tar.gz |
Fix creation on "dlciX" hook in ng_sample.
Approved by: julian
MFC after: 3 days
-rw-r--r-- | sys/netgraph/ng_sample.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c index 93eb736..db5755b 100644 --- a/sys/netgraph/ng_sample.c +++ b/sys/netgraph/ng_sample.c @@ -216,10 +216,11 @@ ng_xxx_newhook(node_p node, hook_p hook, const char *name) break; if (chan == XXX_NUM_DLCIS) { for (chan = 0; chan < XXX_NUM_DLCIS; chan++) - if (xxxp->channel[chan].dlci != -2) - continue; + if (xxxp->channel[chan].dlci == -2) + break; if (chan == XXX_NUM_DLCIS) return (ENOBUFS); + xxxp->channel[chan].dlci = dlci; } if (xxxp->channel[chan].hook != NULL) return (EADDRINUSE); |