Merge r260188 from head:

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
This commit is contained in:
glebius 2014-01-05 13:55:33 +00:00
parent c0b3920273
commit e3ce8ac51c

View File

@ -330,6 +330,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
*/