[ovs-dev] [PATCH] cfm: Always initialize CCM "internal_ms_x" extension field.
Ben Pfaff
blp at nicira.com
Wed Jul 11 21:48:51 UTC 2012
On Wed, Jul 11, 2012 at 03:29:01PM -0500, Ethan Jackson wrote:
> Looks good to me. I don't think this should cause any bugs btw. What
> will happen is in non-extended mode some junk will be shoved in the
> zero section of the CCM. Shouldn't cause any problems, but of course
> it's best not to do this.
I agree.
> Will you please backport this to the appropriate branches?
Done. Pushed to master, branch-1.[7654].
> Thanks,
> Ethan
>
> On Tue, Jul 10, 2012 at 4:52 PM, Ben Pfaff <blp at nicira.com> wrote:
> > Found by valgrind:
> >
> > Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to uninitialised
> > byte(s)
> > at 0x42D3021: sendmsg (in /lib/libc-2.5.so)
> > by 0x80E4D23: nl_sock_transact (netlink-socket.c:670)
> > by 0x80D9086: dpif_linux_execute__ (dpif-linux.c:872)
> > by 0x807D6AE: dpif_execute__ (dpif.c:957)
> > by 0x807D6FE: dpif_execute (dpif.c:987)
> > by 0x805DED9: send_packet (ofproto-dpif.c:4727)
> > by 0x805F8E1: port_run_fast (ofproto-dpif.c:2441)
> > by 0x8065CF6: run_fast (ofproto-dpif.c:926)
> > by 0x805674F: ofproto_run_fast (ofproto.c:1148)
> > by 0x804C957: bridge_run_fast (bridge.c:1980)
> > by 0x8053F49: main (ovs-vswitchd.c:123)
> > Address 0xbea0895c is on thread 1's stack
> >
> > Bug #11797.
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > lib/cfm.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/cfm.c b/lib/cfm.c
> > index 670f037..543d4b4 100644
> > --- a/lib/cfm.c
> > +++ b/lib/cfm.c
> > @@ -462,6 +462,8 @@ cfm_compose_ccm(struct cfm *cfm, struct ofpbuf *packet,
> > if (cfm->ccm_interval == 0) {
> > assert(cfm->extended);
> > ccm->interval_ms_x = htons(cfm->ccm_interval_ms);
> > + } else {
> > + ccm->interval_ms_x = htons(0);
> > }
> >
> > if (hmap_is_empty(&cfm->remote_mps)) {
More information about the dev
mailing list