diff options
author | archie <archie@FreeBSD.org> | 2001-10-10 19:58:11 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 2001-10-10 19:58:11 +0000 |
commit | f60a3082c8ed5159e14299d1d4b0915c844b61a7 (patch) | |
tree | 2792cca8a697c4c19380e2047ebb64ede09d7738 /sys/netgraph | |
parent | 11a08756a607e65e4a808dda5134ce3bcf0c57aa (diff) | |
download | FreeBSD-src-f60a3082c8ed5159e14299d1d4b0915c844b61a7.zip FreeBSD-src-f60a3082c8ed5159e14299d1d4b0915c844b61a7.tar.gz |
Fix bug that cheated hook names out of the last 2 bytes.
MFC after: 3 days
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 87924ce..139aa0e 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -355,8 +355,8 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, * then handle specially. */ if ((sap == NULL) - || ((len = sap->sg_len) <= 2) - || (*sap->sg_data == '\0')) { + || ((len = sap->sg_len - 2) <= 0) + || (*sap->sg_data == '\0')) { if (NG_NODE_NUMHOOKS(pcbp->sockdata->node) != 1) { error = EDESTADDRREQ; goto release; |