On Sat, 30 Jan 2016 15:50:49 +0000
Victor Orlikowski <v...@duke.edu> wrote:

> Sigh. Brown paper bag re-submit, to cover an "off-by-one."
> 
> When using the icmp.dest_unreach and icmp.TimeExceeded classes, we should 
> ensure that it is in compliance with RFC 4884.
> As such, the data_len parameter passed to the constructor of each should be 
> interpreted in 32 bit units.
> Furthermore - any data that is passed in must be zero padded to a 32 bit 
> boundary.
> 
> The only sample application known to use either of these types is rest_router.
> This patch corrects its use of these classes.
> 
> Signed-off-by: Victor J. Orlikowski <v...@duke.edu>
> 
> diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py
> index 30812a7..a0132c1 100644
> --- a/ryu/app/rest_router.py
> +++ b/ryu/app/rest_router.py
> @@ -1523,18 +1523,37 @@ class OfCtl(object):
>          eth = protocol_list[ETHERNET]
>          e = ethernet.ethernet(eth.src, eth.dst, ether_proto)
>  
> +        ip = protocol_list[IPV4]
> +
>          if icmp_data is None and msg_data is not None:
> -            ip_datagram = msg_data[offset:]
> +            # RFC 4884 says that we should send "at least 128 octets"
> +            # if we are using the ICMP Extension Structure.
> +            # We're not using the extension structure, but let's send
> +            # up to 128 bytes of the original msg_data.

The above behavior works with others (OSes, switches, etc)? As you
pointed out, the current code looks broken w.r.t. the original
datagram but it works?

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to