Remove now unneeded arguments to tcp_twrespond() -- so and msrc. These

were needed by the MAC Framework until inpcbs gained labels.

Submitted by:	sam
This commit is contained in:
Robert Watson 2004-02-28 15:12:20 +00:00
parent c2a4d8794a
commit a7b6a14aee
5 changed files with 7 additions and 23 deletions

View file

@ -3177,7 +3177,7 @@ tcp_timewait(tw, to, th, m, tlen)
*/
if (thflags != TH_ACK || tlen != 0 ||
th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt)
tcp_twrespond(tw, NULL, m, TH_ACK);
tcp_twrespond(tw, TH_ACK);
goto drop;
reset:

View file

@ -3177,7 +3177,7 @@ tcp_timewait(tw, to, th, m, tlen)
*/
if (thflags != TH_ACK || tlen != 0 ||
th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt)
tcp_twrespond(tw, NULL, m, TH_ACK);
tcp_twrespond(tw, TH_ACK);
goto drop;
reset:

View file

@ -1608,7 +1608,7 @@ tcp_twstart(tp)
tw->tw_cred = crhold(so->so_cred);
tw->tw_so_options = so->so_options;
if (acknow)
tcp_twrespond(tw, so, NULL, TH_ACK);
tcp_twrespond(tw, TH_ACK);
sotryfree(so);
inp->inp_socket = NULL;
inp->inp_ppcb = (caddr_t)tw;
@ -1671,13 +1671,8 @@ tcp_twclose(struct tcptw *tw, int reuse)
return (NULL);
}
/*
* One of so and msrc must be non-NULL for use by the MAC Framework to
* construct a label for ay resulting packet.
*/
int
tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
int flags)
tcp_twrespond(struct tcptw *tw, int flags)
{
struct inpcb *inp = tw->tw_inpcb;
struct tcphdr *th;
@ -1691,9 +1686,6 @@ tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
int isipv6 = inp->inp_inc.inc_isipv6;
#endif
KASSERT(so != NULL || msrc != NULL,
("tcp_twrespond: so and msrc NULL"));
m = m_gethdr(M_DONTWAIT, MT_HEADER);
if (m == NULL)
return (ENOBUFS);

View file

@ -1608,7 +1608,7 @@ tcp_twstart(tp)
tw->tw_cred = crhold(so->so_cred);
tw->tw_so_options = so->so_options;
if (acknow)
tcp_twrespond(tw, so, NULL, TH_ACK);
tcp_twrespond(tw, TH_ACK);
sotryfree(so);
inp->inp_socket = NULL;
inp->inp_ppcb = (caddr_t)tw;
@ -1671,13 +1671,8 @@ tcp_twclose(struct tcptw *tw, int reuse)
return (NULL);
}
/*
* One of so and msrc must be non-NULL for use by the MAC Framework to
* construct a label for ay resulting packet.
*/
int
tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
int flags)
tcp_twrespond(struct tcptw *tw, int flags)
{
struct inpcb *inp = tw->tw_inpcb;
struct tcphdr *th;
@ -1691,9 +1686,6 @@ tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
int isipv6 = inp->inp_inc.inc_isipv6;
#endif
KASSERT(so != NULL || msrc != NULL,
("tcp_twrespond: so and msrc NULL"));
m = m_gethdr(M_DONTWAIT, MT_HEADER);
if (m == NULL)
return (ENOBUFS);

View file

@ -539,7 +539,7 @@ struct inpcb *
tcp_quench(struct inpcb *, int);
void tcp_respond(struct tcpcb *, void *,
struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int);
int tcp_twrespond(struct tcptw *, struct socket *, struct mbuf *, int);
int tcp_twrespond(struct tcptw *, int);
void tcp_setpersist(struct tcpcb *);
#ifdef TCP_SIGNATURE
int tcp_signature_compute(struct mbuf *, int, int, int, u_char *, u_int);