Ignore:
Timestamp:
Aug 6, 2009, 11:17:00 PM (11 years ago)
Author:
Sam Hocevar
Message:

Allow remote network host filtering, courtesy of Corentin Delorme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-fd.c

    r3634 r3635  
    11/*
    22 *  zzuf - general purpose fuzzer
    3  *  Copyright (c) 2006, 2007 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2006-2009 Sam Hocevar <sam@hocevar.net>
    44 *                2007 Rémi Denis-Courmont <rdenis#simphalempin:com>
    55 *                2007 Clément Stenac <zorglub#diwi:org>
    66 *                2007 Dominik Kuhlen <dominik.kuhlen#gmit-gmbh:de>
     7 *                2009 Corentin Delorme <codelorme@gmail.com>
    78 *                All Rights Reserved
    89 *
     
    352353    LOADSYM(recv);
    353354    ret = ORIG(recv)(s, buf, len, flags);
    354     if(!_zz_ready || !_zz_iswatched(s) || _zz_islocked(s) || !_zz_isactive(s))
     355    if(!_zz_ready || !_zz_iswatched(s) || !_zz_hostwatched(s)
     356         || _zz_islocked(s) || !_zz_isactive(s))
    355357        return ret;
    356358
     
    385387    LOADSYM(recvfrom);
    386388    ret = ORIG(recvfrom)(s, buf, len, flags, from, fromlen);
    387     if(!_zz_ready || !_zz_iswatched(s) || _zz_islocked(s) || !_zz_isactive(s))
     389    if(!_zz_ready || !_zz_iswatched(s) || !_zz_hostwatched(s)
     390         || _zz_islocked(s) || !_zz_isactive(s))
    388391        return ret;
    389392
     
    425428    LOADSYM(recvmsg);
    426429    ret = ORIG(recvmsg)(s, hdr, flags);
    427     if(!_zz_ready || !_zz_iswatched(s) || _zz_islocked(s) || !_zz_isactive(s))
     430    if(!_zz_ready || !_zz_iswatched(s) || !_zz_hostwatched(s)
     431         || _zz_islocked(s) || !_zz_isactive(s))
    428432        return ret;
    429433
     
    445449    LOADSYM(read);
    446450    ret = ORIG(read)(fd, buf, count);
    447     if(!_zz_ready || !_zz_iswatched(fd) || _zz_islocked(fd)
    448          || !_zz_isactive(fd))
     451    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_hostwatched(fd)
     452         || _zz_islocked(fd) || !_zz_isactive(fd))
    449453        return ret;
    450454
Note: See TracChangeset for help on using the changeset viewer.