~ubuntu-branches/ubuntu/natty/avahi/natty

« back to all changes in this revision

Viewing changes to avahi-core/socket.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-02-24 18:57:28 UTC
  • mfrom: (4.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110224185728-lgwqnrfpactd19py
Tags: 0.6.28-4ubuntu1
* Resynchronise with Debian. Remaining Ubuntu changes:
 - debian/control:
   + Add versioned dependency on the dbus that satisfies our upstart job
     dependency.
   + Add udebs corresponding to libavahi-common3 and libavahi-core6, so
     that we can use them for Eucalyptus integration in the installer.
 - Add debian/avahi-daemon.upstart, debian/avahi-dnsconfd.upstart
 - debian/avahi-autoipd.{pre,post}inst: Adjust package versions for conffile
   migration for the version when Ubuntu did the DHCP4 migration. This needs
   to be kept until after the next LTS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
        goto fail;
654
654
    }
655
655
 
656
 
    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297) */
657
 
    if (!ms)
658
 
        goto fail;
659
 
 
660
656
    p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
661
657
 
662
658
    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
683
679
        goto fail;
684
680
    }
685
681
 
686
 
    if (sa.sin_addr.s_addr == INADDR_ANY) {
 
682
    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
 
683
     * fail after having read them. */
 
684
    if (!ms)
 
685
        goto fail;
 
686
 
 
687
    if (sa.sin_addr.s_addr == INADDR_ANY)
687
688
        /* Linux 2.4 behaves very strangely sometimes! */
688
689
        goto fail;
689
 
    }
690
690
 
691
691
    assert(!(msg.msg_flags & MSG_CTRUNC));
692
692
    assert(!(msg.msg_flags & MSG_TRUNC));
810
810
        goto fail;
811
811
    }
812
812
 
813
 
    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297) */
814
 
    if (!ms)
815
 
        goto fail;
816
 
 
817
813
    p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
818
814
 
819
815
    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
841
837
        goto fail;
842
838
    }
843
839
 
 
840
    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
 
841
     * fail after having read them. */
 
842
    if (!ms)
 
843
        goto fail;
 
844
 
844
845
    assert(!(msg.msg_flags & MSG_CTRUNC));
845
846
    assert(!(msg.msg_flags & MSG_TRUNC));
846
847