summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-08-31 11:05:05 +0000
committermpi <mpi@openbsd.org>2016-08-31 11:05:05 +0000
commitc44d9055dab622b2422cc33060c45b4af3dad2d5 (patch)
tree97f47f79b68429f9aeaf85f436b15117b81f0868 /sys/netinet/tcp_input.c
parentAdd a bunch of regress test to verify the RTM_CHANGE behaviour of mpath (diff)
downloadwireguard-openbsd-c44d9055dab622b2422cc33060c45b4af3dad2d5.tar.xz
wireguard-openbsd-c44d9055dab622b2422cc33060c45b4af3dad2d5.zip
Use 'sc_route{4,6}' directly instead of casting them to 'struct route *'.
This is another little step towards deprecating 'struct route{,_in6}'. ok florian@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 99539691c3f..5a6013c05ef 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.325 2016/07/20 09:15:28 bluhm Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.326 2016/08/31 11:05:05 mpi Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -4148,7 +4148,6 @@ syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th,
int
syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
{
- struct route *ro;
u_int8_t *optp;
int optlen, error;
u_int16_t tlen;
@@ -4163,12 +4162,10 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
switch (sc->sc_src.sa.sa_family) {
case AF_INET:
hlen = sizeof(struct ip);
- ro = &sc->sc_route4;
break;
#ifdef INET6
case AF_INET6:
hlen = sizeof(struct ip6_hdr);
- ro = (struct route *)&sc->sc_route6;
break;
#endif
default:
@@ -4379,14 +4376,14 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
switch (sc->sc_src.sa.sa_family) {
case AF_INET:
- error = ip_output(m, sc->sc_ipopts, ro,
+ error = ip_output(m, sc->sc_ipopts, &sc->sc_route4,
(ip_mtudisc ? IP_MTUDISC : 0), NULL, inp, 0);
break;
#ifdef INET6
case AF_INET6:
ip6->ip6_hlim = in6_selecthlim(inp);
- error = ip6_output(m, NULL /*XXX*/, (struct route_in6 *)ro, 0,
+ error = ip6_output(m, NULL /*XXX*/, &sc->sc_route6, 0,
NULL, NULL);
break;
#endif