X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=lib%2Froute-table.c;h=1afc01d06e75f84222bec25cc74a48f26e1db674;hb=24b7e19469dbd2cb3fdf8db70ef0c7b4bc851f17;hp=d572e8cead64d6211d2a945cfcb76c78f3505f16;hpb=a88b4e04128310d0eb0c3d811782f8619bceb95c;p=sliver-openvswitch.git diff --git a/lib/route-table.c b/lib/route-table.c index d572e8cea..1afc01d06 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -270,7 +270,7 @@ route_table_parse(struct ofpbuf *buf, struct route_table_msg *change) const struct nlmsghdr *nlmsg; nlmsg = buf->data; - rtm = (const struct rtmsg *) ((const char *) buf->data + NLMSG_HDRLEN); + rtm = ofpbuf_at(buf, NLMSG_HDRLEN, sizeof *rtm); if (rtm->rtm_family != AF_INET) { VLOG_DBG_RL(&rl, "received non AF_INET rtnetlink route message");