Fix regression from r249894. Now we pass "gw" as argument to if_output

method, thus for multicast case we need it to point at "dst".

PR:		185395
Submitted by:	ae
This commit is contained in:
Gleb Smirnoff 2014-01-02 10:18:39 +00:00
parent ea0c377602
commit 183e1c8634
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260188

View File

@ -332,6 +332,12 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
__func__, mtu, rte, (rte != NULL) ? rte->rt_flags : 0, ifp));
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
m->m_flags |= M_MCAST;
/*
* IP destination address is multicast. Make sure "gw"
* still points to the address in "ro". (It may have been
* changed to point to a gateway address, above.)
*/
gw = dst;
/*
* See if the caller provided any multicast options
*/