rtnetlink.3: tfix

Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
HuKeping 2016-09-05 14:54:59 +08:00 committed by Michael Kerrisk
parent 5e43063bdd
commit 794d8db3ab
1 changed files with 1 additions and 1 deletions

View File

@ -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);