From: HuKeping Subject: [PATCH] rtnetlink.3: tfix Date: Mon, 5 Sep 2016 14:54:59 +0800 Message-ID: <1473058499-23820-1-git-send-email-hukeping@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Sender: linux-man-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org, herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org, chamaken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org, fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org, elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-man@vger.kernel.org It seems that the structure in this example doesn't have a field named n. Signed-off-by: Hu Keping --- man3/rtnetlink.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3 index 143be57..430206d 100644 --- a/man3/rtnetlink.3 +++ b/man3/rtnetlink.3 @@ -113,7 +113,7 @@ Creating a rtnetlink message to set the MTU of a device: NLMSG_ALIGN(req.nh.nlmsg_len)); rta\->rta_type = IFLA_MTU; rta\->rta_len = RTA_LENGTH(sizeof(unsigned int)); - req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + + req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0); -- 2.8.0.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html