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
This commit is contained in:
Ian Dowse 2001-03-11 17:50:19 +00:00
parent 74169a2c54
commit 5d936aa181

View File

@ -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 ;