summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libnetworking/netinet')
-rw-r--r--cpukit/libnetworking/netinet/ip_output.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/libnetworking/netinet/ip_output.c b/cpukit/libnetworking/netinet/ip_output.c
index 510f9d046b..cf112de564 100644
--- a/cpukit/libnetworking/netinet/ip_output.c
+++ b/cpukit/libnetworking/netinet/ip_output.c
@@ -167,6 +167,15 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
ifp = ia->ia_ifp;
ip->ip_ttl = 1;
isbroadcast = in_broadcast(dst->sin_addr, ifp);
+ } else if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) &&
+ imo != NULL && imo->imo_multicast_ifp != NULL) {
+ /*
+ * Bypass the normal routing lookup for multicast
+ * packets if the interface is specified.
+ */
+ ifp = imo->imo_multicast_ifp;
+ IFP_TO_IA(ifp, ia);
+ isbroadcast = 0; /* fool gcc */
} else {
/*
* If this is the case, we probably don't want to allocate