diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-05 00:05:23 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-05 00:05:23 +0000 |
commit | cb0369e615ef56c1da2080a41fa13572d3f8f2d7 (patch) | |
tree | 718fb37e73d1d1dcceefd8a06734132c07956292 /sys/netinet/tcp_usrreq.c | |
parent | 24ee8a36b7e45716d783580adea8ac7467d5bcfc (diff) |
Initial support for routing domains. This allows to bind interfaces to
alternate routing table and separate them from other interfaces in distinct
routing tables. The same network can now be used in any doamin at the same
time without causing conflicts.
This diff is mostly mechanical and adds the necessary rdomain checks accross
net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6.
input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 00997e16a02..facb9830def 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.99 2008/05/24 19:48:32 thib Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.100 2009/06/05 00:05:22 claudio Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -764,12 +764,7 @@ tcp_usrclosed(tp) * Look up a socket for ident or tcpdrop, ... */ int -tcp_ident(oldp, oldlenp, newp, newlen, dodrop) - void *oldp; - size_t *oldlenp; - void *newp; - size_t newlen; - int dodrop; +tcp_ident(void *oldp, size_t *oldlenp, void *newp, size_t newlen, int dodrop) { int error = 0, s; struct tcp_ident_mapping tir; @@ -830,7 +825,7 @@ tcp_ident(oldp, oldlenp, newp, newlen, dodrop) #endif case AF_INET: inp = in_pcbhashlookup(&tcbtable, fin->sin_addr, - fin->sin_port, lin->sin_addr, lin->sin_port); + fin->sin_port, lin->sin_addr, lin->sin_port , tir.rdomain); break; } @@ -855,7 +850,7 @@ tcp_ident(oldp, oldlenp, newp, newlen, dodrop) #endif case AF_INET: inp = in_pcblookup_listen(&tcbtable, - lin->sin_addr, lin->sin_port, 0, NULL); + lin->sin_addr, lin->sin_port, 0, NULL, tir.rdomain); break; } } |