On Mon, Jan 24, 2011 at 04:59:46PM -0800, Matthew Dempsky wrote:
> On Mon, Jan 24, 2011 at 03:43:30PM +0000, Federico G. Schwindt wrote:
> > +--- net/socket.c.orig      Mon Jan 24 15:34:58 2011
> > ++++ net/socket.c   Mon Jan 24 15:35:01 2011
> > +@@ -195,7 +195,7 @@ static int net_socket_mcast_create(struct sockaddr_in 
> > +     /* Force mcast msgs to loopback (eg. several QEMUs in same host */
> > +     val = 1;
> > +     ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
> > +-                   (const char *)&val, sizeof(val));
> > ++                   (const char *)&val, sizeof(char));
> > +     if (ret < 0) {
> > +   perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
> > +   goto fail;
> 
> Won't this break on sparc64, since it's a big-endian architecture?

  likely, so better stick with adding a full new var.
  fwiw, i think we should relax the check in the kernel to do m->m_len < 1
rather than != 1 and ignore any trailing garbage.
  it seems noone except us is so strict wrt the size which leads to
unnecessary patches imho.
  btw, ipv6 uses an int for the IPV6_MULTICAST_LOOP.

  f.-

Reply via email to