On 2013/11/19 02:38, Brad Smith wrote:
> ----- Original message -----
> > On Sat, 2 Nov 2013, Joel Sing wrote:
> > > The following diff updates go/lang go 1.2rc3 - this is going to be very
> > > close to the final 1.2 release, however we might as well get this in
> > > now as it is generally better than the 1.1.1 release and it fixes a
> > > regression introduced by the recent route message version change.
> > > 
> > > Passes regress on i386 and amd64, although the API version checks fail
> > > (as to be expected).
> > > 
> > > ok?
> > 
> > Anyone? The 1.2rc5 release is now out, which only requires a VERSION and 
> > checksum update from the below diff. Is there any interest, or do I sit
> > on it   until 1.2 is released in early December?
> 
> Wait for the 1.2 (final) release.

Normally I'd lean towards waiting until final release, but it would be
good to have the fixes for bridge/vlan syscalls and route messages sooner,
and as it's already been tested this way, it seems to make more sense to
me than backporting..

About ParseRoutingMessage, though:

:  // ParseRoutingMessage parses b as routing messages and returns the
:  // slice containing the RoutingMessage interfaces.
:  func ParseRoutingMessage(b []byte) (msgs []RoutingMessage, err error) {
:       for len(b) >= anyMessageLen {
:               any := (*anyMessage)(unsafe.Pointer(&b[0]))
: +             if any.Version == RTM_VERSION - 1 {
: +                     b = b[any.Msglen:]
: +                     continue
: +             }
:               if any.Version != RTM_VERSION {
:                       return nil, EINVAL
:               }
:               msgs = append(msgs, any.toRoutingMessage(b))
:               b = b[any.Msglen:]
:       }
:       return msgs, nil
:  }

..shouldn't it skip over routing messages of any incorrect version,
rather than just skipping RTM_VERSION - 1 and failing with EINVAL for
others? At least, that's the way we handle it in route/netstat etc.


Reply via email to