diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-14 19:16:30 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-14 19:16:30 +0000 |
commit | e3b513de4ec799d4a1f7ffd194bb46d09802724c (patch) | |
tree | dfb87a626f3f67d867554d53466f3fa63c8996de | |
parent | c756999a4765c3e2fa2ee2a06318f47408de1b53 (diff) |
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
-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 a5426076f4..de9976ba21 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-06-10 Joel Sherrill <joel.sherrilL@OARcorp.com> PR 1812/filesystem diff --git a/cpukit/libnetworking/netinet/ip_output.c b/cpukit/libnetworking/netinet/ip_output.c index 5acc801133..e864bb2589 100644 --- a/cpukit/libnetworking/netinet/ip_output.c +++ b/cpukit/libnetworking/netinet/ip_output.c @@ -163,6 +163,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 |