diff options
author | ru <ru@FreeBSD.org> | 1999-12-28 08:38:01 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 1999-12-28 08:38:01 +0000 |
commit | 596bec42bc268dd87d5466b6e594fa2a171b031e (patch) | |
tree | 2869e644f3e6c4f89fbc440397b12f6c8cd7c16f /sys/net/rtsock.c | |
parent | 0f669b4213e06a9194ddc05e8a3a40de7372937d (diff) | |
download | FreeBSD-src-596bec42bc268dd87d5466b6e594fa2a171b031e.zip FreeBSD-src-596bec42bc268dd87d5466b6e594fa2a171b031e.tar.gz |
Make cloning mask sockaddr (genmask) possible.
PR: kern/3061
Reviewed by: wollman
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 0c02e78..bd7bdab 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -318,7 +318,8 @@ route_output(m, so) if (genmask) { struct radix_node *t; t = rn_addmask((caddr_t)genmask, 0, 1); - if (t && Bcmp(genmask, t->rn_key, *(u_char *)genmask) == 0) + if (t && Bcmp((caddr_t *)genmask + 1, (caddr_t *)t->rn_key + 1, + *(u_char *)t->rn_key - 1) == 0) genmask = (struct sockaddr *)(t->rn_key); else senderr(ENOBUFS); |