Skip to content

Commit da0afd1

Browse files
committed
Merge branch 'vxlan-geneve-use-the-correct-nlattr-array-for-extack'
Sabrina Dubroca says: ==================== net: vxlan/geneve: use the correct nlattr array for extack The ->validate callbacks for vxlan and geneve have a couple of typos in extack, where the nlattr array for IFLA_* attributes is used instead of the link-specific one. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents c391eb8 + 9a7b5b5 commit da0afd1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/net/geneve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
12071207
enum ifla_geneve_df df = nla_get_u8(data[IFLA_GENEVE_DF]);
12081208

12091209
if (df < 0 || df > GENEVE_DF_MAX) {
1210-
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_GENEVE_DF],
1210+
NL_SET_ERR_MSG_ATTR(extack, data[IFLA_GENEVE_DF],
12111211
"Invalid DF attribute");
12121212
return -EINVAL;
12131213
}

drivers/net/vxlan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
31443144
u32 id = nla_get_u32(data[IFLA_VXLAN_ID]);
31453145

31463146
if (id >= VXLAN_N_VID) {
3147-
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_ID],
3147+
NL_SET_ERR_MSG_ATTR(extack, data[IFLA_VXLAN_ID],
31483148
"VXLAN ID must be lower than 16777216");
31493149
return -ERANGE;
31503150
}
@@ -3155,7 +3155,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
31553155
= nla_data(data[IFLA_VXLAN_PORT_RANGE]);
31563156

31573157
if (ntohs(p->high) < ntohs(p->low)) {
3158-
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_PORT_RANGE],
3158+
NL_SET_ERR_MSG_ATTR(extack, data[IFLA_VXLAN_PORT_RANGE],
31593159
"Invalid source port range");
31603160
return -EINVAL;
31613161
}
@@ -3165,7 +3165,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
31653165
enum ifla_vxlan_df df = nla_get_u8(data[IFLA_VXLAN_DF]);
31663166

31673167
if (df < 0 || df > VXLAN_DF_MAX) {
3168-
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_DF],
3168+
NL_SET_ERR_MSG_ATTR(extack, data[IFLA_VXLAN_DF],
31693169
"Invalid DF attribute");
31703170
return -EINVAL;
31713171
}

0 commit comments

Comments
 (0)