summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-03-11 17:50:19 +0000
committeriedowse <iedowse@FreeBSD.org>2001-03-11 17:50:19 +0000
commit1fa96ee9e34f143d25f182282d5d911c0b3c7359 (patch)
tree0f2f7e9459b106da88b71af8095ace40acf070c5 /sys/netinet/ip_output.c
parent085bf061f4a31f74f526a820fce3707829403c9b (diff)
downloadFreeBSD-src-1fa96ee9e34f143d25f182282d5d911c0b3c7359.zip
FreeBSD-src-1fa96ee9e34f143d25f182282d5d911c0b3c7359.tar.gz
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" <fm@astral.ntu-kpi.kiev.ua> Reviewed by: luigi, joe
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index eaac560..bca751d 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 ;
OpenPOWER on IntegriCloud