This patch fixes an invalid cast and wrong use of the segments_left field in the routing header in ip6rt.c.