Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148717588
D33021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D33021.diff
View Options
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -766,9 +766,7 @@
int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *);
int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *,
u_short *, struct ucred *);
-int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *);
-int in_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, struct ucred *,
- struct mbuf *, bool);
+int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *, bool);
int in_pcbconnect_setup(struct inpcb *, struct sockaddr *, in_addr_t *,
u_short *, in_addr_t *, u_short *, struct inpcb **,
struct ucred *);
@@ -777,7 +775,6 @@
void in_pcbdrop(struct inpcb *);
void in_pcbfree(struct inpcb *);
int in_pcbinshash(struct inpcb *);
-int in_pcbinshash_mbuf(struct inpcb *, struct mbuf *);
int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *,
struct ucred *);
int in_pcblbgroup_numa(struct inpcb *, int arg);
@@ -791,7 +788,6 @@
int, struct inpcb *(*)(struct inpcb *, int));
void in_pcbref(struct inpcb *);
void in_pcbrehash(struct inpcb *);
-void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *);
int in_pcbrele_rlocked(struct inpcb *);
int in_pcbrele_wlocked(struct inpcb *);
void in_losing(struct inpcb *);
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1072,8 +1072,8 @@
* then pick one.
*/
int
-in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam,
- struct ucred *cred, struct mbuf *m, bool rehash)
+in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred,
+ bool rehash)
{
u_short lport, fport;
in_addr_t laddr, faddr;
@@ -1109,9 +1109,9 @@
inp->inp_faddr.s_addr = faddr;
inp->inp_fport = fport;
if (rehash) {
- in_pcbrehash_mbuf(inp, m);
+ in_pcbrehash(inp);
} else {
- in_pcbinshash_mbuf(inp, m);
+ in_pcbinshash(inp);
}
if (anonport)
@@ -1119,13 +1119,6 @@
return (0);
}
-int
-in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
-{
-
- return (in_pcbconnect_mbuf(inp, nam, cred, NULL, true));
-}
-
/*
* Do proper source address selection on an unbound socket in case
* of connect. Take jails into account as well.
@@ -2285,8 +2278,8 @@
/*
* Insert PCB onto various hash lists.
*/
-static int
-in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m)
+int
+in_pcbinshash(struct inpcb *inp)
{
struct inpcbhead *pcbhash;
struct inpcbporthead *pcbporthash;
@@ -2355,20 +2348,6 @@
return (0);
}
-int
-in_pcbinshash(struct inpcb *inp)
-{
-
- return (in_pcbinshash_internal(inp, NULL));
-}
-
-int
-in_pcbinshash_mbuf(struct inpcb *inp, struct mbuf *m)
-{
-
- return (in_pcbinshash_internal(inp, m));
-}
-
/*
* Move PCB to the proper hash bucket when { faddr, fport } have been
* changed. NOTE: This does not handle the case of the lport changing (the
@@ -2376,7 +2355,7 @@
* not change after in_pcbinshash() has been called.
*/
void
-in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m)
+in_pcbrehash(struct inpcb *inp)
{
struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
struct inpcbhead *head;
@@ -2402,13 +2381,6 @@
CK_LIST_INSERT_HEAD(head, inp, inp_hash);
}
-void
-in_pcbrehash(struct inpcb *inp)
-{
-
- in_pcbrehash_mbuf(inp, NULL);
-}
-
/*
* Remove PCB from various lists.
*/
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -943,8 +943,8 @@
laddr = inp->inp_laddr;
if (inp->inp_laddr.s_addr == INADDR_ANY)
inp->inp_laddr = sc->sc_inc.inc_laddr;
- if ((error = in_pcbconnect_mbuf(inp, (struct sockaddr *)&sin,
- thread0.td_ucred, m, false)) != 0) {
+ if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin,
+ thread0.td_ucred, false)) != 0) {
inp->inp_laddr = laddr;
if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) {
log(LOG_DEBUG, "%s; %s: in_pcbconnect failed "
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1697,7 +1697,7 @@
}
NET_EPOCH_ENTER(et);
INP_HASH_WLOCK(pcbinfo);
- error = in_pcbconnect(inp, nam, td->td_ucred);
+ error = in_pcbconnect(inp, nam, td->td_ucred, true);
INP_HASH_WUNLOCK(pcbinfo);
NET_EPOCH_EXIT(et);
if (error == 0)
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -516,9 +516,9 @@
(htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
if (rehash) {
- in_pcbrehash_mbuf(inp, m);
+ in_pcbrehash(inp);
} else {
- in_pcbinshash_mbuf(inp, m);
+ in_pcbinshash(inp);
}
return (0);
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -1215,7 +1215,7 @@
NET_EPOCH_ENTER(et);
INP_HASH_WLOCK(pcbinfo);
error = in_pcbconnect(inp, (struct sockaddr *)&sin,
- td->td_ucred);
+ td->td_ucred, true);
INP_HASH_WUNLOCK(pcbinfo);
NET_EPOCH_EXIT(et);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 20, 7:51 PM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30038175
Default Alt Text
D33021.diff (5 KB)
Attached To
Mode
D33021: inpcb: reduce some aliased functions after removal of PCBGROUP.
Attached
Detach File
Event Timeline
Log In to Comment