summaryrefslogtreecommitdiff
path: root/net/net6.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-03 10:27:27 -0500
committerTom Rini <trini@konsulko.com>2023-02-03 10:27:27 -0500
commitb102bfa15e9efb18104878d8a04a0092de63250c (patch)
tree1ec31a76dd16db5984331663aed37ce6f0a292ba /net/net6.c
parent9918b25d21db243352fc482671cafa10260b7887 (diff)
parent9bc80c0bc028a1658502eea02af2c1f26456c6b2 (diff)
Merge branch '2023-02-02-assorted-networking-updates'
- DSA driver for the MV88E6xxx, assorted IPv6 fixes, TFTP fix, fsl-mc cleanup coding style and fsl_ls_mdio bugfix
Diffstat (limited to 'net/net6.c')
-rw-r--r--net/net6.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/net6.c b/net/net6.c
index fdea0787885..75577bcea17 100644
--- a/net/net6.c
+++ b/net/net6.c
@@ -47,10 +47,13 @@ static int on_ip6addr(const char *name, const char *value, enum env_op op,
}
mask = strchr(value, '/');
- len = strlen(value);
- if (mask)
- net_prefix_length = simple_strtoul(value + len, NULL, 10);
+ if (mask) {
+ net_prefix_length = simple_strtoul(mask + 1, NULL, 10);
+ len = mask - value;
+ } else {
+ len = strlen(value);
+ }
return string_to_ip6(value, len, &net_ip6);
}