summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-02-05 19:09:53 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-02-05 19:09:53 +0000
commit8d6362f5889fbf41b1541f51a5f444e6c67b8bd9 (patch)
tree6c7ee06a6ddef337c9de6e1c10eefdd7f4708143 /sys
parentd341dd8bd04c1d131db421da7d33ef9dd4e354d7 (diff)
Make the inet6 and inet cases in in_pcbrtentry() look similar.
No functional change. OK millert@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/in_pcb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 083787a9d31..0ebac884c68 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.130 2013/02/04 15:10:22 millert Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.131 2013/02/05 19:09:52 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -765,8 +765,7 @@ in_pcbrtentry(struct inpcb *inp)
break;
ro->ro_dst.sa_family = AF_INET6;
ro->ro_dst.sa_len = sizeof(struct sockaddr_in6);
- ((struct sockaddr_in6 *) &ro->ro_dst)->sin6_addr =
- inp->inp_faddr6;
+ satosin6(&ro->ro_dst)->sin6_addr = inp->inp_faddr6;
ro->ro_tableid = inp->inp_rtableid;
rtalloc_mpath(ro, &inp->inp_laddr6.s6_addr32[0]);
break;
@@ -776,8 +775,8 @@ in_pcbrtentry(struct inpcb *inp)
break;
ro->ro_dst.sa_family = AF_INET;
ro->ro_dst.sa_len = sizeof(struct sockaddr_in);
- ro->ro_tableid = inp->inp_rtableid;
satosin(&ro->ro_dst)->sin_addr = inp->inp_faddr;
+ ro->ro_tableid = inp->inp_rtableid;
rtalloc_mpath(ro, &inp->inp_laddr.s_addr);
break;
}