mirror of https://github.com/mkerrisk/man-pages
rtnetlink.3: tfix
Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
parent
5e43063bdd
commit
794d8db3ab
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue