From e4720a7a91e02cfc35d010bb366000cc90a7f6db Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 6 Jan 2014 19:14:46 +0000 Subject: [PATCH] Merge r260319 from stable/10 (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 Approved by: re (gjb) git-svn-id: svn://svn.freebsd.org/base/releng/10.0@260378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/netinet/ip_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 464c8528..2838e76f 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -330,6 +330,12 @@ again: __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 */ -- 2.42.0