ParseIPPrefix confused by zones that contain "/"
josharian opened this issue · comments
Josh Bleecher Snyder commented
Fuzzing finds the most hilarious things.
ip, err := ParseIP("::%0/00")
// ip: "::%0/00"
// err: nil
ipp := IPPrefixFrom(ip, 80)
s := ipp.String()
// s: "::%0/00/80"
ipp2, err := ParseIPPrefix(s)
// err: "netaddr.ParseIPPrefix("00/80"): bad prefix: strconv.Atoi: parsing "00/80": invalid syntax"
Technically, ::%0/00/80
is a perfectly acceptable IPPrefix that we currently reject.