OSDN Git Service

(split) LDP: Update original to LDP v3.38.
[linuxjm/LDP_man-pages.git] / original / man3 / rtnetlink.3
index 29d7765..027f668 100644 (file)
@@ -4,7 +4,7 @@
 .\" and in case of nontrivial modification author and date
 .\" of the modification is added to the header.
 .\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $
-.TH RTNETLINK 3 2010-01-11 "GNU" "Linux Programmer's Manual"
+.TH RTNETLINK 3 2012-03-24 "GNU" "Linux Programmer's Manual"
 .SH NAME
 rtnetlink \- macros to manipulate rtnetlink messages
 .SH SYNOPSIS
@@ -109,7 +109,7 @@ Creating a rtnetlink message to set the MTU of a device:
     rta = (struct rtattr *)(((char *) &req) +
                              NLMSG_ALIGN(req.nh.nlmsg_len));
     rta\->rta_type = IFLA_MTU;
-    rta\->rta_len = sizeof(unsigned int);
+    rta\->rta_len = RTA_LENGTH(sizeof(unsigned int));
     req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
                                   RTA_LENGTH(sizeof(mtu));
     memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));