|
@@ -148,7 +148,16 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m,
|
|
|
m->m_data += IF_MAXLINKHDR;
|
|
|
*mtod(m, struct tcpiphdr *) = *ti;
|
|
|
ti = mtod(m, struct tcpiphdr *);
|
|
|
- memset(&ti->ti, 0, sizeof(ti->ti));
|
|
|
+ switch (af) {
|
|
|
+ case AF_INET:
|
|
|
+ ti->ti.ti_i4.ih_x1 = 0;
|
|
|
+ break;
|
|
|
+ case AF_INET6:
|
|
|
+ ti->ti.ti_i6.ih_x1 = 0;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ g_assert_not_reached();
|
|
|
+ }
|
|
|
flags = TH_ACK;
|
|
|
} else {
|
|
|
/*
|