diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-14 19:16:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-14 19:16:09 +0000 |
commit | 067489b904f74af62da93425f1195a93ea40d293 (patch) | |
tree | eebcc2f64f9e2c01e11cc7cf738b5173bb30b866 /cpukit | |
parent | 2011-07-14 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff) | |
download | rtems-067489b904f74af62da93425f1195a93ea40d293.tar.bz2 |
2011-07-14 Gene Smith <gene.smith@siemens.com>
PR 1381/networking
* libnetworking/netinet/ip_output.c: If a null or unreachable gateway
is specified either statically in networkconfig.h or from dhcp/bootp,
sendto() fails on multicast send with errno 118 Host
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/libnetworking/netinet/ip_output.c | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 0f8a4fe809..3e09b33ded 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2011-07-14 Gene Smith <gene.smith@siemens.com> + + PR 1381/networking + * libnetworking/netinet/ip_output.c: If a null or unreachable gateway + is specified either statically in networkconfig.h or from dhcp/bootp, + sendto() fails on multicast send with errno 118 Host + 2011-07-13 Till Straumann <strauman@slac.stanford.edu> PR 1775/filesystem 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 |