summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-28 14:14:40 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-28 14:14:40 +0000
commit13e8370e951b0f98f53aaec1eb7f2ca1ab17a106 (patch)
tree2bf98e129fc34bcb56290a8a9feb14d52e9d0919 /sys/netinet/ip_icmp.c
parent1a439092a5c231540051a3ffb68dcf3fbceec96d (diff)
Explicitly initialize rti_ifa when automagically adding a route.
This will allow to strengthen checks when userland adds a route. ok phessler@, bluhm@
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 392728490b3..d5507922af0 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.156 2016/11/16 12:48:19 bluhm Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.157 2016/11/28 14:14:39 mpi Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -954,6 +954,7 @@ icmp_mtudisc_clone(struct in_addr dst, u_int rtableid)
struct sockaddr_rtlabel sa_rl;
memset(&info, 0, sizeof(info));
+ info.rti_ifa = rt->rt_ifa;
info.rti_flags = RTF_GATEWAY | RTF_HOST | RTF_DYNAMIC;
info.rti_info[RTAX_DST] = sintosa(&sin);
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;