If condition not working for ethenet shield?

Maybe you're running out of RAM, but from the snippet posted, who can tell?