summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ip/iplink_vxcan.c18
-rw-r--r--ip/ipmacsec.c28
-rw-r--r--ip/link_gre.c2
-rw-r--r--ip/link_gre6.c2
-rw-r--r--ip/link_ip6tnl.c2
-rw-r--r--ip/link_iptnl.c2
-rw-r--r--ip/link_veth.c18
-rw-r--r--ip/link_vti.c2
-rw-r--r--ip/link_vti6.c2
9 files changed, 38 insertions, 38 deletions
diff --git a/ip/iplink_vxcan.c b/ip/iplink_vxcan.c
index ed0ad8b9..87be5a67 100644
--- a/ip/iplink_vxcan.c
+++ b/ip/iplink_vxcan.c
@@ -31,7 +31,7 @@ static void usage(void)
}
static int vxcan_parse_opt(struct link_util *lu, int argc, char **argv,
- struct nlmsghdr *hdr)
+ struct nlmsghdr *n)
{
char *dev = NULL;
char *name = NULL;
@@ -49,18 +49,18 @@ static int vxcan_parse_opt(struct link_util *lu, int argc, char **argv,
return -1;
}
- ifm = NLMSG_DATA(hdr);
+ ifm = NLMSG_DATA(n);
ifi_flags = ifm->ifi_flags;
ifi_change = ifm->ifi_change;
ifm->ifi_flags = 0;
ifm->ifi_change = 0;
- data = NLMSG_TAIL(hdr);
- addattr_l(hdr, 1024, VXCAN_INFO_PEER, NULL, 0);
+ data = NLMSG_TAIL(n);
+ addattr_l(n, 1024, VXCAN_INFO_PEER, NULL, 0);
- hdr->nlmsg_len += sizeof(struct ifinfomsg);
+ n->nlmsg_len += sizeof(struct ifinfomsg);
- err = iplink_parse(argc - 1, argv + 1, (struct iplink_req *)hdr,
+ err = iplink_parse(argc - 1, argv + 1, (struct iplink_req *)n,
&name, &type, &link, &dev, &group, &index);
if (err < 0)
return err;
@@ -69,7 +69,7 @@ static int vxcan_parse_opt(struct link_util *lu, int argc, char **argv,
duparg("type", argv[err]);
if (name) {
- addattr_l(hdr, 1024,
+ addattr_l(n, 1024,
IFLA_IFNAME, name, strlen(name) + 1);
}
@@ -81,9 +81,9 @@ static int vxcan_parse_opt(struct link_util *lu, int argc, char **argv,
ifm->ifi_change = ifi_change;
if (group != -1)
- addattr32(hdr, 1024, IFLA_GROUP, group);
+ addattr32(n, 1024, IFLA_GROUP, group);
- data->rta_len = (void *)NLMSG_TAIL(hdr) - (void *)data;
+ data->rta_len = (void *)NLMSG_TAIL(n) - (void *)data;
return argc - 1 - err;
}
diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c
index 345a7073..c0b45f5a 100644
--- a/ip/ipmacsec.c
+++ b/ip/ipmacsec.c
@@ -1132,7 +1132,7 @@ static void usage(FILE *f)
}
static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
- struct nlmsghdr *hdr)
+ struct nlmsghdr *n)
{
int ret;
__u8 encoding_sa = 0xff;
@@ -1151,10 +1151,10 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
if (ret > 0) {
if (sci.sci)
- addattr_l(hdr, MACSEC_BUFLEN, IFLA_MACSEC_SCI,
+ addattr_l(n, MACSEC_BUFLEN, IFLA_MACSEC_SCI,
&sci.sci, sizeof(sci.sci));
else
- addattr_l(hdr, MACSEC_BUFLEN, IFLA_MACSEC_PORT,
+ addattr_l(n, MACSEC_BUFLEN, IFLA_MACSEC_PORT,
&sci.port, sizeof(sci.port));
}
@@ -1183,7 +1183,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
ARRAY_SIZE(values_on_off), &i);
if (ret != 0)
return ret;
- addattr8(hdr, MACSEC_BUFLEN, IFLA_MACSEC_ENCRYPT, i);
+ addattr8(n, MACSEC_BUFLEN, IFLA_MACSEC_ENCRYPT, i);
} else if (strcmp(*argv, "send_sci") == 0) {
NEXT_ARG();
int i;
@@ -1193,7 +1193,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
if (ret != 0)
return ret;
send_sci = i;
- addattr8(hdr, MACSEC_BUFLEN,
+ addattr8(n, MACSEC_BUFLEN,
IFLA_MACSEC_INC_SCI, send_sci);
} else if (strcmp(*argv, "end_station") == 0) {
NEXT_ARG();
@@ -1204,7 +1204,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
if (ret != 0)
return ret;
es = i;
- addattr8(hdr, MACSEC_BUFLEN, IFLA_MACSEC_ES, es);
+ addattr8(n, MACSEC_BUFLEN, IFLA_MACSEC_ES, es);
} else if (strcmp(*argv, "scb") == 0) {
NEXT_ARG();
int i;
@@ -1214,7 +1214,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
if (ret != 0)
return ret;
scb = i;
- addattr8(hdr, MACSEC_BUFLEN, IFLA_MACSEC_SCB, scb);
+ addattr8(n, MACSEC_BUFLEN, IFLA_MACSEC_SCB, scb);
} else if (strcmp(*argv, "protect") == 0) {
NEXT_ARG();
int i;
@@ -1223,7 +1223,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
ARRAY_SIZE(values_on_off), &i);
if (ret != 0)
return ret;
- addattr8(hdr, MACSEC_BUFLEN, IFLA_MACSEC_PROTECT, i);
+ addattr8(n, MACSEC_BUFLEN, IFLA_MACSEC_PROTECT, i);
} else if (strcmp(*argv, "replay") == 0) {
NEXT_ARG();
int i;
@@ -1245,7 +1245,7 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
(int *)&validate);
if (ret != 0)
return ret;
- addattr8(hdr, MACSEC_BUFLEN,
+ addattr8(n, MACSEC_BUFLEN,
IFLA_MACSEC_VALIDATION, validate);
} else if (strcmp(*argv, "encodingsa") == 0) {
if (encoding_sa != 0xff)
@@ -1281,20 +1281,20 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
}
if (cipher.id)
- addattr_l(hdr, MACSEC_BUFLEN, IFLA_MACSEC_CIPHER_SUITE,
+ addattr_l(n, MACSEC_BUFLEN, IFLA_MACSEC_CIPHER_SUITE,
&cipher.id, sizeof(cipher.id));
if (cipher.icv_len)
- addattr_l(hdr, MACSEC_BUFLEN, IFLA_MACSEC_ICV_LEN,
+ addattr_l(n, MACSEC_BUFLEN, IFLA_MACSEC_ICV_LEN,
&cipher.icv_len, sizeof(cipher.icv_len));
if (replay_protect != -1) {
- addattr32(hdr, MACSEC_BUFLEN, IFLA_MACSEC_WINDOW, window);
- addattr8(hdr, MACSEC_BUFLEN, IFLA_MACSEC_REPLAY_PROTECT,
+ addattr32(n, MACSEC_BUFLEN, IFLA_MACSEC_WINDOW, window);
+ addattr8(n, MACSEC_BUFLEN, IFLA_MACSEC_REPLAY_PROTECT,
replay_protect);
}
if (encoding_sa != 0xff) {
- addattr_l(hdr, MACSEC_BUFLEN, IFLA_MACSEC_ENCODING_SA,
+ addattr_l(n, MACSEC_BUFLEN, IFLA_MACSEC_ENCODING_SA,
&encoding_sa, sizeof(encoding_sa));
}
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 8fb8fe5d..b2573a1b 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -69,7 +69,7 @@ static void usage(void)
static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 4045f656..880b75da 100644
--- a/ip/link_gre6.c
+++ b/ip/link_gre6.c
@@ -79,7 +79,7 @@ static void usage(void)
static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index ccc79ff9..91d7d99f 100644
--- a/ip/link_ip6tnl.c
+++ b/ip/link_ip6tnl.c
@@ -72,7 +72,7 @@ static void usage(void)
static int ip6tunnel_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;
diff --git a/ip/link_iptnl.c b/ip/link_iptnl.c
index 622c6f14..3e653b77 100644
--- a/ip/link_iptnl.c
+++ b/ip/link_iptnl.c
@@ -72,7 +72,7 @@ static void usage(int sit)
static int iptunnel_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;
diff --git a/ip/link_veth.c b/ip/link_veth.c
index fddb7ac3..e6219e72 100644
--- a/ip/link_veth.c
+++ b/ip/link_veth.c
@@ -29,7 +29,7 @@ static void usage(void)
}
static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
- struct nlmsghdr *hdr)
+ struct nlmsghdr *n)
{
char *dev = NULL;
char *name = NULL;
@@ -47,18 +47,18 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
return -1;
}
- ifm = NLMSG_DATA(hdr);
+ ifm = NLMSG_DATA(n);
ifi_flags = ifm->ifi_flags;
ifi_change = ifm->ifi_change;
ifm->ifi_flags = 0;
ifm->ifi_change = 0;
- data = NLMSG_TAIL(hdr);
- addattr_l(hdr, 1024, VETH_INFO_PEER, NULL, 0);
+ data = NLMSG_TAIL(n);
+ addattr_l(n, 1024, VETH_INFO_PEER, NULL, 0);
- hdr->nlmsg_len += sizeof(struct ifinfomsg);
+ n->nlmsg_len += sizeof(struct ifinfomsg);
- err = iplink_parse(argc - 1, argv + 1, (struct iplink_req *)hdr,
+ err = iplink_parse(argc - 1, argv + 1, (struct iplink_req *)n,
&name, &type, &link, &dev, &group, &index);
if (err < 0)
return err;
@@ -67,7 +67,7 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
duparg("type", argv[err]);
if (name) {
- addattr_l(hdr, 1024,
+ addattr_l(n, 1024,
IFLA_IFNAME, name, strlen(name) + 1);
}
@@ -79,9 +79,9 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
ifm->ifi_change = ifi_change;
if (group != -1)
- addattr32(hdr, 1024, IFLA_GROUP, group);
+ addattr32(n, 1024, IFLA_GROUP, group);
- data->rta_len = (void *)NLMSG_TAIL(hdr) - (void *)data;
+ data->rta_len = (void *)NLMSG_TAIL(n) - (void *)data;
return argc - 1 - err;
}
diff --git a/ip/link_vti.c b/ip/link_vti.c
index a5b84a07..49b87e99 100644
--- a/ip/link_vti.c
+++ b/ip/link_vti.c
@@ -49,7 +49,7 @@ static void usage(void)
static int vti_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;
diff --git a/ip/link_vti6.c b/ip/link_vti6.c
index 39d12e63..d1fbec54 100644
--- a/ip/link_vti6.c
+++ b/ip/link_vti6.c
@@ -49,7 +49,7 @@ static void usage(void)
static int vti6_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
+ struct ifinfomsg *ifi = NLMSG_DATA(n);
struct {
struct nlmsghdr n;
struct ifinfomsg i;