From 5d936aa181dd8b8a3d0a30cd1a41d1983719546e Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Sun, 11 Mar 2001 17:50:19 +0000 Subject: [PATCH] In ip_output(), initialise `ia' in the case where the packet has come from a dummynet pipe. Without this, the code which increments the per-ifaddr stats can dereference an uninitialised pointer. This should make dummynet usable again. Reported by: "Dmitry A. Yanko" Reviewed by: luigi, joe --- sys/netinet/ip_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index eaac5603a984..bca751db281d 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -180,6 +180,7 @@ ip_output(m0, opt, ro, flags, imo) #endif ip = mtod(m, struct ip *); hlen = IP_VHL_HL(ip->ip_vhl) << 2 ; + ia = (struct in_ifaddr *)ro->ro_rt->rt_ifa; goto sendit; } else rule = NULL ;