[Xorp-hackers] xorp svn VRRP centos

Ben Greear greearb at candelatech.com
Thu Feb 25 11:12:03 PST 2010


On 02/25/2010 09:46 AM, Eric S. Johnson wrote:

> --- xorp-svn-20100217.orig/fea/io_link.cc       2010-02-17 10:25:29.000000000 -0500
> +++ xorp-svn-20100217/fea/io_link.cc    2010-02-25 11:12:32.000000000 -0500
> @@ -105,16 +105,17 @@
>       const uint8_t* ptr = packet;
>
>       // Test the received packet size
> -    if (packet_size<  ETHERNET_MIN_FRAME_SIZE) {
> -       XLOG_WARNING("Received packet on interface %s vif %s: "
> -                    "packet is too short "
> -                    "(captured %u expecting at least %u octets)",
> -                    if_name().c_str(),
> -                    vif_name().c_str(),
> -                    XORP_UINT_CAST(packet_size),
> -                    XORP_UINT_CAST(ETHERNET_MIN_FRAME_SIZE));
> -       return;                 // Error
> -    }
> +// ESJ um no... this is the 21st century after all :)
> +//    if (packet_size<  ETHERNET_MIN_FRAME_SIZE) {
> +//     XLOG_WARNING("Received packet on interface %s vif %s: "
> +//                  "packet is too short "
> +//                  "(captured %u expecting at least %u octets)",
> +//                  if_name().c_str(),
> +//                  vif_name().c_str(),
> +//                  XORP_UINT_CAST(packet_size),
> +//                  XORP_UINT_CAST(ETHERNET_MIN_FRAME_SIZE));
> +//     return;                 // Error
> +//   }

We still need to protect against truly bogus packets so we don't run of the
end of the packet buffer and read bogus memory (and probably SEGV).

How about the attached patch?

Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorp-min-ether.patch
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20100225/d63a6023/attachment.ksh 


More information about the Xorp-hackers mailing list